- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Oracle Hot backup help
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-23-2004 08:07 PM
тАО05-23-2004 08:07 PM
I have requirment to take oracle hot backups in my database server. Let me clarify the situation.
I have all the database backup scripts those works fine through oracle user. However I need to provide this backup taking operation to system backup user. ( the backup user has all the root sys permission, but no shell - goes directly to the backup menu.(shell script)).
I find problem in executing the hot backup through this backup user.
In my backup script I use "su oracle" to login to oracle and in sqlplus to execute
SQL> !find /u02/....../xxx.dbf
kind of shell command.
Any one has any idea why these fails.(I think this happens because backup user doesn't have a shell to execute)
OR
Is there any other way to get it done. (without directly login to oracle, b'cause I cannot provide oracle password to operational staff)
Thnx.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-23-2004 08:14 PM
тАО05-23-2004 08:14 PM
Re: Oracle Hot backup help
hope the sudo utility would eliminate all your problems
with best wishes
Naveej
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-23-2004 08:21 PM
тАО05-23-2004 08:21 PM
Re: Oracle Hot backup help
su - oracle
which would set the environment of the oracle user OR
su - oracle -c
The above would also work with the command executed with the oracle user environment.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-23-2004 08:21 PM
тАО05-23-2004 08:21 PM
Re: Oracle Hot backup help
1. Put db in hotbackup mode --- run by oracle
2. Run backup on database files == run by root
3. Put db in to "END backup" mode -- oracle user
We do it this way as it is easy to manage and trouble shoot
As naveej said u may use sudo or setuid to execute things with a higher prevg (eg. root).
Regds,
Kaps
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-23-2004 08:23 PM
тАО05-23-2004 08:23 PM
Re: Oracle Hot backup help
If you are not to modify the script,then try including the backup user into the dba group.
But make sure that including the user to the dba group should make him the database owner!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-23-2004 08:40 PM
тАО05-23-2004 08:40 PM
Re: Oracle Hot backup help
select name from v$datafile;
select name from v$tempfile;
select name from v$controlfile;
select member from v$logfile;
of course for a hot backup you don't care where the logfiles and tempfiles are.
HTH
Duncan
I am an HPE Employee
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-23-2004 08:51 PM
тАО05-23-2004 08:51 PM
SolutionWhy you don't create a shell script scheduled in cron to run by oracle user?
You can create it like this (backup.sh):
ORA_ENVFILE="/discn/.../
DB_NAME="
ORACLE_SID="
export ORACLE_SID
svrmgrl << EOT
connect as sysdba;
host 'cp...'; -- here you do your hot backup
quit
EOT
exit 0
Create the script you will schedule (oracle.tmp):
# to run every day except on monday (1)
# at 03:00 AM
00 03 * * 0 $HOME/.../backup.sh
00 03 * * 2 $HOME/.../backup.sh
00 03 * * 3 $HOME/.../backup.sh
00 03 * * 4 $HOME/.../backup.sh
00 03 * * 5 $HOME/.../backup.sh
00 03 * * 6 $HOME/.../backup.sh
And schedule it as the oracle user:
$crontab oracle.tmp
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-23-2004 09:31 PM
тАО05-23-2004 09:31 PM
Re: Oracle Hot backup help
you need to do below command before taking the copy of datafile.
alter tablespace
and after the copy , you need to do alter tablespace
cheers :-)
so it should be like below :
svrmgrl << EOT
connect as sysdba;
alter tablespace
host 'cp...'; -- here you do your hot backup
alter tablespace
quit
EOT
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-23-2004 10:38 PM
тАО05-23-2004 10:38 PM
Re: Oracle Hot backup help
As suggested in the previous posts, i would advise that you use "su - oracle" as against "su oracle".
This is because, "su - oracle" will setup the user environment thats required in this case.
This should get you running
regards
Mobeen
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-24-2004 02:06 AM
тАО05-24-2004 02:06 AM