==> sqlplus /nolog
==> connect /
Can connect to a running database.
1. sqlplus connect / as sysdba
Uses OS authentication. (SSFS is used for storing password in encrypted form)
2. LSNRCTL
Used for listner control, help command gives available commands.
Services of listner:
UNIX: tnslsnr
Windows: Oracle<DBSID><Release>TNSListner
3. tnsping <DBSID>
Used to ping the listner to check if it is running.
issues could be <DBSID> not rsolved in tnsmaes.ora or lisner not configured for db
in listener.ora
4. startup
To start Oracle DB
Eg. commands:
select username from dba_users
select role from dba_roles where role like 'SAP%'
select table_name from dba_tables where owner = 'SAPXXX'
5. BRTOOLs
BR* -c|-confirm force
It runs the particular BR* in batch mode and user need not input all the inputs as
in interactive mode. Default values are selected.
6.
SQLPlus /nolog
SET <VARIABLE> <VALUE>
SHOW <VARIABLE>/ALL
7. sqlplus {username[/password]|/}[@<DBSID>] @<script>
It runs the sqlplus command with @script at end, this script has set commands.
Transactions:
DBACOCKPIT
For holistic administration of DB
DB16
Use this transaction to view the overview of database checks.
DB17
Use this transaction to view and maintain check conditions used by a database
system check.
DB20
Use this transaction to edit table statistics.
DB21
Use this transaction to configure statistics.
DB26
Use this transaction to view the database parameter overview with history.
RZ20
Use this transaction to start the database alert monitor, which monitors all preset
alerts for
different areas of the database.
Tables:
DBCON
Entry required in external connection to DB
SDBAC
Background job (DB13) uses info in this table to understand which OS level command
to be executed on which server.
Instance start:
No Mount: Paramaeter file is read and DB instance is started.
Mount: Control file is read.
OPEN: Database file and online redo log files are read.
Start DB:
BRTools ==> Instance Management ==> Startup database
 (In batch mode use) ==> brspace -c force -f dbstart -s <state>
Stop DB:
BRTools ==> Instance Management ==> Shut down database
 (in batch mode) ==> brspace -c force -f dbshut -m <mode>
Use: NORMAL/TRANSACTIONAL/IMMEDIATE/ABORT
Parameters:
Use SPFILE to update parameters using BRTOOLs so that init<DBSID>.ora file is also
updated online and both files remain in synch.
CREATE SPFILE from PFILE
PFILe is file from which SPFILe is copied. ususually init_<DBSID>.ora
To create sPFILE from init<DBSID>.ora file
SPFILE can be opnened in text format but dont edit it. Leads to corruption
Brtools ==> Additional functions ==> Show profiles and logs ==> Oracle profile.
1171650 ==> Oracle DB parameter check. Can use report RSORADJV
DIAGNOSTIC_DEST stores the ADS directory. It is used to store diagnostic logging.
It is outside DB hence is useful even when DB is down.
Location of ADS ==> if ORACLE_BASE EV is set, it is same. If not, %ORACLE_HOME
%/log is the location.
In SAP environment it is set at:
DIAGNOSTIC_DEST = %SAPDATA_HOME%\SAPTRACE
In one ADR base, there can be several ADR homes.Each home is place for each
instance.
Alert log:
xml file:
/oracle/<DBSID>/saptrace/diag/rdbms/<DBSID>/<DBSID>/alert
log.xml if file name
ASCII file:
/oracle/<DBSID>/saptrace/diag/rdbms/<DBSID>/<DBSID>/trace
alert_<DBSID>.log
ADRCI is used to maintain retention policy. So that older logs get deleted.