I got a request from development team that they want the structure of a database to be migrated to a different instance and they were specific that they don't want it to have any data , so let see how can migrate a database without data
First lets Connect to source instance and script out the database as shown below
1)
3)From the below screen you can choose whether you want entire database or specific object , here i have chosen entire database
4)In this page we can select how we want the output script, here i am scripting it out to an output file and then chose the advanced option , here we will chose whether we want to script out complete data or just schema or entire database
5)From the advanced options select schema only
First lets Connect to source instance and script out the database as shown below
1)
This will open up a window which will help us to generate script
2)
3)From the below screen you can choose whether you want entire database or specific object , here i have chosen entire database
4)In this page we can select how we want the output script, here i am scripting it out to an output file and then chose the advanced option , here we will chose whether we want to script out complete data or just schema or entire database
5)From the advanced options select schema only
6)In the next page we can review the options we have selected
9) Now we have generated the schema only script of the database
Now Connect to to destination instance you want to create the database open the script and change the data file and log file path as of your destination instance and run the script and its done :)
No comments:
Post a Comment