Home » RDBMS Server » Server Administration » how to use catcon with username parameters (19.0.0 windows 2016)
how to use catcon with username parameters [message #679678] Mon, 16 March 2020 01:56 Go to next message
juniordbanewbie
Messages: 250
Registered: April 2014
Senior Member
Dear all,

the following perl catcon command runs successfully

D:\app\oracle\product\19.0.0\dbhome_1\perl\bin\perl.exe D:\app\oracle\product\19.0.0\dbhome_1\rdbms\admin\catcon.pl -d K:\db_upgrade\database\scripts\statspack\baseline\list_statspack_baseline -l K:\db_upgrade\database\scripts\statspack\baseline\list_statspack_baseline\log -b zcdb_20200316_1300 -e -s -c 'zorcl' -g  -- --x"SELECT SYS_CONTEXT('USERENV', 'CON_NAME') FROM dual"
but if i add in the -u username parameter it fails

[code]

D:\app\oracle\product\19.0.0\dbhome_1\perl\bin\perl.exe D:\app\oracle\product\19.0.0\dbhome_1\rdbms\admin\catcon.pl --int_usr "perfstat" -d K:\db_upgrade\database\scripts\statspack\baseline\list_statspack_baseline -l K:\db_upgrade\database\scripts\statspack\baseline\list_statspack_baseline\log -b zcdb_20200316_1305 -e -s -c 'zorcl' -g -- --x"SELECT SYS_CONTEXT('USERENV', 'CON_NAME') FROM dual"
[/code'


the part of zcdb_20200316_1305_catcon_11772.lst is as folow:



2020-03-16 13:15:45 DEBUG> D:\app\oracle\product\19.0.0\dbhome_1\rdbms\admin\/catcon.pm:1186 catcon::exec_DB_script - line does not match marker: @ZAN-ORA02DV >set newpage 1#LF#


2020-03-16 13:15:45 DEBUG> D:\app\oracle\product\19.0.0\dbhome_1\rdbms\admin\/catcon.pm:1186 catcon::exec_DB_script - line does not match marker: set pagesize 14#LF#


2020-03-16 13:15:45 DEBUG> D:\app\oracle\product\19.0.0\dbhome_1\rdbms\admin\/catcon.pm:1186 catcon::exec_DB_script - line does not match marker: CONNECT


2020-03-16 13:15:49 DEBUG> D:\app\oracle\product\19.0.0\dbhome_1\rdbms\admin\/catcon.pm:1186 catcon::exec_DB_script - line does not match marker: ERROR:


2020-03-16 13:15:49 DEBUG> D:\app\oracle\product\19.0.0\dbhome_1\rdbms\admin\/catcon.pm:1186 catcon::exec_DB_script - line does not match marker: ORA-01017: invalid username/password; logon denied

zcdb_20200316_1305_catcon_11772.lst
i have test the following connection and it works


sqlpus perfstat/*****@localhost/zorcl
is there any thing I'm missing? it quite obvious that perfstat username is not even used in the catcon connection


many thanks
Re: how to use catcon with username parameters [message #679679 is a reply to message #679678] Mon, 16 March 2020 02:05 Go to previous messageGo to next message
John Watson
Messages: 8922
Registered: January 2010
Location: Global Village
Senior Member
You have provided "perfstat" which can work only if PERFSTAT is actually a lower case name. It probably isn't. Without the double quotes, SQL*Plus will convert it.
Re: how to use catcon with username parameters [message #679703 is a reply to message #679679] Tue, 17 March 2020 20:55 Go to previous message
juniordbanewbie
Messages: 250
Registered: April 2014
Senior Member
Dear John,

this works as user system

D:\app\oracle\product\19.0.0\dbhome_1\perl\bin\perl.exe D:\app\oracle\product\19.0.0\dbhome_1\rdbms\admin\catcon.pl -d K:\db_upgrade\database\scripts\statspack\baseline\list_statspack_baseline -l K:\db_upgrade\database\scripts\statspack\baseline\list_statspack_baseline\log -b zcdb_20200318_0909 -e -s -u system -c 'ZORCL' -g  -- --x"SELECT SYS_CONTEXT('USERENV', 'CON_NAME') FROM dual"
this does not works as user perfstat
D:\app\oracle\product\19.0.0\dbhome_1\perl\bin\perl.exe D:\app\oracle\product\19.0.0\dbhome_1\rdbms\admin\catcon.pl -d K:\db_upgrade\database\scripts\statspack\baseline\list_statspack_baseline -l K:\db_upgrade\database\scripts\statspack\baseline\list_statspack_baseline\log -b zcdb_20200318_1002 -e -s -u PERFSTAT -c 'ZORCL' -g  -- --x"SELECT SYS_CONTEXT('USERENV', 'CON_NAME') FROM dual"

https://docs.oracle.com/en/database/oracle/oracle-database/19/multi/administering-a-cdb-with-sql-plus.html#GUID-98F9A223-DE19-498B-80 82-3A814F147D1F

Quote:


Specifies the user name and password to connect to the root and the specified PDBs. Specify a common user with the required privileges to run the SQL script or the SQL statement.
partial generated lst file for user system


2020-03-18 09:09:44 DEBUG> D:\app\oracle\product\19.0.0\dbhome_1\rdbms\admin\/catcon.pm:12475 catcon::catconInit2 -                       ScriptUser = system/########
partial generated lst file for user perfstat

zcdb_20200318_1002_catcon_6444.lst
2020-03-18 10:03:05 DEBUG> D:\app\oracle\product\19.0.0\dbhome_1\rdbms\admin\/catcon.pm:1186 catcon::exec_DB_script - line does not match marker: ORA-01017: invalid username/password; logon denied

it seems to be is that i need to create a common user before I can use perl catcon?

https://docs.oracle.com/database/121/ADMQS/GUID-DA54EBE5-43EF-4B09-B8CC-FAABA335FBB8.htm

Quote:

The name of every user-created common user must begin with the characters c## or C##. (Oracle-supplied common user names do not have this restriction.)

please correct me if I'm wrong, I need to create a common user called c##perfstat in order for the above execution to be successful.

many thanks
Previous Topic: How many transaction taken place in given time
Next Topic: Actualizar vista v$database_block_corruption; (merged)
Goto Forum:
  


Current Time: Thu Mar 28 04:37:35 CDT 2024