Export database as sql script with SQL Server Management Studio

Publié le: 01 janvier 1970
sur la chaîne: Hoang Duc Nguyen
602
7

This uses SQL Server Management Studio 19

Let's try to export a database to SQL script including both schema and data in a single file.
First open SSMS
Connect to the database
Locate database we want to export. In this example, I want to export the bikestore database.
Select the 'bikestore' database and then right click to choose tasks & generate scripts
Choose Next
Choose 'SCript entire database and all database objects'
Choose 'Advanced' and make sure that we export both schema and data
Choose 'Save as script file' to save the exported data as sql script file
Next
Next
Finish, we could optionally select 'Open' to open the script file generated directly

As you could see, a script file with both schema and data is generated, which could be used to restore to other local database.


Sur cette page du site, vous pouvez voir la vidéo en ligne Export database as sql script with SQL Server Management Studio durée heure minute seconde en bonne qualité , qui a été Téléchargé par l'utilisateur Hoang Duc Nguyen 01 janvier 1970, Partagez le lien avec vos amis et connaissances, sur youtube cette vidéo a déjà été regardée 602 fois et il a aimé 7 téléspectateurs. Bon visionnage!