DBA Hub

📋Steps in this guide1/6

utPLSQL Installation and Upgrade

This article demonstrates the installation and upgrade of the utPLSQL unit test framework for PL/SQL.

oracle miscconfigurationintermediate
by OracleDba
16 views
1

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". 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 .

Code/Command (click line numbers to comment):

1
2
3
cd /u01/software
unzip utPLSQL.zip
cd utPLSQL/source
2

Install in a PDB

Amend the environment variables are required for your installation.

Code/Command (click line numbers to comment):

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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
3

Install in a Non-CDB

Amend the environment variables are required for your installation.

Code/Command (click line numbers to comment):

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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
4

Remove From a PDB

Amend the environment variables are required for your installation.

Code/Command (click line numbers to comment):

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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
5

Remove From a Non-CDB

Amend the environment variables are required for your installation.

Code/Command (click line numbers to comment):

1
2
3
4
5
6
7
8
9
10
11
12
13
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
6

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: - utPLSQL Installation Guide Hope this helps. Regards Tim...

Comments (0)

Please to add comments

No comments yet. Be the first to comment!