Solved

Database/Object Transfer stopped with no log

Posted on 1998-12-16
4
204 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

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

Question has a verified solution.

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

I wrote this interesting script that really help me find jobs or procedures when working in a huge environment. I could I have written it as a Procedure but then I would have to have it on each machine or have a link to a server-related search that …
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.
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.
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.

773 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