Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Database/Object Transfer stopped with no log

Posted on 1998-12-16
4
Medium Priority
?
217 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 40 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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
What if you have to shut down the entire Citrix infrastructure for hardware maintenance, software upgrades or "the unknown"? I developed this plan for "the unknown" and hope that it helps you as well. This article explains how to properly shut down …
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.

916 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