Generating the database script with its objects is one of the common tasks that a DBA would perform very frequently. This task may be carried out for various reasons like keeping the databases identical between environments and etc.
The process of scripting the database is simple and here is how to do this.
The process of scripting the database is simple and here is how to do this.
- Right-Click on the database which you choose to script out.
- Go to "Tasks" and choose "Generate Scripts"
- Now in the Script wizard, you will see the database that you want to script will be highlighted and there will be a check-box which "Script all objects in the selected database". If you select this check-box, then the wizard will script all the objects that are present in that particular database.
- After selecting the appropriate option click "Next" and now in the "Choose Script Options" page, select the option that you want to include in the script.
From SQL Server 2008 onwards, you can choose to script the data also if needed. So to script the data, go to the "Table/View Options" in the "Choose Script Options" page and change the "Script Data" option to "True"
- If you have not choose the option to script all objects from step 3 then after clicking next, the wizard will ask you what type of objects it want to script. Select the object types and click "Next".
- Choose the objects that you want to script and click "Next".
- Now in the "Output Option" page, select how you want to store the output of this process and click "Next"
- Now the wizard will summarize on what actions it will perform. If you are satisfied with the action then click "Finish" else go back and change accordingly.
This article is also available in pdf format for downloading.
1 comment:
Mua vé tại Aivivu, tham khảo
ve may bay di my gia re
giá vé về việt nam
vé máy bay từ canada về việt nam giá rẻ
khi nào có máy bay từ nhật về việt nam
khi nào mở lại đường bay hàn quốc
Vé máy bay từ Đài Loan về VN
vé máy bay chuyên gia nước ngoài sang Việt Nam
Post a Comment