Operating System - HP-UX
1748123 Members
3273 Online
108758 Solutions
New Discussion юеВ

Re: Wanted: Good oracle scripts.

 
SOLVED
Go to solution
Steven E. Protter
Exalted Contributor

Wanted: Good oracle scripts.

You can submit sql or scripts that submit sql.

10 points for attachments, 5 points for anything longer than 10 lines that isn't an attachement.

Only tested scripts please.

Make sure if your scripts have user id and password in them that you change them please.

Extra points(make it a two post) for any script that can read password out of an encrypted file that only the dba user(usually oracle) has access to. The point of that specific issue is to have scripts that can get password from a file that isn't plain text.

If you recommend some kind of encryption software not found in the OS, please provide a link and detailed installation instructions.

P
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
35 REPLIES 35
Justo Exposito
Esteemed Contributor

Re: Wanted: Good oracle scripts.

Hi,

This is a script to switch the logs to the archive directory in order to backup them.

Regards,

Justo.
Help is a Beatiful word
Justo Exposito
Esteemed Contributor

Re: Wanted: Good oracle scripts.

Hi,

This is the second part needed in order to use the switch script.

Regards,

Justo.
Help is a Beatiful word
Justo Exposito
Esteemed Contributor
Solution

Re: Wanted: Good oracle scripts.

Hi,

This is a script to remove the archive log files that was backed up.

Regards,

Justo.
Help is a Beatiful word
Ian Dennison_1
Honored Contributor

Re: Wanted: Good oracle scripts.

Generates a SQL Script to rebuild the control file from Database SID to Database NEWSID (good for automating the rehosting of a database overnight).

Used for SAP and non-SAP Oracle Database rehosts, well bedded in.

Share and Enjoy! Ian
Building a dumber user
T G Manikandan
Honored Contributor

Re: Wanted: Good oracle scripts.

T G Manikandan
Honored Contributor

Re: Wanted: Good oracle scripts.

Indira Aramandla
Honored Contributor

Re: Wanted: Good oracle scripts.

Attached are the scripts to make a copy of an existing database. Can be used to refresh a warehouse, or make a copy of the database on the same / different server.
Here they are. (Refer attachements)

For more scripts on oracle Database administration please refer this metalink.http://metalink.oracle.com/metalink/plsql/ml2_gui.startup
Never give up, Keep Trying
Yogeeraj_1
Honored Contributor

Re: Wanted: Good oracle scripts.

hi,

Please allow me to contribute the one i like most:

Filename: alerts.ksh
Description: Automatic monitoring of the production database's ALERT LOG file for exceptions.

Running it as the Oracle User, reschedules daily execution of script - morning, evening and night everyday (uses at)

Makes monitoring of the Alert log easy task!

Hope this helps!

Best Regards
Yogeeraj

PS. Don't forget to modify lines:
a. DBA1='myname@mymailserver.mu'
b. SID=pfs

to suit your own enviroment
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
Jean-Luc Oudart
Honored Contributor

Re: Wanted: Good oracle scripts.

The attached script is to be run as the schema owner and list all tables with their record count.
You must set utl_file_dir in your init file.
Change database owner to meet your requirement.

Jean-Luc
fiat lux