Taking a backup in batches [message #334280] |
Wed, 16 July 2008 01:21 |
manoj12
Messages: 210 Registered: March 2008 Location: India
|
Senior Member |
|
|
Dear Sir
I have 20 users into my database.Now I wanted to create a batch file that will help me to take the backup of each user and will be generating individual dump for each user as well as log file at one shot.Could you please tell me how to do that?
Regards
[Updated on: Wed, 16 July 2008 01:22] Report message to a moderator
|
|
|
|
Re: Taking a backup in batches [message #334285 is a reply to message #334281] |
Wed, 16 July 2008 01:40 |
manoj12
Messages: 210 Registered: March 2008 Location: India
|
Senior Member |
|
|
Dear Sir
This is what the script I have written
exp &username/&pasword@manoj_test file=userid_sysdate.dmp log=userid_sysdate.log
This command I have saved with .bat extension
The file has been saved.But I dont want it should again and again the username from me
Now I dont want It should ask again and again the user name.I wanted to take this backup in one shot.Any help sir
Regards
|
|
|
|
Re: Taking a backup in batches [message #334329 is a reply to message #334306] |
Wed, 16 July 2008 03:56 |
manoj12
Messages: 210 Registered: March 2008 Location: India
|
Senior Member |
|
|
Dear Sir
I have tested it.But it is asking me for the username and password again and again.I dont want username and password to write each and every time for each and every user.But I can do one thing.I can write a script like this
Quote: |
for e.g
Suppose there three users manoj_test,manoj_dev,proposal_user with host string as manoj_test
Now I wanted to create a batch file.What I will do is I will write the below scripts in a notepad and save this script on a respective path with .bat extension like
exp manoj_test/manoj_test@manoj_test file=manoj_test_manoj_test_%bakdate.dmp log=manoj_test_manoj_test_%bakdate.log
exp manoj_dev/manoj_dev@manoj_test file=manoj_Dev_manoj_test_%bakdate.dmp log=manoj_dev_manoj_test_%bakdate.log
exp proposal_user/proposal_user@manoj_test file=proposal_user_manoj_test_%bakdate.dmp log=proposal_user_manoj_test_%bakdate.log
and then run the script
This is one way we can do.
|
Is there any other easiest method that oracle suggests?.Also This thing is not at all generating log file.?
[Updated on: Wed, 16 July 2008 04:39] by Moderator Report message to a moderator
|
|
|
|
Re: Taking a backup in batches [message #334353 is a reply to message #334342] |
Wed, 16 July 2008 05:02 |
manoj12
Messages: 210 Registered: March 2008 Location: India
|
Senior Member |
|
|
Dear Sir
Do you think by running this query will help me to take the back up activity.The select statement will only retrieve the output in this ' ' format.But I wanted a dump of all the 20 users in one shot.How I should do it.This was the first method I suggested.What about the second method.As per Michel Mail provided it will only select the statement mention in singles cotes.But How to take a dump for all the 20 users in one shot.Any Help please.
Regards
|
|
|
|
Re: Taking a backup in batches [message #334437 is a reply to message #334353] |
Wed, 16 July 2008 08:16 |
joy_division
Messages: 4963 Registered: February 2005 Location: East Coast USA
|
Senior Member |
|
|
manoj12 wrote on Wed, 16 July 2008 06:02 | Dear Sir
Do you think by running this query will help me to take the back up activity.
|
Yes, I believe it is called adaptive reasoning.
|
|
|