473,383 Members | 1,805 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

SqlServer2005: Transfer Sql Server Objects

I'm looking for help in getting the Transfer Sql Server Objects task to work. The goal is to transfer the tables, views, sprocs,
udfs from a SqlServer 2000 database to a Sql Server 2005 database.

When I set the task up and run it, it fails complaining about an invalid foreign key relation. The relation in question is valid,
and used in the current production environment under SS2000, so I think the real problem is something else. I've seen reports that
this kind of error occurs when the Transfer task encounters a foreign key involving a table that hasn't been transferred yet.

As an aside, this kind of transfer worked flawlessly under Enterprise Manager when I used the DTS Wizard to move the objects between
two instances of SqlServer2000. Unfortunately, Enterprise Manager doesn't appear to work with SqlServer2005.

Any help and/or pointers would be greatly appreciated (including other strategies on how to affect the transfer -- I tried using the
Transfer Database task, too, but it failed when it supposedly couldn't find the path on the target server -- I say supposedly
because it was able to find the path in order to delete the pre-existing files on the target server)!

- Mark
Dec 1 '06 #1
4 3217
Mark Olbert (Ch*********@newsgroups.nospam) writes:
Any help and/or pointers would be greatly appreciated (including other
strategies on how to affect the transfer
The best is of course to keep all database objects under version control.
In such case, you never have to script anything, you just get what you
need from the version-control system. You would still have to move the
data, but bcp is usually a good choice for this.

In lieu of a source-control system to get the source from, you can use
Generate Scrips from the Object Explorer in Mgmt Studio. Select the
database, right-click and then to the Tasks submenu. Once the tables
are up on the other side, you can use BCP to move the data.

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

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx
Dec 2 '06 #2
>In lieu of a source-control system to get the source from, you can use
>Generate Scrips from the Object Explorer in Mgmt Studio. Select the
database, right-click and then to the Tasks submenu. Once the tables
are up on the other side, you can use BCP to move the data.
I'm not that familiar with BCP (I tended to just use the DTS Wizard in Enterprise Manager), but I can read up on it.

Do you have any references on using version control with SqlServer 2000 and 2005? I'm not familiar with using version control on
database objects.

Thanks for the quick reply!

- Mark
Dec 3 '06 #3
Mark Olbert (Ch*********@newsgroups.nospam) writes:
Do you have any references on using version control with SqlServer 2000
and 2005? I'm not familiar with using version control on database
objects.
If you are familliar to version control, you are familiar to version control
of database objects: you check out, edit, compile and test until you are
satisfied and then you check in. When you need to set a baseline for
delivering to test or production, you set a label so that you know what
you shipped.

Of course tables are a little special, since you don't test them in the
same manner, and when you change a table you will need to compose an
upgrade script to preserve the data in some way, but that you need to do
without version control as well.

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

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx
Dec 3 '06 #4
Mark Olbert (Ch*********@newsgroups.nospam) writes:
I'm not that familiar with BCP (I tended to just use the DTS Wizard in
Enterprise Manager), but I can read up on it.
As a quick start here is a sample command exporting data out:

bcp database..tbl out tbl.bcp -n -T -S myserver

-n specifies native format, which is the best for moving data between two
SQL Server databases in most cases. -T specifies trusted connection. Use
-U and -P to specify username and password for SQL authentication if
that is what you use.

For importing data to the other server, just change "out" to "in" and the
server name of course. ...but if the table has an identity column you
also need to specify -E to use the values in the file.

If the databases have different collation you need to use a format file.
--
Erland Sommarskog, SQL Server MVP, es****@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx
Dec 3 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Srini | last post by:
I am implementing Front Controller in ASP.net as outlined in Microsoft documentation titled "Implementing Front Controller in ASP.NET Using HTTPHandler"...
1
by: Arnnei | last post by:
The Transfer method allows you to transfer from inside one ASP page to another ASP page Is there a similar thing - The Transfer method taht allows you to transfer from inside one ASP page to a...
6
by: StephenMcC | last post by:
Hi All, Got a quick query in relation to the Server.Transfer method available in IIS 5+/ASP. I've got an issue where I want to take a portion of an online app and extract this out into a web...
4
by: Brian | last post by:
Hi, I'm trying to make an online FTP utility in C# ASP.NET using MSINET.ocx (an active X control a.k.a. "Microsoft Internet Transfer Control") I've added the reference into my project and have...
23
by: barryfz | last post by:
I need to be able to move from one web app on my server to another on the same server and preserve the session state. I have played with server.transfer but I get an error saying I can't do this....
0
Frinavale
by: Frinavale | last post by:
Platform: WindowsXP and IIS Language: Asp .NET (using Visual Basic back end) I'm not sure if anyone will be able to understand my code because its written using ASPX and Visual Basic back end. ...
3
by: Peter Nofelt | last post by:
On Server.Transfer(), is there a reason why the previous page's elements would appear on the new page? Note: this transfer is occuring between two pages on the same server. <Scenario> I'm using...
4
by: evantay | last post by:
I'm using ASP.NET 2.0 with VS.NET 2005. I'm trying to access properties from my master pages within a page that inherits from that master page (a child page). However the values are always null....
3
by: OpenPavilion | last post by:
Hello community, maybe one of you can help me out with a question regarding the transfer of objects betwen client an server: I have three files: ####### ClassA.py ####### class ClassA: def...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.