8i | 9i | 10g | 11g | 12c | 13c | 18c | 19c | 21c | 23c | Misc | PL/SQL | SQL | RAC | WebLogic | Linux
utPLSQL Installation and Upgrade
This article demonstrates the installation and upgrade of the utPLSQL unit test framework for PL/SQL.
Download
Always pick the latest version. You can download it from here.
Copy software to server. The examples below assume it is in "/u01/software".
cd /u01/software unzip utPLSQL.zip cd utPLSQL/source
All subsequent operations assume we are already in this directory. They also assume we need a shared installation, available for all users in the database. If your requirements are different, you will need to check out the utPLSQL Installation Guide.
Install in a PDB
Amend the environment variables are required for your installation.
export PDB_NAME=pdb1 export ORACLE_SID=cdb1 export USERNAME=ut export PASSWORD=myUtPassword123 export ORAENV_ASK=NO . oraenv export ORAENV_ASK=YES sqlplus / as sysdba <<EOF alter session set container = ${PDB_NAME}; -- Comment out the following line if you are reusing an existing user. @create_utplsql_owner.sql ${USERNAME} ${PASSWORD} users @install.sql ${USERNAME} @create_synonyms_and_grants_for_public.sql ${USERNAME} exit; EOF
Install in a Non-CDB
Amend the environment variables are required for your installation.
export ORACLE_SID=orcl export USERNAME=ut export PASSWORD=myUtPassword123 export ORAENV_ASK=NO . oraenv export ORAENV_ASK=YES sqlplus / as sysdba <<EOF -- Comment out the following line if you are reusing an existing user. @create_utplsql_owner.sql ${USERNAME} ${PASSWORD} users @install.sql ${USERNAME} @create_synonyms_and_grants_for_public.sql ${USERNAME} exit; EOF
Remove From a PDB
Amend the environment variables are required for your installation.
export PDB_NAME=pdb1 export ORACLE_SID=cdb1 export USERNAME=ut export ORAENV_ASK=NO . oraenv export ORAENV_ASK=YES sqlplus / as sysdba <<EOF alter session set container = ${PDB_NAME}; @uninstall.sql ${USERNAME} -- Uncomment the following line if you want to drop the user. --DROP USER ${USERNAME} CASCADE; exit; EOF
Remove From a Non-CDB
Amend the environment variables are required for your installation.
export ORACLE_SID=orcl export USERNAME=ut export ORAENV_ASK=NO . oraenv export ORAENV_ASK=YES sqlplus / as sysdba <<EOF @uninstall.sql ${USERNAME} -- Uncomment the following line if you want to drop the user. --DROP USER ${USERNAME} CASCADE; exit; EOF
Upgrade
utPLSQL doesn't have a conventional upgrade. Instead, you remove the old version and install the new version, as described above.
For more information see:
Hope this helps. Regards Tim...