Solved

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

Posted on 2007-03-22
7
621 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
  • 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
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

 
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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

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

Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

864 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now