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 > DB2 UDB Logretain

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-01-06, 18:53
scricket scricket is offline
Registered User
 
Join Date: Dec 2006
Posts: 7
DB2 UDB Logretain

hi, Everyone

I need some answers regarding DB2 UDB v8.1 Log management. This is our
database cfg file has recently changed to the following setting:

LOGPRIMARY =20
LOGSECOND =40
LOGRETAIN = RECOVERY
USEREXIT = NO
LOGARCHMETH1= DISK :/db2home/DB/archive

It seems that the old log files stays in the active log directory. Will the log files in the active log directory exceed 20? Does the old log files required manaully removal? How do I know which log file is committed and can be removed? Why DB2 has the same log files writting to active log path and the LOGARCHMETH1 location?

Thanks
scricket
Reply With Quote
  #2 (permalink)  
Old 12-02-06, 09:26
guyprzytula guyprzytula is offline
Registered User
 
Join Date: Jun 2006
Posts: 471
log

whenever a log file is commited it should be archived and the current file is removed
it should only be available in the logarchmeth1 location
it used to be like that with userexit : I will check this out..
__________________
Best Regards, Guy Przytula
DB2 UDB LUW certified V6/7/8
Reply With Quote
  #3 (permalink)  
Old 12-02-06, 10:24
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
It looks like "LOGARCHMETH1= DISK :/db2home/DB/archive" has an extra space after DISK. I don't know if that is a problem, but I would change it.
__________________
M. A. Feldman
IBM Certified DBA on DB2 for Linux, UNIX, and Windows
IBM Certified DBA on DB2 for z/OS and OS/390
Reply With Quote
  #4 (permalink)  
Old 12-03-06, 20:45
scricket scricket is offline
Registered User
 
Join Date: Dec 2006
Posts: 7
It is my typo. It is LOGARCHMETH1= DISK:/db2home/DB/archive"
Reply With Quote
  #5 (permalink)  
Old 12-04-06, 05:31
guyprzytula guyprzytula is offline
Registered User
 
Join Date: Jun 2006
Posts: 471
log archive

I tested this on a windows machine and the files are MOVED to archive location and removed from active location
should be so on unix (which is being used ?) and which db2level ?
__________________
Best Regards, Guy Przytula
DB2 UDB LUW certified V6/7/8
Reply With Quote
  #6 (permalink)  
Old 12-04-06, 13:07
scricket scricket is offline
Registered User
 
Join Date: Dec 2006
Posts: 7
It is DB2 v8.1 FixPak 11 version.

Thanks
Reply With Quote
  #7 (permalink)  
Old 12-04-06, 13:36
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
Archived log files are not actually deleted; they are renamed and reused by DB@ when needed, so they may actually sit there in the active log directory for quite a long time, if the activity on the database is low.

Look for "log file allocation" in the manuals.
Reply With Quote
  #8 (permalink)  
Old 12-04-06, 16:19
urs_77 urs_77 is offline
Member
 
Join Date: Jan 2003
Location: Schaumburg, IL
Posts: 79
You should use USEREXIT to archive the logs to a different location automatically. If you want to move them manually, you might want to do the following in UNIX at command line:

db2 "get db cfg for <dbname>" | grep "First active log file"

You may manually archive the logs prior to the log file specified.
__________________
Naveen Urs
DBA Manager
IBM Certified Solutions Expert - DB2 LUW V7, V9
Reply With Quote
  #9 (permalink)  
Old 12-04-06, 21:51
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
Quote:
Originally Posted by urs_77
You should use USEREXIT to archive the logs to a different location automatically.
Starting with DB2 8.2 the following command will automatically archive the logs to the specified path without a user exit program:

LOGARCHMETH1= DISK:/db2home/DB/archive
__________________
M. A. Feldman
IBM Certified DBA on DB2 for Linux, UNIX, and Windows
IBM Certified DBA on DB2 for z/OS and OS/390
Reply With Quote
  #10 (permalink)  
Old 12-06-06, 11:08
matthewlau matthewlau is offline
Member
 
Join Date: Dec 2001
Posts: 78
It is better to use LOGARCHMETH1 instead of userexit on v8 as userexit need to compile the C sample program.
Reply With Quote
  #11 (permalink)  
Old 12-07-06, 18:57
scricket scricket is offline
Registered User
 
Join Date: Dec 2006
Posts: 7
DB2 Admin Client

hi,
Thanks all for all the help.

Now I am trying to configure the db2 admin client on my desktop (window xp)
to access remote DB server(AIX).

I found on the IBM site that I need to catalog tcpcp node using DB2 CLI..
and catalog database ..

Do I need to do the above steps in order to use Control center "Discover" mode?
I also found that there is a instance on the remoter server, did not have node set up. When I type" db list node directory". it returns nothing.
So, does this mean I am able to access the server using control center?

Thanks
scricket
Reply With Quote
  #12 (permalink)  
Old 12-07-06, 19:25
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
Quote:
Originally Posted by scricket
hi,
Thanks all for all the help.

Now I am trying to configure the db2 admin client on my desktop (window xp)
to access remote DB server(AIX).

I found on the IBM site that I need to catalog tcpcp node using DB2 CLI..
and catalog database ..

Do I need to do the above steps in order to use Control center "Discover" mode?
I also found that there is a instance on the remoter server, did not have node set up. When I type" db list node directory". it returns nothing.
So, does this mean I am able to access the server using control center?

Thanks
scricket
You do not have to catalog local databases if you access them from the same server they reside on. But to access them remotely, you need to catalog them on your remote client.

Yes, it is possible that using the "discover" process and walking through the wizard to set up the catalog definitions will work, or it may not work, depending on a number of factors.
__________________
M. A. Feldman
IBM Certified DBA on DB2 for Linux, UNIX, and Windows
IBM Certified DBA on DB2 for z/OS and OS/390
Reply With Quote
  #13 (permalink)  
Old 12-08-06, 16:55
scricket scricket is offline
Registered User
 
Join Date: Dec 2006
Posts: 7
DB2 Admin Client

hi,

I try using CA ( Configuration Assistant) to add database using Wizard.
But it did not work for some instances. Becuase these instances did not have node directory set up. How do I set the node directory?
Is there a db2 command that can tell me which node does a database belog to? becuase when I try to catalog database I need to know the node-name.

Thanks
Reply With Quote
  #14 (permalink)  
Old 12-08-06, 19:52
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
Use the "add database wizard," then select "search the network" and hit NEXT. At that point you can select "add system" and "discover" to see a list of DB2 servers on your network (this may not find all DB2 servers). If discover does not work, you will have to manually input the information for the DB2 server you are trying to reach.

Hit the help button if you need assistance with the wizard.
__________________
M. A. Feldman
IBM Certified DBA on DB2 for Linux, UNIX, and Windows
IBM Certified DBA on DB2 for z/OS and OS/390
Reply With Quote
  #15 (permalink)  
Old 12-09-06, 03:00
guyprzytula guyprzytula is offline
Registered User
 
Join Date: Jun 2006
Posts: 471
node

the command is :
db2 catalog tcpip node anyname remote hostname/ipaddress server port
for anyname : choose any name
for hostname/ipaddress : specify or the target hostname or its ip address
for port : specify the port number the instance is listening
see db2 get dbm cfg | grep SVCENAME
with this name check the c:\windows\system32\drivers\etc\services file
and find the port number
then catalog db at node anyname (same name as used in previous command)
or use control center : this will also catalog the admin server for this server
__________________
Best Regards, Guy Przytula
DB2 UDB LUW certified V6/7/8
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