Reputation: 1454
I have database with multiple tables in Microsoft SQL Server with schema in tables as "xyz". i am able to copy this database tables along with data from one sql server to another using export and import wizard of SQL server.
I want to do find a way to- 1. Copy only tables with no data. 2. is it possible to covert current database design to a script and then run the same on another server which will create all these tables with empty data ? Thanks in advances. Best Regards
Upvotes: 0
Views: 6404
Reputation: 13976
Yes, you could do that with Management Studio. Right click your database and then select Tasks -> Generate Scripts. There are some settings there you should tweak, like if it should generate scripts for indexes and statistics. They are all in plain sight.
An alternative is SQL Server Data Tools. It's relatively new (ex-Data Dude). It's not as straightforward, but better on a long term, for database versioning and for creating migration scripts.
Upvotes: 1