Oracle DBA Scripts
331 FOLLOWERS
A blog about Oracle DBA Scripts from Montreal (Québec).
Oracle DBA Scripts
4y ago
Running SQL scripts against several Pluggable Databases with SQL*Plus is tedious, because the DBA have to login into every Pluggable Database and run the required script or SQL Statement .
In this article, I’ll show you how to run SQL Statements easily across all Pluggable Databases.
In a container database (CDB) Environment, the Oracle catcon.pl program is used to run a SQL scripts or SQL statements in all PDBS .
Here is the command to execute a script on all PDBS:
$ORACLE_HOME/perl/bin/perl $ORACLE_HOME/rdbms/admin/catcon.pl -u SYS/****AhAhpassword-changed*** -d /export/home/oracle/script ..read more
Oracle DBA Scripts
4y ago
“Can you please add 50 G to/u01 for me?” Many Oracle DBAs or system Admins are nervous about making changes to their Linux systems specially on a ODA (Oracle Database Appliance). ⇒ As you will see it’s very easy!
The default size of 99GB for /u01 may not be sufficient and must be increased to upgrade or patch the ODA with a new bundle.
Indeed, many of the Oracle Engineered Systems (ES), like the ODA use LVM to manage the OS disk space, giving the admin max of flexibility to grow or shrink any file system.
Here is the steps to resize the file system /u01 on a ODA
Verify the actual Situation an ..read more
Oracle DBA Scripts
4y ago
My listener.log file is growing and now it is very big; I have difficulties to open it. What can I do when the listener.log is growing? Indeed, if you delete the LISTENER.LOG, the file will be recreated only after stopping and starting the listener …
I want to archive it without boucing the listener (online operation).
For Oracle < 11g:
# START LSNRCTL UTILITY
$lsnrctl # SET MY CURRENT LISTENER IF IT'S DIFFERENT FROM THE DEFAULT LSNRCTL>
set current_listener LISTENER_APP
# CHANGE LISTENER LOG LOCATION TO ANOTHER FILE
LSNRCTL> set log_file my_temp_listener.log
--> This command ..read more
Oracle DBA Scripts
4y ago
Oracle Real Application clusters (RAC) allows multiple instances to access a single Oracle database. These instances often run on multiple nodes.
The Component Diagram with explanation shows all the components that inter-relate to each other and together make up THE « Oracle RAC architecture« .
RAC is the principal component for the Oracle Grid Architecture. It’s an option to the Oracle Database that provides High Availability (HA) and scalability to the Oracle Database without requiring any application changes.
From a system point of view, a group of independent servers defines a cluster ..read more
Oracle DBA Scripts
4y ago
Maybe you are looking for a particular phrase in log files or maybe you are a programmer and need to find some string that is inside many different code files?
Here is how you can find and replace a string in several text files.
For this example, the Oracle DBA wants to replace strings NSR* in all rman scripts:
#!/usr/bin/ksh
for base in /oracle/scripts/rman/rcv/*.rcv
do
TMP=$(mktemp test.XXXXXX)
sed 's/NSR_SERVER=networker-hme0, NSR_DATA_VOLUME_POOL=BU UNT FULL/NSR_SERVER=freppax-laaf02h, NSR_DATA_VOLUME_POOL=FullHP/g' $base > "$TMP" && mv "$TMP" $base
done
export PS1="\$ORACLE_ ..read more
Oracle DBA Scripts
4y ago
Running SQL scripts against several Pluggable Databases with SQL*Plus is tedious, because the DBA have to login into every Pluggable Database and run the required script or SQL Statement .
In this article, I’ll show you how to run SQL Statements easily across all Pluggable Databases.
In a container database (CDB) Environment, the Oracle catcon.pl program is used to run a SQL scripts or SQL statements in all PDBS .
Here is the command to execute a script on all PDBS:
$ORACLE_HOME/perl/bin/perl $ORACLE_HOME/rdbms/admin/catcon.pl -u SYS/****AhAhpassword-changed*** -d /export/home/oracle/script ..read more
Oracle DBA Scripts
5y ago
“Can you please add 50 G to/u01 for me?” Many Oracle DBAs or system Admins are nervous about making changes to their Linux systems specially on a ODA (Oracle Database Appliance). ⇒ As you will see it’s very easy!
The default size of 99GB for /u01 may not be sufficient and must be increased to upgrade or patch the ODA with a new bundle.
Indeed, many of the Oracle Engineered Systems (ES), like the ODA use LVM to manage the OS disk space, giving the admin max of flexibility to grow or shrink any file system.
Here is the steps to resize the file system /u01 on a ODA
Verify the actual Situation an ..read more
Oracle DBA Scripts
5y ago
My listener.log file is growing and now it is very big; I have difficulties to open it. What can I do when the listener.log is growing? Indeed, if you delete the LISTENER.LOG, the file will be recreated only after stopping and starting the listener …I want to archive it without boucing the listener (online operation).For Oracle < 11g:# START LSNRCTL UTILITY
$lsnrctl # SET MY CURRENT LISTENER IF IT'S DIFFERENT FROM THE DEFAULT LSNRCTL>
set current_listener LISTENER_APP
# CHANGE LISTENER LOG LOCATION TO ANOTHER FILE
LSNRCTL> set log_file my_temp_listener.log
--> This command create ..read more
Oracle DBA Scripts
5y ago
Oracle Real Application clusters (RAC) allows multiple instances to access a single Oracle database. These instances often run on multiple nodes.
The Component Diagram with explanation shows all the components that inter-relate to each other and together make up THE “Oracle RAC architecture“.
RAC is the principal component for the Oracle Grid Architecture. It’s an option to the Oracle Database that provides High Availability (HA) and scalability to the Oracle Database without requiring any application changes.
From a system point of view, a group of independent servers defines a cluster. Th ..read more
Oracle DBA Scripts
5y ago
Maybe you are looking for a particular phrase in log files or maybe you are a programmer and need to find some code that is inside many different code files?
Here is how you can find and replace a string in several text files.
For this example, the Oracle DBA wants to replace strings NSR* in all rman scripts:
#!/usr/bin/ksh
for base in /oracle/scripts/rman/rcv/*.rcv
do
TMP=$(mktemp test.XXXXXX)
sed 's/NSR_SERVER=networker-hme0, NSR_DATA_VOLUME_POOL=BU UNT FULL/NSR_SERVER=freppax-laaf02h, NSR_DATA_VOLUME_POOL=FullHP/g' $base > "$TMP" && mv "$TMP" $base
done
export PS1="\$O ..read more