By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,806 Members | 1,829 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,806 IT Pros & Developers. It's quick & easy.

Table export removes primary key

P: n/a
When I export a table from my local SQL Server to my web-host's SQL
Server, the primary key never seems to export. This happens whether I
use the "Copy tables and views..." option or the "Copy objects and
data..." option. Anybody know why this happens?

Jul 23 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
On the next screen after specifying the destination server in DTS
import/export wizard, select the third option "Copy objects and data between
SQL Server databases", on the next screen, uncheck the "Use default options"
check box, click on the options button. A dialog box will provide the
required options to copy the keys, indexes, triggers etc.

--
Anith
Jul 23 '05 #2

P: n/a
Thanks Anith, I have tried that, but get the message "Failed to copy
objects from MS SQL to Server to MS SQL Server" and "MS ODBC SQL Server
Drive [SQL Server] The login 'login name for local server' does not
exist." The table structure is imported but without the primary key and
none of the data.

If I choose the first option in DTS "Copy tables and views..." - the
table structure and all data is imported successfully but WITHOUT the
primary key.

Jul 23 '05 #3

P: n/a
DaveR (da**@bluehills.co.uk) writes:
Thanks Anith, I have tried that, but get the message "Failed to copy
objects from MS SQL to Server to MS SQL Server" and "MS ODBC SQL Server
Drive [SQL Server] The login 'login name for local server' does not
exist." The table structure is imported but without the primary key and
none of the data.


I don't know this screen at all, but it sounds to me that there are
options you fail to fill in correctly. The text "login name for local
server" sounds like something which is filled in as a guidance for you
to fill in.

I would execpt that there is also an option to use Windows authentication
for the other server, but again, I don't know this screen.

--
Erland Sommarskog, SQL Server MVP, es****@sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp
Jul 23 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.