Automating Export/Import of 8i db in NT4 [message #72280] |
Thu, 01 May 2003 09:21 |
Noah Pullen
Messages: 7 Registered: May 2003
|
Junior Member |
|
|
First, thank you for this forum and for taking the time to read my question. I am new at being a DBA but will try to ask my question in as a descriptive way a possible.
I thoroughly understand how to export and import my database. I work in a production enviroment that has 3 shifts and seldom get the opportunity to performa a DBdump due to the near round the clock usage and deperately want to learn how to automate this task.
I have moderate experience making batch files but have found that this task is beyond my current skill set and would greatly appreciate it if someone could send me some reference material that I could use to accoplish this task.
I am a staunch do it yourselfer an am not looking for someone to do this for me rather I seek to be under the tutlage of a seasoned vet.
My Goals:
Automate the export using the AT command
Automate the dropping tables that belong to SYSADM ( i have a script to accoplish this called dropsysadm.sql)
Automate the import using the AT command
Thank you in advance
|
|
|
|
Re: Automating Export/Import of 8i db in NT4 [message #72283 is a reply to message #72280] |
Thu, 01 May 2003 12:02 |
Noah Pullen
Messages: 7 Registered: May 2003
|
Junior Member |
|
|
Update: needs lessen.
I have figured out how to get my batch file to kick off the export. After backupexe finishes my cold backups I have it start a .bat file that starts my db's and I use the CALL command to kick off my export.bat file that sets the targeted sid and parfile.
Now I need to know how to kick off my dropsysdba.sql script on my test db prior to running my import.bat.
Thanks in adavnce.
|
|
|
|
|
Re: Automating Export/Import of 8i db in NT4 [message #72291 is a reply to message #72288] |
Fri, 02 May 2003 05:51 |
Noah Pullen
Messages: 7 Registered: May 2003
|
Junior Member |
|
|
Thanks for the update Barbara. I had found that late in the day yesterday and tested it but have since found that I need to connect internal as sysdba.
Is there a way to do this with sqlplus or svrmgrl that would allow me to pass the @script.sql at the same time or am I a reaching for the unattainable here. I have been busily reading tips from different sources but it is hard to find information that fits this specific need.
Being a rookie it is even harder to figure out what sort of latitude one has with this type of cmd line work. Thanks again and have a pleasant weekend.
|
|
|
|
Re: Automating Export/Import of 8i db in NT4 [message #72293 is a reply to message #72292] |
Fri, 02 May 2003 06:35 |
Noah Pullen
Messages: 7 Registered: May 2003
|
Junior Member |
|
|
Excellent. I will give this a try. It seems that you cannot log in with svrmgrl the same you can with sqlplus. By this i mean the sytax that sqlplus uses in such as the examples, such as this sqlplus -s SYS/change_on_install@connect_string @script.sql, you have given. Is that the case, svrmgrl won't take something like this svrmgrl usr/pwd@cnct_strng @sql.sql?
Thanks again for helping me through this.
|
|
|
Re: Automating Export/Import of 8i db in NT4 [message #72296 is a reply to message #72293] |
Fri, 02 May 2003 13:16 |
Noah Pullen
Messages: 7 Registered: May 2003
|
Junior Member |
|
|
I am able to run the script now, many thanks, however I do not think that it has the permissions it needs to execute it properly. this is line 1 which I get a repated error through the script from that says error line 1 as the script processing contiunes.
drop user sysadm cascade;
I f I connect using svrmgrl connect internal as sysdba I do not get the repested error that says error line 1.
Do you have any thoughts as to what could cause this disparity?
Thanks,
NP
|
|
|
Re: Automating Export/Import of 8i db in NT4 [message #72299 is a reply to message #72296] |
Sat, 03 May 2003 01:12 |
|
Barbara Boehmer
Messages: 9101 Registered: November 2002 Location: California, USA
|
Senior Member |
|
|
I don't know. It could be a privileges problem as you suspect. Or, it could be that you receive an error when trying to drop the user because it has already been dropped from a previous run. I would have to see a cut and paste of the whole connection, run, and error messages. I am not sure why you are trying to drop sysadm to begin with. You aren't trying to export SYS objects, are you? I am hoping someone else reading this, who has more experience with this sort of thing, will jump in at this point, and offer some advice.
|
|
|