September 23, 2003 at 10:02 am
Hi, I am trying to copy a database from one server to another using the Transfer2 object of SQL-DMO. I would like to transfer the data as well as all the objects, including the relationships/constraints. Here is my code :
With oTransfer
.DestServer = server
' .DestLogin = user
' .DestPassword = password
.DestDatabase = dst_database
.DestUseTrustedConnection integrated
.CopySchema = True
.CopyAllObjects = True
.CopyAllDefaults = True
.CopyAllFunctions = True
.CopyAllRules = True
.CopyAllStoredProcedures = True
.CopyAllTables = True
.CopyAllTriggers = True
.CopyAllUserDefinedDatatypes = True
.CopyAllViews = True
.CopyData = SQLDMOCopyData_Replace
.DropDestObjectsFirst = True
.IncludeDependencies = True
.IncludeDB = True
.IncludeLogins = True
.IncludeUsers = True
.ScriptType = SQLDMOScript_Default
.Script2Type = SQLDMOScript2_Default
.SourceTranslateChar = False
.UseCollation = True
.UseDestTransaction = False
End With
Call oDatabase.Transfer(oTransfer)
The problem I have is that the data and the relationships are NOT transfered. Anyone knows what I am doing wrong or not doing? thanks for your help.
September 26, 2003 at 6:22 am
So just the objects are copied? No errors raised?
Andy
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply