January 9, 2002 at 12:58 pm
Using SQL7 I have experinced several times where I am copying one database from one server to another using transfer SQl Server Objects, but the data never gets transfered. has anybody come accross this before?
-JG
January 9, 2002 at 2:00 pm
yep. hate that task. Unreliable IMHO. I stick to detach/attach or backup/restore
Steve Jones
January 9, 2002 at 2:14 pm
I have found that task to be unreliable. It gets more reliable if you go through the options (options button on transfer tab)and deselect the "transfer database users and database roles" option but, still I opt for specific items transfer and / or scripting.
Hope this helps.
OBTW, it does seem more reliable in 2000 although I had such a sour taste from 7.0 I really avoid it.
David
David
@SQLTentmaker“He is no fool who gives what he cannot keep to gain that which he cannot lose” - Jim Elliot
January 10, 2002 at 5:50 am
The easiest way still to perform a dump to a file, transfer the file and perform a manual restore with QA (to specify other file locations, ...)
This always work.
January 10, 2002 at 12:57 pm
I am taking your advice on backing up and moving the file to the server then performing a restore. I am having trouble with the FileSystemObject Move. What do I have wrong with this code?
Function Main()
Dim objFSO, strFileSource, strDestination
Set objFSO = CreateObject ("Scripting.FileSystemObject")
strFileSource = DTSGlobalVariables("gvFilePathRoot").Value & _
"\pubs.bak"
strDestination = DTSGlobalVariables("gvDestinationPath").Value
If objFSO.FileExists(strFileSource) Then
strFileSource.Move(strDestination)
Else
Main = DTSTaskExecResult_Failure
Exit Function
-JG
January 10, 2002 at 1:07 pm
Whats the error? Looks ok, but I'm not sure .Move will overwrite. you might need to delete first.
Steve Jones
January 10, 2002 at 1:15 pm
It errors out on the .Move line. Stating: Object required: 'strFileSource'
-JG
January 10, 2002 at 3:01 pm
January 11, 2002 at 7:23 am
I MsgBox strFileSource and strDestination after the IF nad it returns the correct path for the file. very Strange. Still at wits end. Let me know if you see anything else I could possibly check.
-JG
January 11, 2002 at 9:53 am
Ahh, I just saw it. In this line:
strFileSource.Move(strDestination)
strFileSource is a string variable, not an object. The syntax is object.move( source, destination).
So you would change to objFSO.Move( strFileSource, strDest).
Steve Jones
January 11, 2002 at 11:53 am
Steve, that was the solution, in addition, I had to use MoveFile instead of Move.
objFSO.MoveFile(strFileSourec, strDestination)
Thanks for the Help! -JG
Edited by - jgee on 01/11/2002 11:53:50 AM
-JG
January 11, 2002 at 2:38 pm
Viewing 12 posts - 1 through 11 (of 11 total)
You must be logged in to reply to this topic. Login to reply