Quantcast
Channel: Forum Getting started with SQL Server
Viewing all articles
Browse latest Browse all 7129

copying tables along with their indexes between databases

$
0
0

I use sql server management studio express.  I have a database that has some questionable schemas, roles, etc, so I decided to create a new database, with just tables, stored procedures, and user-functions.

So I used the "import data" feature, which allowed me to select several tables, that were copied along with their data.

Then, I scripted out all the user-functions and stored procedures from the original database, and pasted them into a query window for the new database, and executed the create statements for each.

Then I got a message that I was lacking a full-text index.

I then started examining some tables, and even regular tables with an integer primary key that is supposed to be an identity' field were not identity fields any more, and lacked the auto-increment.

I tried to change that, and make them auto-increment, and then sql server told me that I can't do that.  I guess if there is already data inside an integer field, you can't make it auto-increment.

So how do I solve all this?

Thanks


Viewing all articles
Browse latest Browse all 7129

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>