Oracle Clusterware crsctl commands:
Anuroop Challa
The content includes guides, troubleshooting tips, and best practices for managing database environments, with an emphasis on Oracle and PostgreSQL systems. You can read the full analysis at Anuroop Challa's DBA Blog.
Common Oracle Clusterware crsctl commands
Common Oracle RAC srvctl commands
Common Oracle RAC srvctl commands:
# Database
View running queries in postgresql
View running queries in postgreSQL:
SELECT * FROM pg_stat_activity;
Golden gate commands
Golden gate commands for ggsci:
$ ./ggsci
GGSCI>
info all - Displays status of all Extract, Replicat, and Manager processes.
Start / Stop Processes
• start extract <extract_name> --- Start Extract process
• stop extract <extract_name> --- Stop Extract process
• start replicat <replicat_name> --- Start Replicat process
• stop replicat <replicat_name> --- Stop Replicat process
check info about individual.
• info extract <extract_name>, detail -- Detailed info about Extract
• info replicat <replicat_name>, detail -- Detailed info about Replicat
• info mgr - Displays Manager process status
Check Lag
• lag extract <extract_name> -- Shows Extract lag
• lag replicat <replicat_name> -- Shows Replicat lag
View Statistics
• stats extract <extract_name> -- Displays Extract statistics
• stats replicat <replicat_name> -- Displays Replicat statistics\
Troubleshooting
• view report <extract_name> --- View Extract report
• view report <replicat_name> --- View Replicat report
• send extract <extract_name>, status --- Real-time Extract status
• send replicat <replicat_name>, status --- Real-time Replicat status
• kill extract <extract_name> --- Forcefully terminate Extract (use with caution)
• kill replicat <replicat_name> --- Forcefully terminate Replicat (use with caution)
How to check database and database owner information on psql
How to check database and database owner information on psql:
You can check with \list command
example:
testsub=> \list
List of databases
Name | Owner | Encoding | Collate | Ctype | Access privileges
----------------+-----------+----------+-----------------+-----------------+--------------------------------
testdb | testuser | UTF8 | en_US.UTF-8 | en_US.UTF-8 |
How to check connected user on psql
How to check connected user on psql :
\conninfo
example:
testsub=> \conninfo
You are connected to database "testsub" as user "sub" on host "localhost" (address "127.0.0.1") at port "5432".
Extracting DDL of Objects in PostgreSQL(get table ddl in PostgreSQL)
Extracting DDL of Objects in PostgreSQL(get table ddl in PostgreSQL)
===================================================
2 Ways to get DDL of objects in PostgreSQL
1. The utility pg_dump is used to dump the DDL.
2. Can get the DDL just by running \d.
1. The utility pg_dump is used to dump the DDL.
Table ddl for testtable from TESTDB
$ pg_dump -d TESTDB -s -t testtable
Table ddl for testtable from TESTDB written in to file ddl.sql
$ pg_dump -d TESTDB -s -T testtable -f ddl.sql
Table ddls for all ables from from TESTDB
$ pg_dump -d TESTDB -s
2. Can get the DDL just by running \d.
TESTDB=# \d+ testtable
-
SQL Tuning Task Creation ORA-13780: SQL statement does not exist. ================================================= example:- declare...
-
Shareplex some commands i will post here and update in this post with more commands later, if i provide with example so post become length...
-
ORA 700 [kskvmstatact: excessive swapping observed] ======================================== One of my database down suddenly. Reason:...
Common Oracle Clusterware crsctl commands
Oracle Clusterware crsctl commands: # Check cluster status crsctl check crs crsctl check cluster # Cluster resources crsctl status reso...