473,480 Members | 4,939 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

script to restore db from comand line

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
0 1352

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
2076
by: john | last post by:
Newbie about this stuff. I want to run some php scripts from a shell script(bash?) the php script i want to run is this: test.php and it's path is this:...
2
4846
by: Raghuraman | last post by:
Hi, I've written a M.plan in my client place which is scheduled to occur weekly once.But 4 days gone from the last backup taken , there is a problem in the server which does not start loading...
3
6408
by: CSharpUser | last post by:
How do I pass in command line parameters to the program at startup in Visual Studio. This is similar to doing csc program arg1 arg2. I want to achieve the same effect running the program in...
0
3127
by: Takpol | last post by:
Hello, I have several archived filegroups that have data in them partitioned based on the date. These filegroups have been removed from database after archival. For example two months ago....
0
2121
by: raj.raghavan | last post by:
Hi, I have a database were all the indexes are in a seperate filegroup a few large tables are in a seperate filegroup. We take backup at different times and I have backup of primary, two filegroup...
2
7475
by: Ryan | last post by:
I'm trying to restore about 70 databases onto a new SQL server and wanted to script the creation and restore. I've done the creation with no problems, but on the restore, the logical names (of the...
1
1497
by: moishyyehuda | last post by:
Hi #1 How do I open a script from another script. #2 when I run the script how can I supply commands to the script. #3 how do I find the what commands the script needs. The thing is like...
6
3337
by: info | last post by:
hello all, if anyone out there could help me i would really appreciate it. i am very much a novice coder. I have a site we are building and we have created a section in the admin area to allow the...
5
6311
by: sat | last post by:
Hi, I'm working as a DB2 UDB DBA. I have some questions regarding SCP command... Actually every week redirect restore takes place from one of my production servers to test servers.. So, but...
0
7040
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
6905
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7041
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
6736
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5331
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4772
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
2980
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1299
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
178
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.