Search This Blog

Total Pageviews

Thursday 15 September 2011

crsctl

% crsctl
Usage: crsctl check crs - checks the viability of the CRS stack
crsctl check cssd - checks the viability of CSS
crsctl check crsd - checks the viability of CRS
crsctl check evmd - checks the viability of EVM
crsctl set css - sets a parameter override
crsctl get css - gets the value of a CSS parameter
crsctl unset css - sets CSS parameter to its default
crsctl query css votedisk - lists the voting disks used by CSS
crsctl add css votedisk - adds a new voting disk
crsctl delete css votedisk - removes a voting disk
crsctl enable crs - enables startup for all CRS daemons
crsctl disable crs - disables startup for all CRS daemons
crsctl start crs - starts all CRS daemons.
crsctl stop crs - stops all CRS daemons. Stops CRS resources in case of cluster.
crsctl start resources - starts CRS resources.
crsctl stop resources - stops CRS resources.
crsctl debug statedump evm - dumps state info for evm objects
crsctl debug statedump crs - dumps state info for crs objects
crsctl debug statedump css - dumps state info for css objects
crsctl debug log css [module:level]{,module:level} ...
- Turns on debugging for CSS
crsctl debug trace css - dumps CSS in-memory tracing cache
crsctl debug log crs [module:level]{,module:level} ...
- Turns on debugging for CRS
crsctl debug trace crs - dumps CRS in-memory tracing cache
crsctl debug log evm [module:level]{,module:level} ...
- Turns on debugging for EVM
crsctl debug trace evm - dumps EVM in-memory tracing cache
crsctl debug log res turns on debugging for resources
crsctl query crs softwareversion [] - lists the version of CRS software installed
crsctl query crs activeversion - lists the CRS software operating version
crsctl lsmodules css - lists the CSS modules that can be used for debugging
crsctl lsmodules crs - lists the CRS modules that can be used for debugging
crsctl lsmodules evm - lists the EVM modules that can be used for debugging


## Oracle 10g R1
/etc/init.d/init.crs [disable|enable]

$ORA_CRS_HOME/bin/crsctl [disable|enable] crs

$ORA_CRS_HOME/bin/crsctl check crs
$ORA_CRS_HOME/bin/crsctl check evmd
$ORA_CRS_HOME/bin/crsctl check cssd
$ORA_CRS_HOME/bin/crsctl check crsd
$ORA_CRS_HOME/bin/crsctl check install -wait 600


Resource Applications (CRS Utilities)

status $ORA_CRS_HOME/bin/crs_stat
$ORA_CRS_HOME/bin/crs_stat -t
$ORA_CRS_HOME/bin/crs_stat -ls
$ORA_CRS_HOME/bin/crs_stat -p

Note:
-t more readable display
-ls permission listing
-p parameters

Oracle Database rename golbal name

col "value" format a33
col "comment" format a70
select NAME,substr(VALUE$,1,70) "value" ,substr(COMMENT$,1,70) "comment" from sys.props$


1* select NAME,substr(VALUE$,1,70) "value" ,substr(COMMENT$,1,70) "comment" from sys.props$


NAME value comment
------------------------------ --------------------------------- ----------------------------------------------------------------------
DICT.BASE 2 dictionary base tables version #
DEFAULT_TEMP_TABLESPACE TEMP Name of default temporary tablespace
DEFAULT_PERMANENT_TABLESPACE USERS Name of default permanent tablespace
DEFAULT_EDITION ORA$BASE Name of the database default edition
Flashback Timestamp TimeZone GMT Flashback timestamp created in GMT
TDE_MASTER_KEY_ID
DST_UPGRADE_STATE NONE State of Day Light Saving Time Upgrade
DST_PRIMARY_TT_VERSION 11 Version of primary timezone data file
DST_SECONDARY_TT_VERSION 0 Version of secondary timezone data file
DEFAULT_TBS_TYPE SMALLFILE Default tablespace type
NLS_LANGUAGE AMERICAN Language
NLS_TERRITORY AMERICA Territory
NLS_CURRENCY $ Local currency
NLS_ISO_CURRENCY AMERICA ISO currency
NLS_NUMERIC_CHARACTERS ., Numeric characters
NLS_CHARACTERSET AL32UTF8 Character set
NLS_CALENDAR GREGORIAN Calendar system
NLS_DATE_FORMAT DD-MON-RR Date format
NLS_DATE_LANGUAGE AMERICAN Date language
NLS_SORT BINARY Linguistic definition
NLS_TIME_FORMAT HH.MI.SSXFF AM Time format
NLS_TIMESTAMP_FORMAT DD-MON-RR HH.MI.SSXFF AM Time stamp format
NLS_TIME_TZ_FORMAT HH.MI.SSXFF AM TZR Time with timezone format
NLS_TIMESTAMP_TZ_FORMAT DD-MON-RR HH.MI.SSXFF AM TZR Timestamp with timezone format
NLS_DUAL_CURRENCY $ Dual currency symbol
NLS_COMP BINARY NLS comparison
NLS_LENGTH_SEMANTICS BYTE NLS length semantics
NLS_NCHAR_CONV_EXCP FALSE NLS conversion exception
NLS_NCHAR_CHARACTERSET AL16UTF16 NCHAR Character set
NLS_RDBMS_VERSION 11.2.0.1.0 RDBMS version for NLS parameters
GLOBAL_DB_NAME ORCL.APTUS.CO.UK Global database name
EXPORT_VIEWS_VERSION 8 Export views revision #
WORKLOAD_CAPTURE_MODE CAPTURE implies workload capture is in progress
WORKLOAD_REPLAY_MODE PREPARE implies external replay clients can connect; REPLAY implies wo
NO_USERID_VERIFIER_SALT 8BF56230FC49D6ECFE53EB96A5922DD5
DBTIMEZONE 00:00 DB time zone

36 rows selected.




SQL> select NAME,substr(VALUE$,1,70) "value" ,substr(COMMENT$,1,70) "comment" from sys.props$ where name='GLOBAL_DB_NAME';


NAME value comment
------------------------------ --------------------------------- ----------------------------------------------------------------------
GLOBAL_DB_NAME ORCL.APTUS.CO.UK Global database name

select NAME,substr(VALUE$,1,70) "value" ,substr(COMMENT$,1,70) "comment" from sys.props$ where name like '%GLOBAL%'

NAME value comment
------------------------------ --------------------------------- ----------------------------------------------------------------------
GLOBAL_DB_NAME ORCL.APTUS.CO.UK Global database name



SQL> show parameter global_names

NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
global_names boolean FALSE


SQL> col GLOBAL_NAME format a30

SQL> r
1* SELECT * FROM global_name

GLOBAL_NAME
------------------------------
ORCL.APTUS.CO.UK




SELECT name,value FROM v$parameter WHERE name = 'global_names';



select NAME,substr(VALUE$,1,70) "value" ,substr(COMMENT$,1,70) "comment" from sys.props$ where name like '%GLOBAL%' ; ='global_names';


select NAME,substr(VALUE$,1,70) "value" ,substr(COMMENT$,1,70) "comment" from sys.props$ where name like '%GLOBAL%' ;

SELECT name,value FROM v$parameter WHERE name = 'global_names';



SELECT * FROM props$ WHERE name='GLOBAL_DB_NAME';


# Example select * from props$ where name = 'GLOBAL_DB_NAME'; -Returns with old database name
# cause: The database name was not the same in all data dictionary views




ALTER DATABASE RENAME GLOBAL_NAME TO remote1.oracle.com;
SQL> ALTER SESSION SET global_names = TRUE;
SQL> ALTER SYSTEM SET global_names = FALSE;

Oracle DBA

anuj blog Archive