cancel
Showing results for 
Search instead for 
Did you mean: 

Use central brtools to manage multiple Oracle DB instances in different hosts

Former Member
0 Kudos

Hi Every one,

i have this issue we need to centralize the oracle DB gather schema statistics scheduling for some architectural reasons we need to use a central node that has a brtools  and oracle client software installed and run brconnect from this central node using some thing like this:

/usr/sap/XXX/SYS/exe/run/brconnect -u system/syspass1@SID1 -c -f stats -p 8 -m E -s P30 -t all -f collect

/usr/sap/XXX/SYS/exe/run/brconnect -u system/syspass2@SID2 -c -f stats -p 8 -m E -s P30 -t all -f collect

first i need to know if this is working solution

second if working what prerequisites

any guides documents how to's will be great help

thank you in advance.

Mohamed.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi All,

first thank you every one for helpful feedback,

Yesterday i setup a POC and worked fine and here is what i did .

# Create orsap user

useradd orasap

#Creat directories

mkdir -p /oracle/{11203/{dbs,sapcheck,network/admin},client/11x_64,brtools}

chown orasap -R /oracle

# As orasap user

su - orasap

# Install BR*Tools

SAPCAR -xvf /opt/DBATL720O10_32-10007263.SAR -R /oracle/brtools

# Install Oracle Client

SAPCAR -xvf /opt/OCL11264.SAR -R /oracle/client/11x_64

cd /oracle/client/11x_64 ; ln -s instantclient_11203 instantclient

cd /oracle/client ; ln -s 11x_64 10x_64

# creat tnsnames.ora , sqlnet.ora in /oracle/11203/network/admin

#  populate necessary env variables

export PATH=/oracle/brtools:/oracle/client/10x_64/instantclient:$PATH

export LD_LIBRARY_PATH=/oracle/brtools:/oracle/client/10x_64/instantclient:$LD_LIBRARY_PATH

export ORACLE_HOME=/oracle/11203

export TNS_ADMIN=$ORACLE_HOME/network/admin

export NLS_LANG=AMERICAN_AMERICA.UTF8

# Add dummy init<SID>.sap  

cp /oracle/brtools/initSID.sap $ORACLE_HOME/dbs/initEF5.sap

# Add dummy init<SID>.ora

touch $ORACLE_HOME/dbs/initEF5.ora

# populate ORACLE_SID

export ORACLE_SID=EF5

# Now execute brconnect

/oracle/brtools/brconnect -u system/passwd@ef5 -c -f stats -p 8 -m E -s P30 -t all -f collect

Thanks,

Mohamed.

Answers (3)

Answers (3)

former_member188883
Active Contributor
0 Kudos

Hi Mohammed,

Following SAP Note 1261329 - DBA Cockpit: Oracle as a remote database

should be useful.

Hope this helps.

Regards,

Deepak Kori

stefan_koehler
Active Contributor
0 Kudos

Hi Mohamed,

> first i need to know if this is working solution

Yes absolutely. I have implemented this remote BR*Tools statistic runs several times in client environments. It was mostly implemented due to security policies like "no application part is allowed to be installed or run on the database servers - just SQL*Net connections".

> second if working what prerequisites

Nothing special - just the same as you run brconnect locally on the database server:

  1. For security reasons i create a separate database user for remote BR*Tools activities
  2. Correct environment variables on your central environment
  3. The corresponding Oracle instant client
  4. An empty ORACLE_HOME with a folder called "dbs" and an empty init<SID>.ora file and the corresponding init<SID>.sap file
  5. A folder called /oracle/<SID>/sapcheck

Regards

Stefan

Former Member
0 Kudos

Thank you every one for response and specially Stefan Koehler for his hints ,

actually i try to run this from a server which is not in the SAP landscape in fact it is the rman backup server where we need to centralize all the operation scheduled activity to elaborate my question more , what is the mandatory environment settings i need to consider when running brconnect.

Thanks,

Mohamed.

stefan_koehler
Active Contributor
0 Kudos

Hi Mohamed,

> what is the mandatory environment settings i need to consider when running brconnect.

Well this depends on your operating system (of the central rman backup server), the used BR*Tools and Oracle client version.

Basically it is the ORACLE_HOME (and maybe ORACLE_BASE) and the library path. Just logon to a SAP system on OS level (with <sid>adm) with the same BR*Tools and Oracle client version and OS and crosscheck the environment.

Regards

Stefan

Former Member
0 Kudos

Hi Mohamed,

I assume that the central system is not a SAP system and you are planning to collect just the statistics at the remote side. Please correct me, if there is a misunderstanding. If it is correct, at the first step, I suggest you use BR*TOOLS 7.20 with the latest patch level. Secondly, configure the mandatory environment variables, below;

SAPDATA_HOME

ORACLE_SID

Thirdly, add the remote database connection strings into the tnsnames.ora at the central system;

<DBSID>.WORLD =

  (DESCRIPTION =

    (ADDRESS = (COMMUNITY = SAP.WORLD)(PROTOCOL = TCP)(HOST = <hostname>)(PORT = <listener_port>))

    (CONNECT_DATA =

      (SERVER = DEDICATED)

      (SERVICE_NAME = <DBSID>)

    )

  )

Check connection whether the remote database is accessible, by using tnsping <DBSID>.WORLD

Please note that tcp.invited_nodes and tcp.validnode_checking parameters have been set at the remote side. If they have been set, add the central system hostname into the remote database list.

One more thing that, if the remote system is a non-SAP system, check the Note 320457 - Installing BR tools on a non-ABAP database

One another approach may be remote execution

brconnect command, by using rsh or some other protocol.

Best regards,

Orkun Gedik

Former Member
0 Kudos

Hi Mohamed,

I suggest you use "DBACOCKPIT" to centralize the multiple systems.

Best regards,

Orkun Gedik