SQL Server: dump/export database indexes

djmepvbi  于 2023-03-11  发布在  SQL Server
关注(0)|答案(2)|浏览(144)

I got a SQL Server database which I would like to dump, but only indexes and maybe structure, but I couldn't figure it out how.

I use SQL Server Management Studio, but I cant see how would I do this. MySQL is much more easier then this :)

Any tips or how-to's would help.

NOTE: I'm new to SQL Server.

pkwftd7m

pkwftd7m1#

To export the indexes, together with the table schemas, do these steps:

  1. Right-click the database and choose to generate scripts.

  1. In the wizard on the page Set Scripting Options, click Advanced.

  1. Set Script Indexes to True.

  1. Click OK, complete the wizard, and you should now see the table schema SQL together with the indexes.
kyks70gy

kyks70gy2#

Right click database ->click on generate scripts --->Choose Script Entire database

In new window,click on Advanced and choose types of data to script as Schema only ..you can play with another options

now complete all the screens and you can see structure of all tables and indexes..

相关问题