Reputation: 811
I'm aware that to generate the script we need to follow the steps in Management studio;
Right click the database
Select Tasks -> Generate Scripts
(Click next if you get the intro screen)
Select "Select specific database objects"
Pick the objects to generate scripts for (tables, stored procedures, etc...)
Click Next, then specify the output filename
This will generate the schemas only. If you want to do data generating scripts as well, click the Advanced button and scroll down to the "Types of data to script" and change it from "Schema only" to "Data only" or "Schema and data"
Click Finish to generate the script
But I do not want to every time to do this, is there any query or SP or functions to do the same Job, because since my work is to connect remote to client and get the schema to my local and do the job so following the above steps would be tedious and time consuming for me. it would much help full if any ready made script works are available.
Upvotes: 0
Views: 660