Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to assign mulitple keys ?

Status
Not open for further replies.

JohnBates

MIS
Feb 27, 2000
1,995
US
I'm sure I am making this much too difficult...

I used a DTS pkg to export all my user tables over to my Test server.
Even though I specified * Transfer all objects,
* Copy data
* Transfer PRIMARY, FOREIGN keys

... the destination tables do not have any keys.

So..... in Enterprise Manager, I am trying to assign
the keys, but when I assign the second key, it then removes the key on the other col I had specified as a key.

Why is Enterprise Manager limiting me to only 1 key per table??

Thanks, John
 
in design mode press <ctrl> and mark with mouse the columns what you want to be keys. After it press on the icon with key.
By the way, you can't define many primary keys. You can define many columns in one single primary key. John Fill
1c.bmp


ivfmd@mail.md
 
SQL Server only allows one primary key. You can assign multiple indexes. Do you really mean multiple keys or a multi-column key?

Suggestion: Instead of DTS transfers, restore a backup of your production database(s) on your test server. You will get all the objects, keys, etc. You will have to correct users if logins don't match between the two servers. Terry
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top