Scripting transfers in TSQL (6.5) 
Author Message
 Scripting transfers in TSQL (6.5)

Hi all,

Below is an initial exchange that I would still appreciate an answer on.

Addendum to 1) : I want to set the time that the transfers will execute
programatically, (as oposed to GUI); essentially, I want to query the
server re: next available time slot (our transfer window is 12 a.m. - 7
a.m.).

Some DBs take over 1 hour, most take 4-6 minutes.

Thanks,

Paul

1) Scheduled tasks (backups, transfers, TSQL, OS commands, etc...).
And yes, 6.5 does transfer DBs -- 'transfer' is the old terminology for
DTS,
without the 'transformation' part :-)
Yes, I am aware of the Backup/OS-copy/Restore method, but I am more
interested
in the transfer method, since it is difficult to resolve the timing
issues when
dealing with some 30 transfers a night.

2) The MSKB document
( http://www.***.com/ ) states
that it
applies to SQL 6.5, 7, and 2K.
It doesn't work any better in 2K, but the error code is different, at
least :-).

Paul

Quote:

> #2 - This looks like v7/2000 code.

> #1  - Can you define what you mean by schedule? sql 6.5 (if I
remember)
> doesn't transfer databases. You can schedule a backup and schedule a
copy of
> this file using the file system (xp_cmdshell) or a restore of this
file.



> > Hello,

> > Using SS6.5, SP 5a.

> > 1) I would like to know if it is possible to schedule a DB transfer
> > using TSQL.

> > 2) Why is this sproc not working?

> > I cut'n'pasted this from MSKB.

various
> > servers.
> > I commented in the code below where the error is occuring.
> > When called as it appears, I get a login failure error (I am
guessing
> > that is because the ToPassword is not being passed).
> > When I added the ToServer, ToUser and ToPassword parameters, I got a
> > 'too many parameters' error.

> > Any ideas?

> > Thanks,

> > Paul

> > create procedure sp_OA_TransferDB










> > as

> >          print 'sp_OA_TransferDB starting...'




> >       --
> >       -- Variable declarations
> >       --





> >       --
> >       -- Create the server object and get logged on
> >       --



> >       begin

> >          --
> >          -- Create a transfer object and fill in the details
> >          --




> >          begin
> >             print "Scripting the transfer..."

> >             --
> >             -- Script the transfer
> >             --
> >             -- SQLOLEXfrFile_SummaryFiles = 0x0001
> >             --

> > '").ScriptTransfer'




> > OUT,


> >             begin



> >                print "Performing the transfer..."


> > '").Transfer'



> > /******************** This is where the error is occuring:
> > *********************/




> >                begin

> >                   print '***The ::Transfer method failed.  Check
your
> > script
> >                      directory (.log) files for more details.'
> >                end
> >         else
> >                begin
> >                   print 'Transfer complete successfully!!!'
> >                end

> >             end
> >             else
> >             begin

> >             end

> >             --
> >             -- Clean up the transfer object
> >             --

> >          end

> >          --
> >          -- Clean up the server object
> >          --


> >       end
> > go

> >    --
> >    -- Execute a transfer
> >    set nocount on
> >    go



Sun, 18 Jan 2004 02:04:10 GMT
 
 [ 1 post ] 

 Relevant Pages 

1. full transfer: stored procedures not transferred (6.5 to 6.5)

2. SQL 6.5 Object Transfer: transfer fails and also destroys source data

3. How can I script db from tsql script?

4. Transferring SQL 6.5 data base to another SQL 6.5 Server

5. transfer database from one SQL Server 6.5 to another SQL Server 6.5

6. Transfer SqlServer Databases 6.5 to 6.5

7. Transfer database from one SQL Server 6.5 to another SQL Server 6.5

8. sql 6.5 script to sql 2k script

9. Changes to TSQL ver 6.0 to 6.5 -- cursor problems

10. Log Output From A Scheduled TSQL Task (SQL 6.5)

11. TSQL in 6.5

12. TSQL 6.5 - Catching errors from DUMP statement


 
Powered by phpBB® Forum Software