we do have a MS-SQL Server in production use which I want to dump its
contents nightly onto a ftp site.
The ftp does not accept anonymous logins; can anyone point me in the
appropiate direction on how to automate this ? The dump is drawn using the
following:
EXECUTE master.dbo.xp_sqlmaint N'-PlanID
D9A8D500-18F8-409A-A7ED-E7BD31E0AC26 -WriteHistory -VrfyBackup -BkUpMedia
DISK -BkUpDB "d:\MSSQL\BACKUP" -DelBkUps 2WEEKS -CrBkSubDir -BkExt "BAK"'
The path in hyphens ( D:\.... ) needs to be replaced with the ftp site
data. ( i. e. someuser@.ftpsite... ); how do I come up with the right
verbiage ?
jt"jt" <foo@.bar.org> wrote in message
news:40332ae2$0$17559$9b4e6d93@.newsread4.arcor-online.net...
> Hi ng,
> we do have a MS-SQL Server in production use which I want to dump its
> contents nightly onto a ftp site.
> The ftp does not accept anonymous logins; can anyone point me in the
> appropiate direction on how to automate this ? The dump is drawn using the
> following:
> EXECUTE master.dbo.xp_sqlmaint N'-PlanID
> D9A8D500-18F8-409A-A7ED-E7BD31E0AC26 -WriteHistory -VrfyBackup -BkUpMedia
> DISK -BkUpDB "d:\MSSQL\BACKUP" -DelBkUps 2WEEKS -CrBkSubDir -BkExt "BAK"'
> The path in hyphens ( D:\.... ) needs to be replaced with the ftp site
> data. ( i. e. someuser@.ftpsite... ); how do I come up with the right
> verbiage ?
Write a second task to do the ftp from d:\etc to the ftp location
and schedule it after the standard backup would have completed.|||Hi moutain man,
thanks for the input.
But how do I supply credentials for the ftp site ( username password )
within a CmdExec task ?
"mountain man" <hobbit@.southern_seaweed.com.op> schrieb im Newsbeitrag
news:XGGYb.64789$Wa.42275@.news-server.bigpond.net.au...
> "jt" <foo@.bar.org> wrote in message
> news:40332ae2$0$17559$9b4e6d93@.newsread4.arcor-online.net...
> > Hi ng,
> > we do have a MS-SQL Server in production use which I want to dump its
> > contents nightly onto a ftp site.
> > The ftp does not accept anonymous logins; can anyone point me in the
> > appropiate direction on how to automate this ? The dump is drawn using
the
> > following:
> > EXECUTE master.dbo.xp_sqlmaint N'-PlanID
D9A8D500-18F8-409A-A7ED-E7BD31E0AC26 -WriteHistory -VrfyBackup -BkUpMedia
> > DISK -BkUpDB "d:\MSSQL\BACKUP" -DelBkUps 2WEEKS -CrBkSubDir -BkExt
"BAK"'
> > The path in hyphens ( D:\.... ) needs to be replaced with the ftp site
> > data. ( i. e. someuser@.ftpsite... ); how do I come up with the right
> > verbiage ?
>
> Write a second task to do the ftp from d:\etc to the ftp location
> and schedule it after the standard backup would have completed.
>|||> But how do I supply credentials for the ftp site ( username password )
> within a CmdExec task ?
One method is to create a DTS package to do the FTP and execute it with
DTSRUN in the CmdExec task. You could also execute FTP directly from the
CmdExec with the -s option to specify a file containing the FTP commands.
--
Hope this helps.
Dan Guzman
SQL Server MVP
"jt" <foo@.bar.org> wrote in message
news:40333e78$0$28963$9b4e6d93@.newsread2.arcor-online.net...
> Hi moutain man,
> thanks for the input.
> But how do I supply credentials for the ftp site ( username password )
> within a CmdExec task ?
> "mountain man" <hobbit@.southern_seaweed.com.op> schrieb im Newsbeitrag
> news:XGGYb.64789$Wa.42275@.news-server.bigpond.net.au...
> > "jt" <foo@.bar.org> wrote in message
> > news:40332ae2$0$17559$9b4e6d93@.newsread4.arcor-online.net...
> > > Hi ng,
> > > > we do have a MS-SQL Server in production use which I want to dump its
> > > contents nightly onto a ftp site.
> > > > The ftp does not accept anonymous logins; can anyone point me in the
> > > appropiate direction on how to automate this ? The dump is drawn using
> the
> > > following:
> > > > EXECUTE master.dbo.xp_sqlmaint N'-PlanID
> > D9A8D500-18F8-409A-A7ED-E7BD31E0AC26 -WriteHistory -VrfyBackup -BkUpMedia
> > > DISK -BkUpDB "d:\MSSQL\BACKUP" -DelBkUps 2WEEKS -CrBkSubDir -BkExt
> "BAK"'
> > > > The path in hyphens ( D:\.... ) needs to be replaced with the ftp
site
> > > data. ( i. e. someuser@.ftpsite... ); how do I come up with the right
> > > verbiage ?
> > Write a second task to do the ftp from d:\etc to the ftp location
> > and schedule it after the standard backup would have completed.|||Check out this article
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=29206|||"jt" <foo@.bar.org> wrote in message
news:40333e78$0$28963$9b4e6d93@.newsread2.arcor-online.net...
> Hi moutain man,
> thanks for the input.
> But how do I supply credentials for the ftp site ( username password )
> within a CmdExec task ?
In the absence of further information, not having previously ftp'd
out of SQL server, my inclination would be to find some ftp.exe
which will accept parameters (eg: input and output locations, account
credentials and p/w's, and run it via a batch file, passing the appropriate
params into it from the batch file.
If there are other solutions out there, someone should pipe up
sooner or later.
Good luck!
> "mountain man" <hobbit@.southern_seaweed.com.op> schrieb im Newsbeitrag
> news:XGGYb.64789$Wa.42275@.news-server.bigpond.net.au...
> > "jt" <foo@.bar.org> wrote in message
> > news:40332ae2$0$17559$9b4e6d93@.newsread4.arcor-online.net...
> > > Hi ng,
> > > > we do have a MS-SQL Server in production use which I want to dump its
> > > contents nightly onto a ftp site.
> > > > The ftp does not accept anonymous logins; can anyone point me in the
> > > appropiate direction on how to automate this ? The dump is drawn using
> the
> > > following:
> > > > EXECUTE master.dbo.xp_sqlmaint N'-PlanID
> > D9A8D500-18F8-409A-A7ED-E7BD31E0AC26 -WriteHistory -VrfyBackup -BkUpMedia
> > > DISK -BkUpDB "d:\MSSQL\BACKUP" -DelBkUps 2WEEKS -CrBkSubDir -BkExt
> "BAK"'
> > > > The path in hyphens ( D:\.... ) needs to be replaced with the ftp
site
> > > data. ( i. e. someuser@.ftpsite... ); how do I come up with the right
> > > verbiage ?
> > Write a second task to do the ftp from d:\etc to the ftp location
> > and schedule it after the standard backup would have completed.|||On Thu, 19 Feb 2004 00:14:55 GMT, "mountain man"
<hobbit@.southern_seaweed.com.op> wrote:
>"jt" <foo@.bar.org> wrote in message
>news:40333e78$0$28963$9b4e6d93@.newsread2.arcor-online.net...
>> Hi moutain man,
>>
>> thanks for the input.
>> But how do I supply credentials for the ftp site ( username password )
>> within a CmdExec task ?
>
>In the absence of further information, not having previously ftp'd
>out of SQL server, my inclination would be to find some ftp.exe
>which will accept parameters (eg: input and output locations, account
>credentials and p/w's, and run it via a batch file, passing the appropriate
>params into it from the batch file.
>If there are other solutions out there, someone should pipe up
>sooner or later.
>Good luck!
The windows/dos ftp client can be scripted. We do this at work.
It's easiest if everything is constant, by which I mean I always want
to ftp a file with a fixed name to a fixed location.
the script (a text file) will look something like
open ftp.foo.com
user: fred
pass: fred
cd /public/upload
put c:\temp\myfile
quit
basically it's just a list of commands that you would type in at the
keyboard to achieve your result.
and the scheduled job is like ftp < myscript.txt
If the filename varies then you might need to use mput with a wildcard
instead of put, but that is the gist of it.
The above might not be the exact syntax, as this is from memory. Post
or mail again if you have problems and I'll find some live code.
No comments:
Post a Comment