How to Generate Script of Database With Data And Without Data
Step 1: Connect your SQL server.
Step 2: Select the database in which you want to take backup with the script.
Step 3: Right-click in the database, go to the "tasks" option and select "Generate Script" option.
Step 5: Choose an option, If you want all tables, views, and store procedures (like all DB objects) then select the first option, and if your requirement is for selected DB objected then you can choose the second option. click the next button.
1> If you want one file for all scripts then select the first option which is "Single file".
2> If you want to generate a file with multiple database objects then select "Single file per object".
3> Choose your local file path and add the file name.
4> Select the "Unicode text" button.
5> If you want to save a file in the clipboard then select "Save to Clipboard".
6> If you want to open script in a new query window then select "Save to new query window".
Step 7: Click on the Advance button
Step 8: The main thing is that you have to select the script type. If you need data only then choose "Data only", if you need to get schema and data then choose "Schema and data". other wise select "Schema only". Click the OK button and go to the next step.
Step 9: Click the Next button
Step 10: Now this is our last step. here you can see all actions and results of the scripts. Click the Finish button and It's done.
Comments
Post a Comment