Solved

Database/Object Transfer stopped with no log

Posted on 1998-12-16
4
199 Views
Last Modified: 2010-03-19
My needs are for transfering 50 tables from one server to another one. I use the transfer management interface of SQL Entreprise Manager (Database/Object Transfer). I scheduled the transfer by night under the scheduled task feature. My problem is the transfer for the first 20 tables are working but after that the transfer stopped and i have nothing on the log explaining that. We have SQL Enterprise manager 6.5 and the service pack 4.0 is installed.

Do you have any idea about this problem or another technique for transferring tables or do you know a third party product?

Note: The replication is not a solution for us
0
Comment
Question by:mulus
4 Comments
 
LVL 3

Expert Comment

by:traygreen
ID: 1092315
Was the target device and database sized as large or larger than the source?  I haven't run transer manager as a scheduled event, but it might be the issue
0
 

Author Comment

by:mulus
ID: 1092316
The size of the target database is the same as the source.
0
 
LVL 2

Expert Comment

by:odessa
ID: 1092317
Does the transaction log on targed Base are cutted on checkpoint?

and second the SQL Executive is not a bug free app
0
 
LVL 1

Accepted Solution

by:
snydero earned 20 total points
ID: 1092318
I have had many mysterious failures when using transfer manager.
I don't use it any more.  Usually, foreign key constraints are the cause of un-logged failure to transfer.
----------
Solution
----------
Run this script to create a BCP out statement for each table...
-----------------------------------------------------------
-- Create a BCP command-line for each master and tmp table.
-----------------------------------------------------------
SET nocount ON
GO

SELECT   'BCP source_db..' + name + ' out ' + name + '.dat -c -Usa -T -S source_server '
FROM     sysobjects
WHERE    type = 'U'
ORDER BY 1
GO

Then clean up this output and make a batch file of it called bcp_in.bat.

Run this script to create the bcp in batch file...
-----------------------------------------------------------
-- Create a BCP command-line for each master and tmp table.
-----------------------------------------------------------
SET nocount ON
GO

SELECT   'BCP target_db..' + name + ' in ' + name + '.dat -c -Usa -T -S target_server '
FROM     sysobjects
WHERE    type = 'U'
ORDER BY 1
GO

Run this script on the source server to create the bcp in batch file and clean it up.

Delete the rows in the target database.

Create a scheduled task in the source server:
----------------------------------------
Type:     TSQL
Database: master
Command:
DECLARE @result int
EXECUTE @result = xp_cmdshell
'd:\full_path\bcp_out.bat'
IF (@result = 0)
      PRINT 'Success'
ELSE
      PRINT 'Failure'
----------------------------------------
And another in the target server...
Type:     TSQL
Database: master
Command:
DECLARE @result int
EXECUTE @result = xp_cmdshell
'd:\full_path\bcp_in.bat'
IF (@result = 0)
      PRINT 'Success'
ELSE
      PRINT 'Failure'
----------------------------------------
I the source and target servers are different, you may have to ftp the xxx.dat files from to the target.  A task can do this too.

0

Featured Post

Get up to 2TB FREE CLOUD per backup license!

An exclusive Black Friday offer just for Expert Exchange audience! Buy any of our top-rated backup solutions & get up to 2TB free cloud per system! Perform local & cloud backup in the same step, and restore instantly—anytime, anywhere. Grab this deal now before it disappears!

Join & Write a Comment

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.
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

762 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

17 Experts available now in Live!

Get 1:1 Help Now