Windows Vista Tips

Windows Vista Tips > Newsgroups > Windows Server > Scripting > Re: Help Urgent!!

Reply
Thread Tools Display Modes

Re: Help Urgent!!

 
 
Seyfullah IZMIRLI
Guest
Posts: n/a

 
      10-23-2008
This VBScript will help you

Sub BackupDB(ByVal xServer,ByVal xDB,ByVal xUser,ByVal xPass,ByVal xFile)
Dim lSQL
Dim loCN
Set loCN = CreateObject("ADODB.Connection")
lSQL = lSQL & "Provider=SQLOLEDB.1;Password=" & xPass &";"
lSQL = lSQL & "Persist Security Info=True;User ID=" & xUser & ";"
lSQL = lSQL & "Initial Catalog=" & xDB & ";"
lSQL = lSQL & "Data Source="& xServer &";"
loCN.Open lSQL
lSQL = "BACKUP DATABASE " & xDB & " TO DISK = N'" & xFile & "' WITH
NOFORMAT, NOINIT, Name = N'" & xDB & "-Full Database Backup', Skip ,
NOREWIND, NOUNLOAD, STATS = 10"
loCN.Execute lSQL
loCN.close
End Sub
Call
BackupDB("ServerName","DBNme","UserName","Password ","d:\Backup\SQL\DBName.Bak")
dim FSO,OverWrite
Set FSO = CreateObject("Scripting.FileSystemObject")
OverWrite = True
Call FSO.CopyFile("SourcePath","DestinationPath",OverWr ite)


"LG" <>, haber iletisinde sunlari
yazdi:f211d9b1-32b0-47a4-9c2f-...
> Hi All,
>
> we have our build which gets copied to our central server
> once the build copy is completed i want to schedule a task such that
> its copies the build file to my local system
> I need to write a script for doing this..
>
>
> Can you please guide me through this
> how do i go about doing this??
>
>
> Thanks
> Ganesh



 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
URGENT !!! [ IE7 FAVORITES BUG ] !!! URGENT Kevin Internet Explorer 0 11-27-2006 05:51 PM
Help !!!!!!! DHCP IP not enough - Urgent Urgent ITCOM Server Networking 7 09-01-2006 01:17 PM
URGENT ~ SBS 2k3 P DNS Setup ~ URGENT Scochaik Windows Small Business Server 6 11-01-2004 09:41 PM
URGENT URGENT -- MSN Messenger Not Working Linda Windows MSN Messenger 2 04-27-2004 02:21 AM
Re: Cannot access SBS clients from server, Please Help! Urgent! Urgent! Urgent! Rahisuddin Shah Server Networking 0 04-06-2004 12:46 PM



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59