Solved

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

Posted on 2007-03-22
7
619 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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Analysis of table use 7 29
Numeric sequence in SQL 14 37
combine an MS SQL string in Idera DM 9 31
shrink datafile Sql server 4 14
In this article I will describe the Copy Database Wizard method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
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

706 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

16 Experts available now in Live!

Get 1:1 Help Now