If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > stopping individual databases

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-12-05, 04:56
arpoodle arpoodle is offline
Registered User
 
Join Date: Sep 2004
Posts: 64
Unhappy stopping individual databases

Apologies for the relative newbieness of this post

I'm new to DB2, having used mainly Oracle and MySQL before, but have been landed with a DB2 database to administer since i'm the "database guy".

Running V7 something on Solaris, we have 5 production databases within a single instance, and due to lack of knowledge, haven't been getting backed up for a LONG time.

I've been playing with the developer edition on my workstation, and have sorted out the LOGRETAIN and USEREXIT stuff, but my question is, can I stop an individual database, to perform an offline backup, prior to restarting with the updated config and setting up a cron for online backups?

If ym understanding is right, "db2stop" seems to stop the entire instance, which I'm not keen to do.

According to this page:
http://publib.boulder.ibm.com/infoce...db2.doc.admin/
there's a "STOP DATABASE" command, but I get the following error when trying to issue that for the specific database.


db2 => STOP DATABASE testdb2
SQL0104N An unexpected token "testdb2" was found following "DATABASE".
Expected tokens may include: "MANAGER". SQLSTATE=42601
db2 =>

Many thanks for any light you can shed on this.

Regards
Andrew
Reply With Quote
  #2 (permalink)  
Old 01-12-05, 06:39
JAYANTA_DATTA JAYANTA_DATTA is offline
Registered User
 
Join Date: Oct 2004
Location: DELHI INDIA
Posts: 336
Thumbs up Disconnection of Database

Hi,

You donot need to stop the database to take offline backup. Just disconnect all the application connected to that database and then take the offline backup. It would do your job.


Jayanta, Xansa India
Reply With Quote
  #3 (permalink)  
Old 01-12-05, 06:51
arpoodle arpoodle is offline
Registered User
 
Join Date: Sep 2004
Posts: 64
Quote:
Originally Posted by JAYANTA_DATTA
Hi,

You donot need to stop the database to take offline backup. Just disconnect all the application connected to that database and then take the offline backup. It would do your job.


Jayanta, Xansa India
Simply disconnecting the applications wont allow the the

db2 "update database configuration for [database name] using logretain on"
db2 "update database configuration for [database name] using userexit on"

to take effect will it??

I also need to ensure these config changes come into play.

Thanks

a
Reply With Quote
  #4 (permalink)  
Old 01-12-05, 08:51
JAYANTA_DATTA JAYANTA_DATTA is offline
Registered User
 
Join Date: Oct 2004
Location: DELHI INDIA
Posts: 336
You need to enable Logretain and UserExit in case you are taking ONLINE backup. In case of offline backup you donot need to look into this.

Jayanta
Xansa India
Reply With Quote
  #5 (permalink)  
Old 01-12-05, 09:01
arpoodle arpoodle is offline
Registered User
 
Join Date: Sep 2004
Posts: 64
Quote:
Originally Posted by JAYANTA_DATTA
You need to enable Logretain and UserExit in case you are taking ONLINE backup. In case of offline backup you donot need to look into this.

Jayanta
Xansa India
I want to do an oflinebackup. prior to restarting the system.

Once it's restarted I want online backups to be used.

This is why I need to restart the databases, to alow the configurtaion chages to logretain and userexit to take effect.

I suppose I could just run offline backups at low load times, since this system is due to be replaced, and I don't want to spend too long on it.

Would there be any advantage to using online over offline backups? or woud I be as well to just use offline's for the time being?

thanks

a
Reply With Quote
  #6 (permalink)  
Old 01-12-05, 09:32
cchattoraj cchattoraj is offline
Registered User
 
Join Date: Mar 2003
Posts: 343
Disconnect all applications from the database.

If the database was specifically activated, then deactivate the database. Then run an offline backup.

To check whether the database remains active after disconnecting all applications, issue a

db2 list active databases

Hope this helps.
Reply With Quote
  #7 (permalink)  
Old 01-12-05, 10:17
Tank Tank is offline
Registered User
 
Join Date: Feb 2004
Location: Copenhagen
Posts: 220
just run:

db2 "quiesce db immediate force connections"

db2 "connect reset"

then do the backuo and ypu will be in the cvlear
__________________
Kristian K. Hansen
Project Supervisor
National Board of Health
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On