Home » RDBMS Server » Server Administration » Is it advisable to prepare catupgrd script for upgrading database (11.2.0.1, Oracle Linux 5.8)
Is it advisable to prepare catupgrd script for upgrading database [message #646897] Thu, 14 January 2016 01:52 Go to next message
juniordbanewbie
Messages: 201
Registered: April 2014
Senior Member
Dear all,

as I preparing to upgrade a 1 TB 11..20.1 to 11.2.0.4 database, Is it advisable to prepare catupgrd script for upgrading database

here's my bash script


current_user="$(/usr/bin/whoami)"
#echo "\$current_user $current_user"
HOME="/home/${current_user}"
#echo "\$HOME $HOME"
export DB_BASE="/u01/app/${current_user}"
#echo "\$DB_BASE $DB_BASE"
export DB_HOME="${DB_BASE}/product/11.2.0.4/dbhome_1"
#echo "\$DB_HOME $DB_HOME"


export ORACLE_HOME="${DB_HOME}"


export log_datetime="$(date +'%Y%m%d_%H%M%S')"
#echo "log_datetime ${log_datetime}"
export ORACLE_UNQNAME="nowatzki"
export ORACLE_SID="${ORACLE_UNQNAME}"

#echo "\$ORACLE_UNQNAME $ORACLE_UNQNAME"

export sqlplus_script_loc="${HOME}/scripts/upgrade_db"
export sqlplus_script_log_loc="${sqlplus_script_loc}/log"

export sqlplus_prefix="catupgrd_main"
export sqlplus_suffix="sql"
export sqlplus_script="${sqlplus_prefix}.${sqlplus_suffix}"
export sqlplus_script_fp="${sqlplus_script_loc}/${sqlplus_script}"


export sqlplus_script_log_suffix="log"
export sqlplus_script_log_prefix="${sqlplus_prefix}_${log_datetime}.${sqlplus_script_log_suffix}"
#echo "\$sqlplus_script_log_prefix $sqlplus_script_log_prefix"
export sqlplus_script_log_fp="${sqlplus_script_log_loc}/${sqlplus_script_log_prefix}"


$ORACLE_HOME/bin/sqlplus / as sysdba @"${sqlplus_script_fp}" ${sqlplus_script_log_fp}



here's my sql script

SPOOL &1

SET ECHO ON

SELECT sys_context('userenv','sid') FROM dual;

@?/rdbms/admin/catupgrd.sql;

SET ECHO OFF

SPOOL OFF

exit




Of course I will need to do the preparation work like ensuring a backup of the database and running preupgrade script

The reason why I'm asking is that I don't have a dedicated vnc connection and it's going to take a long time to upgrade.

thanks and many thanks
Re: Is it advisable to prepare catupgrd script for upgrading database [message #646908 is a reply to message #646897] Thu, 14 January 2016 07:10 Go to previous messageGo to next message
EdStevens
Messages: 902
Registered: September 2013
Senior Member
That's an awful lot of shell script just to run catupgrd.sql Why are you bothering with all of those environment variables for a one-off script?

Aside from that, I really don't understand your problem. You say you don't have a "dedicated vnc" connection. So how are you connecting to the server to run your upgrade? Why your concern over catupgrd vs the other upgrade steps? What do you consider "a long time"? And what benchmarking have you done in test to see how long a "long time" really is?

Re: Is it advisable to prepare catupgrd script for upgrading database [message #646909 is a reply to message #646908] Thu, 14 January 2016 07:14 Go to previous messageGo to next message
ThomasG
Messages: 3205
Registered: April 2005
Location: Heilbronn, Germany
Senior Member
A tip maybe on the "connection":

When I run stuff on remote servers via SSH in sessions that might get disconnected I usually run them in a screen session.
Re: Is it advisable to prepare catupgrd script for upgrading database [message #646929 is a reply to message #646908] Thu, 14 January 2016 21:06 Go to previous messageGo to next message
juniordbanewbie
Messages: 201
Registered: April 2014
Senior Member
I have a vpn connection. but vpn connection get disconnected after period of inactivity.

catupgrd is the longest process.

it is not a problem in small db, but i presumed runing catupgrd in 1 TB might be a problem

thanks
Re: Is it advisable to prepare catupgrd script for upgrading database [message #646930 is a reply to message #646929] Thu, 14 January 2016 21:18 Go to previous messageGo to next message
BlackSwan
Messages: 25859
Registered: January 2009
Location: SoCal
Senior Member
>I have a vpn connection. but vpn connection get disconnected after period of inactivity.

problem is external to the database.
somebody needs to find & fix the basic networking problem
Oracle is the victim; not the culprit.
Re: Is it advisable to prepare catupgrd script for upgrading database [message #646960 is a reply to message #646929] Fri, 15 January 2016 06:42 Go to previous messageGo to next message
EdStevens
Messages: 902
Registered: September 2013
Senior Member
juniordbanewbie wrote on Thu, 14 January 2016 21:06
I have a vpn connection. but vpn connection get disconnected after period of inactivity.

catupgrd is the longest process.

it is not a problem in small db, but i presumed runing catupgrd in 1 TB might be a problem

thanks


The size of the db doesn't make much difference. those scripts are just touching the data dictionary, not the user data.


Why not submit the script with nohup, so that it runs detached from your session?
Re: Is it advisable to prepare catupgrd script for upgrading database [message #646990 is a reply to message #646960] Sat, 16 January 2016 09:11 Go to previous messageGo to next message
juniordbanewbie
Messages: 201
Registered: April 2014
Senior Member
does u mean


nohup catupgrad_main.sh &



or something else? thanks

[Updated on: Sat, 16 January 2016 09:12]

Report message to a moderator

Re: Is it advisable to prepare catupgrd script for upgrading database [message #646997 is a reply to message #646990] Sun, 17 January 2016 07:57 Go to previous message
EdStevens
Messages: 902
Registered: September 2013
Senior Member
Yes
Previous Topic: Estimator tool that converts oracle data types to disk storage required
Next Topic: Utilization of sessions parameters in RAC HP-UNIX server
Goto Forum:
  


Current Time: Sun Feb 25 14:22:35 CST 2018

Total time taken to generate the page: 0.02682 seconds