Author |
Topic |
X002548
Not Just a Number
15586 Posts |
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
X002548
Not Just a Number
15586 Posts |
|
X002548
Not Just a Number
15586 Posts |
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
X002548
Not Just a Number
15586 Posts |
Posted - 2010-07-28 : 17:13:20
|
MOO indeed...
So why does this stop after the copy...this in a bat file
osql -i D:\backup\paerscbvd0402\dev\databases\blddistm\sql\BackupCopyRestore.sql -o D:\backup\paerscbvd0402\dev\databases\blddistm\bin\Migrate_paerscbvd0402_dev_blddistm.log -E -S PAERSCBVD0402\DEV osql -i D:\backup\paerscbvd0402\dev\databases\blddistm\sql\MakeBKP.sql -o D:\backup\paerscbvd0402\dev\databases\blddistm\bin\MakeBKP.log -E -S PAERSCBVD0402\DEV D:\backup\paerscbvd0402\dev\databases\blddistm\bin\CopyBKP.bat > D:\backup\paerscbvd0402\dev\databases\blddistm\bin\CopyBKP.log osql -i D:\backup\paerscbvd0402\dev\databases\blddistm\sql\AlterDB.sql -o D:\backup\paerscbvd0402\dev\databases\blddistm\bin\AlterDB.log -E -S PAERSCBVD0403\DEV osql -i D:\backup\paerscbvd0402\dev\databases\blddistm\sql\RestoreBKP.sql -o D:\backup\paerscbvd0402\dev\databases\blddistm\bin\RestoreBKP.log -E -S PAERSCBVD0403\DEV osql -i D:\backup\paerscbvd0402\dev\databases\blddistm\sql\SetDB.sql -o D:\backup\paerscbvd0402\dev\databases\blddistm\bin\SetDB.log -E -S PAERSCBVD0403\DEV
Brett
8-)
Hint: Want your questions answered fast? Follow the direction in this link http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx
Add yourself! http://www.frappr.com/sqlteam
|
 |
|
X002548
Not Just a Number
15586 Posts |
Posted - 2010-07-28 : 17:14:39
|
I think you got that backwards
COPY [/D] [/V] [/N] [/Y | /-Y] [/Z] [/A | /B ] source [/A | /B] [+ source [/A | /B] [+ ...]] [destination [/A | /B]]
source Specifies the file or files to be copied. /A Indicates an ASCII text file. /B Indicates a binary file. /D Allow the destination file to be created decrypted destination Specifies the directory and/or filename for the new file(s). /V Verifies that new files are written correctly. /N Uses short filename, if available, when copying a file with a non-8dot3 name. /Y Suppresses prompting to confirm you want to overwrite an existing destination file. /-Y Causes prompting to confirm you want to overwrite an existing destination file. /Z Copies networked files in restartable mode.
Brett
8-)
Hint: Want your questions answered fast? Follow the direction in this link http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx
Add yourself! http://www.frappr.com/sqlteam
|
 |
|
Kristen
Test
22859 Posts |
Posted - 2010-07-29 : 02:26:03
|
"So why does this stop after the copy"
osql ... osql ... CopyBKP.bat osql ... osql ... osql ...
The BAT file will NOT return. You have to do
EXEC CopyBKP.bat
or somesuch (CMD CopyBKP.bat perhaps?) if you want it to return. And it may have to do its own ">" logging as the outer ">" may not apply. |
 |
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2010-07-29 : 07:04:27
|
call CopyBKP.bat |
 |
|
Kristen
Test
22859 Posts |
Posted - 2010-07-30 : 06:17:22
|
That's it! Thanks Rob. |
 |
|
X002548
Not Just a Number
15586 Posts |
|
|