473,836 Members | 1,479 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
10 13511
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,00 0 Newsgroups
>>
>>---= 19 East/West-Coast Specialized Servers - Total Privacy via
>>Encryptio n =---
>
>
>
----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet
News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000
Newsgroup s
---= 19 East/West-Coast Specialized Servers - Total Privacy via
Encryptio n =---



----== 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
2771
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 this would be simple enough if the ASP didn't have any user input, but it does.
2
20159
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 not shut down normally. InnoDB: Starting recovery from log files... InnoDB: Starting log scan based on checkpoint at InnoDB: log sequence number 0 176672 InnoDB: Doing recovery: scanned up to log sequence number 0 176672 031028 12:25:26 InnoDB:...
0
1911
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 : Shutdown/reboot/logoff. I have tried this : AddHandler Microsoft.Win32.SystemEvents.SessionEnding, AddressOf
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
18143
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 as I find appropriate. I am using the socket asynchronously by calling the BeingSend and BeginReceive calls. I would like to be able to call shutdown and close asynchronously if possible.
2
11420
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, OpenProcessToken, LookupPrivilegeValue, AdjustTokenPrivilegese, ExitWindowsEx. I am trying to avoid using any API calls if possible and to use managed code instead. I couldn't find any easy way of doing this but searching the Internet with...
1
2425
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
17415
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
1860
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 switch off main supply for shutdown pc. what is this problem ? i think that window may be corrupted at any time because it is not proper shutdown. so please give the good idea to get rid of this problem. thanks....
0
9813
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9665
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10541
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10584
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9367
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5645
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5817
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4446
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 we have to send another system
2
4006
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.