Solved

Transfer Database Task:  2000 to 2005, but no Primary Keys are copied - Help!!

Posted on 2007-03-22
7
628 Views
Last Modified: 2013-11-30
I am transferring a database from SQL Server 2000 to SQL Server 2005.  I am using 2005's Integration Services (SSIS) Transfer Database Task.  In this task, I am using the "DatabaseOnline" method.

The database transfer seemed to work, except no Primary Keys, Identity settings, Foreign Keys or Default Values transferred over!  

I have looked all over the property settings, and the internet, but I do not see any reference to including constraints.  How do I include PK, FK, etc., constraints when I use the Transfer Database Task to bring over an old SQL Server 2000 database to 2005?

0
Comment
Question by:jasonwisdom
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
7 Comments
 
LVL 11

Accepted Solution

by:
Ved Prakash Agrawal earned 250 total points
ID: 18772671
Hi,
Please try transfer SQL server object task which provide all the feature which you are looking for.
0
 
LVL 29

Expert Comment

by:Nightman
ID: 18772720
Best and most efficient way (while doing this online) is simply to take a new backup and restore this to the SQL 2005 server.

Remember to set the database compatibility level to 90 after the restore, and then updatestatistics.
0
 
LVL 1

Author Comment

by:jasonwisdom
ID: 18772912
Thank you, both.  

I am first trying the SQL Server Object Task - I'd like to keep this in a single IS package so others can just point & click & runi t.

But I'm getting an error, "Version80 database compatability level is not supported."

So far I hvaen't seen a property called Compatability Level or Version or anything like that.  Thoughts?

Thanks again.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 29

Expert Comment

by:Nightman
ID: 18772971
Version 80 is SQL 2000. Version 90 is SQL 2005. It appears that the task cannot work against an SQL 2000 database.

Backup the database on SQL 2000 and then restore it on SQL 2005.
0
 
LVL 1

Author Comment

by:jasonwisdom
ID: 18773062
I got the compatability issue figured out, now I'm getting this message:

Error: 0xC002F325 at Transfer SQL Server Objects Task, Transfer SQL Server Objects Task: Execution failed with the following error: "ERROR : errorCode=-1073548784 description=Executing the query "DROP LOGIN [BUILTIN\Administrators]
" failed with the following error: "Cannot drop the login 'BUILTIN\Administrators', because it does not exist or you do not have permission.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.
 helpFile= helpContext=0 idofInterfaceWithError={8BDFE893-E9D8-4D23-9739-DA807BCDC2AC}".
Task failed: Transfer SQL Server Objects Task


What...?????
I am switching to False every kind of login/permission setting I can find on the Properties.  So why is it trying to drop BUILTIN\Administrators??
0
 
LVL 1

Author Comment

by:jasonwisdom
ID: 18773084
Again, this is for the "Transfer SQL Server Objects Task".  
If I can swing this, I can get the entire database transfer into one single SSIS task.  That's my first choice.  It seems to go fairly far, except it's trying to drop logins.  

I fixed the compatability by right-clicking the 2005 Database in Management Studio, going to Properties, then Options, then chosing 9.0 for the 2005 database's compatability.  Fixed my one error.
0
 
LVL 1

Author Comment

by:jasonwisdom
ID: 18773526
OK, I figured it out.

Yes, I did use the "Copy SQL Server Objects Task".  However, I had to set about a dozen Properties.  I kept getting errors, dropping logins, creating logins, creating tables and stored procedures that already existed.....One key setting was "Copy Schema=false".

Anyway, it works.  I considered the backup / restore option, but going across versions has caused problems in the past - and it can't be automated into a simple, single SSIS task.

Thanks for your help.
0

Featured Post

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
SQL Server Trigger 8 35
Copy data to New Year 9 31
Parsing this XML works but the other one doesn't 9 27
query analyser in sql server 2016 express edition 2 25
JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
I have a large data set and a SSIS package. How can I load this file in multi threading?
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question