Werbung: SecurityConsole.de verwaltet Ihre Computer mit Security Essentails aus der Cloud!
30 Tage kostenfrei testen und 20% Rabatt für Ihre Bestellung mit Promocode: WBF2685582
(Promocode gültig bis 31.12.2011)

Group:  English: Windows Server » microsoft.public.windows.server.scripting
Thread: Help Urgent!!

HTVi
TV Discussion Newsgroups

Help Urgent!!
LG <lgmagic[ at ]gmail.com> 10/22/2008 4:54:13 AM
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
Re: Help Urgent!!
"Seyfullah IZMIRLI" <seyfullahizmirli[ at ]gmail.com> 10/23/2008 6:59:56 AM
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",OverWrite)


"LG" <lgmagic[ at ]gmail.com>, haber iletisinde sunlari
yazdi:f211d9b1-32b0-47a4-9c2f-673d5df5a52b[ at ]m32g2000hsf.googlegroups.com...
[Quoted Text]
> 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


Home | Search | Terms | Imprint Contact
Newsgroups Reader - provided by WiredBox.Net
Suche nach Orten, Städten, Postleitzahlen, Vorwahlen, Kfz-Kennzeichen