473,498 Members | 1,938 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

proper way to shutdown db2

Hello,

I am looking for the proper way to shut down db2 completely so that I
can do a cold back up on all the databases.

Thanks!

----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---
Nov 12 '05 #1
10 13474
Have a look at the quiesce command. Normally, it should be as simple as:

db2 force applications all
db2 connect to database <<dbname>> in exclusive mode
db2 backup database......

Note that this is at the database level. Quiesce also works at the
instance level if you have multiple databases in an instance.

Tim B. wrote:
Hello,

I am looking for the proper way to shut down db2 completely so that I
can do a cold back up on all the databases.

Thanks!

----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet
News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000
Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via
Encryption =---


Nov 12 '05 #2
Thanks for your response. This is the script that I will be running.
Does this sound decent:

#!/bin/bash

# The following three lines have been added by UDB DB2.
if [ -f ~/sqllib/db2profile ]; then
. ~/sqllib/db2profile
else
exit 1
fi

# kick out everyone
db2 force applications all

db2 connect to database db1 in exclusive mode
db2 "backup database db1 to /opt/BACKUP"

db2 connect to database db2 in exclusive mode
db2 "backup database db2 online to /opt/BACKUP"

db2 connect to database db3 in exclusive mode
db2 "backup database db3 online to /opt/BACKUP"
What do I have to do to ensure that no one attempts any read/writes to
the database and also, how do I put the database back online?
Blair Adamache wrote:
Have a look at the quiesce command. Normally, it should be as simple as:

db2 force applications all
db2 connect to database <<dbname>> in exclusive mode
db2 backup database......

Note that this is at the database level. Quiesce also works at the
instance level if you have multiple databases in an instance.

Tim B. wrote:
Hello,

I am looking for the proper way to shut down db2 completely so that I
can do a cold back up on all the databases.

Thanks!

----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet
News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World!
>100,000 Newsgroups

---= 19 East/West-Coast Specialized Servers - Total Privacy via
Encryption =---



----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---
Nov 12 '05 #3
Also, how can I completely shutdown db2 and grab the raw database files
for the backup? In other words, I don't want to backup using db2
commands, I might simply want to tar up the whole thing and go.

Blair Adamache wrote:
Have a look at the quiesce command. Normally, it should be as simple as:

db2 force applications all
db2 connect to database <<dbname>> in exclusive mode
db2 backup database......

Note that this is at the database level. Quiesce also works at the
instance level if you have multiple databases in an instance.

Tim B. wrote:
Hello,

I am looking for the proper way to shut down db2 completely so that I
can do a cold back up on all the databases.

Thanks!

----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet
News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World!
>100,000 Newsgroups

---= 19 East/West-Coast Specialized Servers - Total Privacy via
Encryption =---



----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---
Nov 12 '05 #4
When the backup completes, users can reconnect. You might want to
quiesce each database individually before backing it up - the time from
the start of the first backup to the second allows a large window for
lots of users to reconnect to the 2nd and 3rd databases.

Tim B. wrote:
Thanks for your response. This is the script that I will be running.
Does this sound decent:

#!/bin/bash

# The following three lines have been added by UDB DB2.
if [ -f ~/sqllib/db2profile ]; then
. ~/sqllib/db2profile
else
exit 1
fi

# kick out everyone
db2 force applications all

db2 connect to database db1 in exclusive mode
db2 "backup database db1 to /opt/BACKUP"

db2 connect to database db2 in exclusive mode
db2 "backup database db2 online to /opt/BACKUP"

db2 connect to database db3 in exclusive mode
db2 "backup database db3 online to /opt/BACKUP"
What do I have to do to ensure that no one attempts any read/writes to
the database and also, how do I put the database back online?
Blair Adamache wrote:
Have a look at the quiesce command. Normally, it should be as simple as:

db2 force applications all
db2 connect to database <<dbname>> in exclusive mode
db2 backup database......

Note that this is at the database level. Quiesce also works at the
instance level if you have multiple databases in an instance.

Tim B. wrote:
Hello,

I am looking for the proper way to shut down db2 completely so that I
can do a cold back up on all the databases.

Thanks!

----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet
News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World!
>100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via
Encryption =---



----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet
News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000
Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via
Encryption =---


Nov 12 '05 #5
DB2 does not support that. It can work if the database is truly
inactive, but if you run into a problem, IBM Service and Support may not
be able to help you.

Tim B. wrote:
Also, how can I completely shutdown db2 and grab the raw database files
for the backup? In other words, I don't want to backup using db2
commands, I might simply want to tar up the whole thing and go.

Blair Adamache wrote:
Have a look at the quiesce command. Normally, it should be as simple as:

db2 force applications all
db2 connect to database <<dbname>> in exclusive mode
db2 backup database......

Note that this is at the database level. Quiesce also works at the
instance level if you have multiple databases in an instance.

Tim B. wrote:
Hello,

I am looking for the proper way to shut down db2 completely so that I
can do a cold back up on all the databases.

Thanks!

----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet
News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World!
>100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via
Encryption =---



----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet
News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000
Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via
Encryption =---


Nov 12 '05 #6
Jim
Could you give me some examples on that quiesce command? Someone took my
damn book and I am having trouble coming up with decent documentation on
it.

Blair Adamache wrote:
When the backup completes, users can reconnect. You might want to
quiesce each database individually before backing it up - the time from
the start of the first backup to the second allows a large window for
lots of users to reconnect to the 2nd and 3rd databases.

Tim B. wrote:
Thanks for your response. This is the script that I will be running.
Does this sound decent:

#!/bin/bash

# The following three lines have been added by UDB DB2.
if [ -f ~/sqllib/db2profile ]; then
. ~/sqllib/db2profile
else
exit 1
fi

# kick out everyone
db2 force applications all

db2 connect to database db1 in exclusive mode
db2 "backup database db1 to /opt/BACKUP"

db2 connect to database db2 in exclusive mode
db2 "backup database db2 online to /opt/BACKUP"

db2 connect to database db3 in exclusive mode
db2 "backup database db3 online to /opt/BACKUP"
What do I have to do to ensure that no one attempts any read/writes to
the database and also, how do I put the database back online?
Blair Adamache wrote:
Have a look at the quiesce command. Normally, it should be as simple as:

db2 force applications all
db2 connect to database <<dbname>> in exclusive mode
db2 backup database......

Note that this is at the database level. Quiesce also works at the
instance level if you have multiple databases in an instance.

Tim B. wrote:

Hello,

I am looking for the proper way to shut down db2 completely so that I
can do a cold back up on all the databases.

Thanks!

----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet
News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World!
>100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via
Encryption =---


----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet
News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000
Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via
Encryption =---


----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---
Nov 12 '05 #7
Jim
Also,

If I simply wanted to back db2 up at a filesystem level, without running db2
commands, how can I get db2 in a state where this is possible? I know this
requires shutting it completely down, but how?

Thanks!
Blair Adamache wrote:
When the backup completes, users can reconnect. You might want to
quiesce each database individually before backing it up - the time from
the start of the first backup to the second allows a large window for
lots of users to reconnect to the 2nd and 3rd databases.

Tim B. wrote:
Thanks for your response. This is the script that I will be running.
Does this sound decent:

#!/bin/bash

# The following three lines have been added by UDB DB2.
if [ -f ~/sqllib/db2profile ]; then
. ~/sqllib/db2profile
else
exit 1
fi

# kick out everyone
db2 force applications all

db2 connect to database db1 in exclusive mode
db2 "backup database db1 to /opt/BACKUP"

db2 connect to database db2 in exclusive mode
db2 "backup database db2 online to /opt/BACKUP"

db2 connect to database db3 in exclusive mode
db2 "backup database db3 online to /opt/BACKUP"
What do I have to do to ensure that no one attempts any read/writes to
the database and also, how do I put the database back online?
Blair Adamache wrote:
Have a look at the quiesce command. Normally, it should be as simple as:

db2 force applications all
db2 connect to database <<dbname>> in exclusive mode
db2 backup database......

Note that this is at the database level. Quiesce also works at the
instance level if you have multiple databases in an instance.

Tim B. wrote:

Hello,

I am looking for the proper way to shut down db2 completely so that I
can do a cold back up on all the databases.

Thanks!

----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet
News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World!
>100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via
Encryption =---


----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet
News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000
Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via
Encryption =---


----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---
Nov 12 '05 #8
"Jim" <jo@hotmail.com> wrote in message
news:10***************@hive.lunargravity.net...
Could you give me some examples on that quiesce command? Someone took my
damn book and I am having trouble coming up with decent documentation on
it.


Web based manuals
http://publib.boulder.ibm.com/infoce...help/index.jsp

PDF Manuals (can be downloaded):
http://www-3.ibm.com/cgi-bin/db2www/...bs.d2w/en_main
(The above link will wrap) Page down to bottom of screen.

Don't leave home without them.
Nov 12 '05 #9
db2stop

Jim wrote:
Also,

If I simply wanted to back db2 up at a filesystem level, without running db2
commands, how can I get db2 in a state where this is possible? I know this
requires shutting it completely down, but how?

Thanks!
Blair Adamache wrote:

When the backup completes, users can reconnect. You might want to
quiesce each database individually before backing it up - the time from
the start of the first backup to the second allows a large window for
lots of users to reconnect to the 2nd and 3rd databases.

Tim B. wrote:

Thanks for your response. This is the script that I will be running.
Does this sound decent:

#!/bin/bash

# The following three lines have been added by UDB DB2.
if [ -f ~/sqllib/db2profile ]; then
. ~/sqllib/db2profile
else
exit 1
fi

# kick out everyone
db2 force applications all

db2 connect to database db1 in exclusive mode
db2 "backup database db1 to /opt/BACKUP"

db2 connect to database db2 in exclusive mode
db2 "backup database db2 online to /opt/BACKUP"

db2 connect to database db3 in exclusive mode
db2 "backup database db3 online to /opt/BACKUP"
What do I have to do to ensure that no one attempts any read/writes to
the database and also, how do I put the database back online?
Blair Adamache wrote:
Have a look at the quiesce command. Normally, it should be as simple as:

db2 force applications all
db2 connect to database <<dbname>> in exclusive mode
db2 backup database......

Note that this is at the database level. Quiesce also works at the
instance level if you have multiple databases in an instance.

Tim B. wrote:
>Hello,
>
>I am looking for the proper way to shut down db2 completely so that I
>can do a cold back up on all the databases.
>
>Thanks!
>
>
>
>----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet
>News==----
>http://www.newsfeed.com The #1 Newsgroup Service in the World!
>
>>100,000 Newsgroups
>
>---= 19 East/West-Coast Specialized Servers - Total Privacy via
>Encryption =---

----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet
News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000
Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via
Encryption =---



----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---


Nov 12 '05 #10
Jim
Oh wow....I thought there was more to it than that. I will be able to
restore all of the data by doing:

#!/bin/bash

db2stop
tar czf /backup/foo.tar.gz /home/db2inst1

^ I know this is simplified but then I could simply untar /home/db2inst1 and
have a working database, correct?

I am acting like a moron and asking dumb questions but just crossing my T's
and dotting my I's. I appreciate your patience with my ignorance.

Blair Adamache wrote:
db2stop

Jim wrote:
Also,

If I simply wanted to back db2 up at a filesystem level, without running
db2
commands, how can I get db2 in a state where this is possible? I know
this requires shutting it completely down, but how?

Thanks!
Blair Adamache wrote:

When the backup completes, users can reconnect. You might want to
quiesce each database individually before backing it up - the time from
the start of the first backup to the second allows a large window for
lots of users to reconnect to the 2nd and 3rd databases.

Tim B. wrote:
Thanks for your response. This is the script that I will be running.
Does this sound decent:

#!/bin/bash

# The following three lines have been added by UDB DB2.
if [ -f ~/sqllib/db2profile ]; then
. ~/sqllib/db2profile
else
exit 1
fi

# kick out everyone
db2 force applications all

db2 connect to database db1 in exclusive mode
db2 "backup database db1 to /opt/BACKUP"

db2 connect to database db2 in exclusive mode
db2 "backup database db2 online to /opt/BACKUP"

db2 connect to database db3 in exclusive mode
db2 "backup database db3 online to /opt/BACKUP"
What do I have to do to ensure that no one attempts any read/writes to
the database and also, how do I put the database back online?
Blair Adamache wrote:
>Have a look at the quiesce command. Normally, it should be as simple
>as:
>
>db2 force applications all
>db2 connect to database <<dbname>> in exclusive mode
>db2 backup database......
>
>Note that this is at the database level. Quiesce also works at the
>instance level if you have multiple databases in an instance.
>
>Tim B. wrote:
>
>
>>Hello,
>>
>>I am looking for the proper way to shut down db2 completely so that I
>>can do a cold back up on all the databases.
>>
>>Thanks!
>>
>>
>>
>>----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet
>>News==----
>>http://www.newsfeed.com The #1 Newsgroup Service in the World!
>>
>>>100,000 Newsgroups
>>
>>---= 19 East/West-Coast Specialized Servers - Total Privacy via
>>Encryption =---
>
>
>
----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet
News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000
Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via
Encryption =---



----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet
News==---- http://www.newsfeed.com The #1 Newsgroup Service in the World!
>100,000 Newsgroups ---= 19 East/West-Coast Specialized Servers - Total

Privacy via Encryption =---


----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---
Nov 12 '05 #11

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

Similar topics

8
2752
by: Jonathan Heath | last post by:
Hi all, I have created an ASP script that enters data into an Access Database. My problem is that I'd like this script to run when the computer is shutdown or the user logs off. I think...
2
20136
by: Asad Khan | last post by:
What is the proper way to start and shutdown a database? I'm asking this because of the following: C:\Program Files\MySQL\afterinstall\bin>mysqld --console 031028 12:25:25 InnoDB: Database was...
0
1886
by: Allan Bredahl | last post by:
Hi All I am trying to construct an application that is able to cancel a machine shutdown, reboot or logoff. And after performing some stuff to perform the original shutdown order :...
3
1189
by: Senthil | last post by:
Hi, I would like to know the code for reboot and shutdown windows xp professional using VB.Net. thanx Senthil
4
18084
by: Chris Tanger | last post by:
Context: C# System.Net.Sockets Socket created with constructor prarmeters Internetwork, Stream and TCP everything else is left at the default parameters and options except linger may be changed...
2
11385
by: Brian Worth | last post by:
I have just upgraded from VB 4.0 to VB .NET 2002. One program under VB 4.0 was able to shut down or restart the (windows XP) machine using a series of API calls. (Getlasterror, GetCurrentProcess,...
1
2393
by: Titeuf | last post by:
Hi, I work under VS2003 and I want to know how get the shutdown reason code ? On msdn nothing found...No api :( Have you an idea ? Thank's
5
17388
by: Phil Tusa | last post by:
Greetings to all .... I have a need to issue a shutdown and/or Restart Windows XP inside my application. Any help or example code would be appreciated! -- Phil
1
1843
by: gaurav92K | last post by:
sir, my pc is not proper shutdown. i turnoff my pc and i get that mouse curser are appear continues but it is not working at that time and the mouse light is on and monitor, cpu is also on. at last i...
0
7002
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
7203
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7379
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5462
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,...
0
4588
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3093
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3081
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1417
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 ...
1
656
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.