cancel
Showing results for 
Search instead for 
Did you mean: 

Gathering statistics with brconnect using SSFS doesn't work

symon_braunbaer
Participant
0 Kudos

Dear Experts,

I am having the following error:

% brconnect -u // -c -f stats -t system_stats

BR0801I BRCONNECT 7.40 (15)

BR0805I Start of BRCONNECT processing: ceqivrcc.sta 2015-04-23 17:06:10

BR0484I BRCONNECT log file: /oracle/<SID>/sapcheck/ceqivrcc.sta

BR0280I BRCONNECT time stamp: 2015-04-23 17:06:12

BR0807I Name of database instance: <SID>

BR0808I BRCONNECT action ID: ceqivrcc

BR0809I BRCONNECT function ID: sta

BR0810I BRCONNECT function: stats

BR0812I Database objects for processing: SYSTEM_STATS

BR0997I System statistics will be collected with 'NOWORKLOAD' option

BR0126I Unattended mode active - no operator confirmation required

BR0280I BRCONNECT time stamp: 2015-04-23 17:06:12

BR0992I Starting collection of system statistics with option/interval NOWORKLOAD ...

BR0280I BRCONNECT time stamp: 2015-04-23 17:10:01

BR0301E SQL error -20000 at location stats_system_collect-4, SQL statement:

'BEGIN DBMS_STATS.GATHER_SYSTEM_STATS (GATHERING_MODE => 'NOWORKLOAD'); END;'

ORA-20000: Unable to gather system statistics : insufficient privileges

ORA-06512: at "SYS.DBMS_STATS", line 39666

ORA-06512: at line 1

BR0994E Collection of system statistics failed

BR0806I End of BRCONNECT processing: ceqivrcc.sta 2015-04-23 17:10:01

BR0280I BRCONNECT time stamp: 2015-04-23 17:10:01

BR0804I BRCONNECT terminated with errors

With / it is working fine. Please help !!

Accepted Solutions (1)

Accepted Solutions (1)

former_member182657
Active Contributor
0 Kudos

Hi Symon,


I had entered SAPSR3 in capital letters anyway:

After making the changes,have you restarted the system & checked again.Please confirm .

Regards,

symon_braunbaer
Participant
0 Kudos

Hi Gaurav,

I have just tried to restart everything and it is still not working:

BR0280I BRCONNECT time stamp: 2015-06-02 12:01:50

BR0992I Starting collection of system statistics with option/interval NOWORKLOAD ...

BR0280I BRCONNECT time stamp: 2015-06-02 12:09:43

BR0301E SQL error -20000 at location stats_system_collect-4, SQL statement:

'BEGIN DBMS_STATS.GATHER_SYSTEM_STATS (GATHERING_MODE => 'NOWORKLOAD'); END;'

ORA-20000: Unable to gather system statistics : insufficient privileges

ORA-06512: at "SYS.DBMS_STATS", line 39666

ORA-06512: at line 1

BR0994E Collection of system statistics failed

BR0806I End of BRCONNECT processing: ceqqjgmt.sta 2015-06-02 12:09:43

BR0280I BRCONNECT time stamp: 2015-06-02 12:09:43

BR0804I BRCONNECT terminated with errors

Please kindly suggest a solution...

former_member182657
Active Contributor
0 Kudos

Hi Symon,

Could you check with SAP Note 1764043 - Support for secure storage in BR*Tools


Regards,

Answers (5)

Answers (5)

former_member182657
Active Contributor
0 Kudos

Hi Symon,

For the issue


BR1301W Error message from likeywlib: 543 likey_init: Couldn't load SAPSECULIB ("libsapcrypto.so") using function SsfSupInitEx (), rc = 10 (no library).

BR1301W Error message from likeywlib: 541 likey_init: Couldn't load SAPSECULIB. Giving up.

BR1302W Initialization of license key library likeywlib failed, return code 1

BR1304W Checking SAP license failed at location BrLicCheck-122

BR0602W No valid SAP license found - please contact SAP

You could refer SAP Note 912969 - BR*Tools fails due to license problems

case 4 resolutions.


Hope this will resolve your issue.


Good luck !!

symon_braunbaer
Participant
0 Kudos

Thank you again, Gaurav, but this note is not the solution, although it is coming close...

Yesterday I confirmed that it is a problem of the library path, LD_LIBRARY_PATH in case of Solaris, I think. When I run the BR-commands from the /SYS/exe/run directory, the error is not appearing.

I have set the library path, but it looks like it's not kicking in. I will compare the environment with other systems or with the ora<SID> user and will try to fix it somehow. In the end, we also have a few Solaris guys, which should be able to help... Maybe I'm doing a little mistake on the shell level... Thanks again, I will mark your answer as correct !!

symon_braunbaer
Participant
0 Kudos

OK, my mistake:

DIR_LIBRARY=/usr/sap/<SID>/SYS/exe/run

and NO other directories !! I had a few directories and then it had been taken as an entire string and that's why the library couldn't be loaded... Simple, Watson! 🙂

former_member182657
Active Contributor
0 Kudos

Hi,

Thanks for sharing .

Regards,

former_member182657
Active Contributor
0 Kudos

Hi Symon,

First 'm really happy after getting revert from you & it's nice you're able to resolve the issue with the help of recommended SAP Note 1764043 - Support for secure storage in BR*Tools


In response to your queries

WHY it was necessary to move the BR*Tools profile init<SID>.sap to /oracle/<SID>/sapprof 

As per my best i search on it i found http://www.oracle.com/us/products/database/sap-exadata-wp-409603.pdf

&


Hint: After installing the first node, for a faster install process , you can copy BR*Tools and sapxpg under “/usr/sap/” to the other Exadata database nodes. The file /oracle//sapprof/init.sap will be linked to all database instances. This is to have only one init.sap to handle, if changes apply.

$ ln -s /oracle//sapprof/init1.sap /oracle//sapprof/init2.sap

$ ln -s /oracle//sapprof/init1.sap /oracle//sapprof/init3.sap

$ ln -s /oracle//sapprof/init1.sap /oracle//sapprof/init4.sap

It means you need only one init<SID>.sap file to take care for the instances.

For second you need to elaborate it more,as 'm not getting you for same.


BR1304W Checking SAP license failed at location BrLicCheck-122

BR0602W No valid SAP license found - please contact SAP

For the issue,kindly check for valid licenses for the system.

I really appreciate your queries which forced me to learn more on it .

Regards,

former_member182657
Active Contributor
0 Kudos

As you're already using SSFS database connection method,but suggest you to re-consider SAP Note 1622837 - Secure connection of AS ABAP to Oracle via SSFS

to configure br*tools as per SSFS.

Addition to it you could also refer SCN doc at


Good luck !!

symon_braunbaer
Participant
0 Kudos

MANY THANKS, Gaurav !!! I could solve the issue, using the Note you recommended - 1764043 - Support for secure storage in BR*Tools

The main problem was in point 3. - I had not stored the password for BR*Tools in the secure storage.

Unless I have really been asleep - I don't remember the SAP guide for oracle 12 upgrade to have mentioned these steps somewhere !!

BUT - there are few glitches and I would really need to ask your opinion on them:

1) WHY it was necessary to move the BR*Tools profile init<SID>.sap to /oracle/<SID>/sapprof (it was recommended in the oracle 12 upgrade procedure document by SAP) ?? Now I need to specify the full path to the profile everytime I am calling any BR*Tools program, for example:

brconnect -u // -p /oracle/<SID>/sapprof/init<SID>.sap -c -f stats -t system_stats

That wasn't necessary before (even if you check the output in my first post of the thread).

2) There is some issue with directories. According to the above mentioned upgrade guide by SAP, I have ORACLE_HOME set to /oracle/<SID>/121. When I launch brbackup for example, it would complain, that it can't find /oracle/<SID>/121/sapcheck !! When I have tried to set ORACLE_HOME just to /oracle/<SID> as it is for the ora<SID> user (I am using the oracle user now!), it would complain, that it can't find the secure store in /oracle/<SID>/security/... In the end I have created soft links for saparch, sapbackup, etc. but I don't really think, that this is the right approach! Kindly advise especially on this one!

3) I am getting some warnings:

BR1301W Error message from likeywlib:

===...could not load SSF library .//libsapcrypto.so .

BR1301W Error message from likeywlib: 543 likey_init: Couldn't load SAPSECULIB (".//libsapcrypto.so") using function SsfSupInitEx (), rc = 10 (no library).

BR1301W Error message from likeywlib: 542 likey_init: At least one more attempt to load the SAPSECULIB will follow.

BR1301W Error message from likeywlib:

===...could not load SSF library libsapcrypto.so .

BR1301W Error message from likeywlib: 543 likey_init: Couldn't load SAPSECULIB ("libsapcrypto.so") using function SsfSupInitEx (), rc = 10 (no library).

BR1301W Error message from likeywlib: 541 likey_init: Couldn't load SAPSECULIB. Giving up.

BR1302W Initialization of license key library likeywlib failed, return code 1

BR1304W Checking SAP license failed at location BrLicCheck-122

BR0602W No valid SAP license found - please contact SAP

but I think that I will be able to manage this by myself, I have already fixed this on another system, but it was a VERY long time ago and I don't remember exactly what I did back then...

THANKS once again !!!

former_member182657
Active Contributor
0 Kudos

Hi Symon,

Could you re-share brconnect logs & alert_<SID>.log file as well.

Thanks,

symon_braunbaer
Participant
0 Kudos

Dear Gaurav, thanks for your reply!! Here is what you've requested:

% cat /oracle/<SID>/sapcheck/ceqjterm.sta

BR0801I BRCONNECT 7.40 (15)

BR0805I Start of BRCONNECT processing: ceqjterm.sta 2015-04-28 11:56:46

BR0484I BRCONNECT log file: /oracle/<SID>/sapcheck/ceqjterm.sta

BR0101I Parameters

Name                           Value

oracle_sid                     <SID>

oracle_home                    /oracle/<SID>/121

oracle_profile                 /oracle/<SID>/sapprof/init<SID>.ora

sapdata_home                   /oracle/<SID>

sap_profile                    /oracle/<SID>/sapprof/init<SID>.sap

_rman_sess_stmt                alter session set optimizer_mode=RULE

system_info                    <SID>adm/oracle sapsys/oinstall wsps512 SunOS 5.10 Generic_150401-17 i86pc

oracle_info                    <SID> 12.1.0.2.0 8192 1209 30051255254 wsps512 WE8DEC UTF8 1834503450 &<SID>

sap_info                       731 SAPSR3 0002LK0003<SID>0011E20787895610015Maintenance_ORA

make_info                      sunx86_64 OCI_112 Mar 30 2015 742_REL

command_line                   brconnect -u // -c -f stats -t system_stats

br_env                         SAPSYSTEMNAME=<SID>,

                               DIR_LIBRARY=/usr/sap/<SID>/SYS/exe/run,

                               SAPEXE=/usr/sap/<SID>/SYS/exe/run,

                               DB_SID=<SID>,

                               ORACLE_SID=<SID>,

                               ORACLE_BASE=/oracle,

                               TNS_ADMIN=/sapmnt/<SID>/profile/oracle,

                               ORACLE_HOME=/oracle/<SID>/121,

                               NLS_LANG=AMERICAN_AMERICA.WE8DEC,

                               SAPDATA_HOME=/oracle/<SID>

stats_table                    SYSTEM_STATS

stats_system_interval          0

BR0280I BRCONNECT time stamp: 2015-04-28 11:56:48

BR0807I Name of database instance: <SID>

BR0808I BRCONNECT action ID: ceqjterm

BR0809I BRCONNECT function ID: sta

BR0810I BRCONNECT function: stats

BR0812I Database objects for processing: SYSTEM_STATS

BR0997I System statistics will be collected with 'NOWORKLOAD' option

BR0126I Unattended mode active - no operator confirmation required

BR0280I BRCONNECT time stamp: 2015-04-28 11:56:48

BR0992I Starting collection of system statistics with option/interval NOWORKLOAD ...

BR0280I BRCONNECT time stamp: 2015-04-28 12:03:41

BR0301E SQL error -20000 at location stats_system_collect-4, SQL statement:

'BEGIN DBMS_STATS.GATHER_SYSTEM_STATS (GATHERING_MODE => 'NOWORKLOAD'); END;'

ORA-20000: Unable to gather system statistics : insufficient privileges

ORA-06512: at "SYS.DBMS_STATS", line 39666

ORA-06512: at line 1

BR0994E Collection of system statistics failed

BR0806I End of BRCONNECT processing: ceqjterm.sta 2015-04-28 12:03:41

BR0280I BRCONNECT time stamp: 2015-04-28 12:03:41

BR0804I BRCONNECT terminated with errors

and here is the alert_<SID>.log, there is no entry from the time brconnect was running:

Incremental checkpoint up to RBA [0x4b8.2bf3f.0], current log tail at RBA [0x4b8.2c087.0]

Tue Apr 28 11:09:30 2015

Incremental checkpoint up to RBA [0x4b8.2d649.0], current log tail at RBA [0x4b8.2d7e2.0]

Tue Apr 28 11:22:34 2015

Beginning log switch checkpoint up to RBA [0x4b9.2.10], SCN: 30051255254

Tue Apr 28 11:22:34 2015

Thread 1 advanced to log sequence 1209 (LGWR switch)

  Current log# 1 seq# 1209 mem# 0: /oracle/<SID>/origlogA/log_g11m1.dbf

  Current log# 1 seq# 1209 mem# 1: /oracle/<SID>/mirrlogA/log_g11m2.dbf

Tue Apr 28 11:22:35 2015

Archived Log entry 1208 added for thread 1 sequence 1208 ID 0xd44af6cb dest 1:

Tue Apr 28 11:27:38 2015

Completed checkpoint up to RBA [0x4b9.2.10], SCN: 30051255254

Tue Apr 28 11:39:35 2015

Incremental checkpoint up to RBA [0x4b9.a1f1.0], current log tail at RBA [0x4b9.a335.0]

Tue Apr 28 12:09:40 2015

Incremental checkpoint up to RBA [0x4b9.c21b.0], current log tail at RBA [0x4b9.c3d2.0]

Tue Apr 28 12:39:45 2015

Incremental checkpoint up to RBA [0x4b9.49d05.0], current log tail at RBA [0x4b9.49e3e.0]

symon_braunbaer
Participant
0 Kudos

Hello everybody, can you please kindly look again into the problem, as this thread has been stale for a while and I am still sitting on this unsolved issue. Many thanks!

former_member182657
Active Contributor
0 Kudos

Hi,


ORA-20000: Unable to gather system statistics : insufficient privileges

Hope you followed SAP KBA   2073326 - ORA-20000: Unable to analyze TABLE "sapsr3"."/BIC/A1234567B", insufficient privileges or ...

&   1839320 - ORA-20000 error in client copy after switching to SSFS

Good luck !!

symon_braunbaer
Participant
0 Kudos

Many thanks for your reply, Gaurav, but unfortunately this didn't resolve my issue. I had entered SAPSR3 in capital letters anyway:

% rsecssfx get BR_TOOLS/DEFAULT_DB_USER

Record Key   : BR_TOOLS/DEFAULT_DB_USER

Record Value : SAPSR3

Timestamp    : 2015-04-21  07:04:42  UTC

% rsecssfx get DB_CONNECT/DEFAULT_DB_USER

Record Key   : DB_CONNECT/DEFAULT_DB_USER

Record Value : SAPSR3

Timestamp    : 2015-04-21  07:04:25  UTC

I have also tried SAP note 963760 - 'ORA-20000: Insufficient privileges' for creating statistics, but unfortunately, no luck either... 😕