By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,334 Members | 1,290 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,334 IT Pros & Developers. It's quick & easy.

script to restore db from comand line

P: n/a
I want to run single script that will attach to instance and restore db

example file restore_on_dev1.txt
-- file restore_on_dev1.txt

attach to DEV1 user bamboo using 123456;
restote database A1 user bamboo using 12345 into A2 from ...;
--

I run
db2cmd db2 -tf c:\restore_on_dev1.txt
it fails with error related to restote syntacs

So
I removed attach line from script.
open db2cmd and run
db2 attach to DEV1 user bamboo using 123456;

then I run
db2cmd db2 -tf c:\restore_on_dev1.txt
script run fine and db restored

Is possible to attach and restore in single script ?

Nov 12 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.