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 > Offline Backup

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-07-05, 11:16
ted_smith ted_smith is offline
Registered User
 
Join Date: Sep 2004
Posts: 12
Offline Backup

DB2 8.1 fixpack 4
CM 8.2 fixpack 2
Solaris 8

I started running an offline backup on Sundays at 2030hrs.......nobody is using the system at that time. While I'm actually getting the backup to work, I AM getting an error when trying to stop and start the Library Service monitor. I run a cronjob as root when doing this.

/etc/rc.cmlsproc[54]: whoami: not found
/etc/rc.cmlsproc: ERROR!!! Only root or icmadmin can execute this "-shutdown" option

/etc/rc.cmlsproc[54]: whoami: not found
/etc/rc.cmlsproc: ERROR!!! Only root or icmadmin can launch the CM monitor daemon!

Here is the script:

echo "Starting db2 backup script at: "`date`

/opt/WebSphere/AppServer/bin/stopServer.sh eClient_Server;
/opt/WebSphere/AppServer/bin/stopServer.sh icmrm;

su - icmadmin -c "/etc/rc.cmlsproc -shutdown"
su - db2inst1 -c "db2stop force"
su - db2inst1 -c "db2start"

su - db2inst1 -c "db2 backup database icmpcodb to /icm/dbbackup/offline"
su - db2inst1 -c "db2 backup database rmpcodb1 to /icm/dbbackup/offline"

su - icmadmin -c "/etc/rc.cmlsproc"
/opt/WebSphere/AppServer/bin/startServer.sh icmrm;
/opt/WebSphere/AppServer/bin/startServer.sh eClient_Server;


echo "Done with db2 backup script at: "`date`
echo "********************************************* *"


Any help would be greatly appreciated.


Ted
Reply With Quote
  #2 (permalink)  
Old 02-07-05, 11:26
quigleyd quigleyd is offline
Registered User
 
Join Date: Nov 2002
Location: Delaware
Posts: 186
WHy not just to a force applications all before you start the back and wait about 30 seconds to see if you can do it. The other option is to revoke all access to the database except for your id that runs the backup then force application all then backup, You might also want to look at the quisce command and see if that will work for you.


Your error looks like a permission problem, make sure the profile that the user uses to log in is being called in the script


Do a seach on backups in this section and you'll see lots of suggestions.

hope this helps
__________________
David Quigley
Reply With Quote
  #3 (permalink)  
Old 02-07-05, 13:43
ted_smith ted_smith is offline
Registered User
 
Join Date: Sep 2004
Posts: 12
Quote:
Originally Posted by quigleyd
Your error looks like a permission problem, make sure the profile that the user uses to log in is being called in the script.

hope this helps
Thanks for the reply David:

The user in this case is root running one of it's own cron jobs. I'm confused as to why root wouldn't be able to run ANY script w/o the error. It even says you have to be root or icmadmin. I will look through the other posts to see if I can glean anything.

Ted
Reply With Quote
  #4 (permalink)  
Old 02-07-05, 15:51
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
Quote:
Originally Posted by ted_smith
I will look through the other posts to see if I can glean anything.
I would first look at this line here:
Quote:
/etc/rc.cmlsproc[54]: whoami: not found
whoami is not installed on your system, or it's not in the path, so /etc/rc.cmlsproc is failing.
Reply With Quote
  #5 (permalink)  
Old 02-07-05, 16:57
bmujeeb bmujeeb is offline
Registered User
 
Join Date: Mar 2004
Posts: 448
What I am seeing ..

You become that user... not root.

su - icmadmin -c "/etc/rc.cmlsproc -shutdown"

For icmadmin user, is that user has whoami in its path to verify its identity,
check the script by running at the
command prompt.

regards

Mujeeb
Reply With Quote
  #6 (permalink)  
Old 02-09-05, 16:28
ted_smith ted_smith is offline
Registered User
 
Join Date: Sep 2004
Posts: 12
Thanks for the help you guys.

whoami is a /usr/ucb command and wasn't in /etc/profile. I opted to put it at the end instead of doing it by user.

From the Admin Guide:

The examples in this book are for a basic SunOS software installation without the
Binary Compatibility Package installed and without /usr/ucb in the path.


Caution - If /usr/ucb is included in a search path, it should always be at the end
of the search path. Commands like ps or df are duplicated in /usr/ucb with
different formats and options from the SunOS commands.


Problem fixed............
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