Postgresql Admin 2. Set search path 3. Validate Session 4. Kill session select pid as process_id,usename as username,datname as database_name,client_addr as client_address,application_name,backend_start,state,state_changefrom pg_stat_activity where datname=’aurorapg_dbname’; select datname, usename, ssl, client_addr,application_name, backend_start,query_start ,statefrom pg_stat_ssl inner join pg_stat_activity on pg_stat_ssl.pid = pg_stat_activity.pid where ssl is true and usename not in ( ‘rds’);
Validate DB after migration
Validate Database after migration 2. Check permission fsafsd
Install Elasticsearch with Ansible
Install Elasticsearch with Ansible Download from github git clone git@github.com:hanhduynguyen/ansible_elasticsearch.git cd ansible_elasticsearch ansible-playbook -i inventory.yml elasticsearch_setup.yaml -u root Install Kibana ansible-playbook -i kibana_inventory.yml kibana-setup.yml -u root
Elasticsearch Query
Elasticsearch Common Query 3. Clean up Kibana systemctl stop kibanayum remove -y kibanarm -rf /etc/kibana/ /usr/share/elasticsearch/bin/elasticsearch-reset-password -u elastic –url https://es01:9200 Password for the [elastic] user successfully reset.New value: 7AtUa8d*ie+qx3Pe2mK6 curl -u elastic:7AtUa8d*ie+qx3Pe2mK6 -k -X POST “https://esrep02:9200/_security/user/elastic/_password” -H “Content-Type: application/json” -d ‘{“password”: “password”}’ curl -u elastic:password -X GET “https://192.168.56.81:9200/_license?pretty” curl -u elastic:password -X POST “https://192.168.56.81:9200/_license/start_trial?acknowledge=true&pretty” curl… Continue reading Elasticsearch Query
How to find Obsolete Oracle12c parameters
Solution: SELECT name FROM v$parameter WHERE isdeprecated =’TRUE’ ORDER BY name;
12c Grid Infrastructure Quick Reference
This is a 12c Grid Infrastructure quick reference DETAILS “crsctl stat res -t” output example This example is from a 12c GI Flex Cluster with Flex ASM, 4 nodes (racnode1f-racnode4f) are Hub nodes and 4 nodes (racnode6f-racnode9f)) are Leaf nodes $ <GI_HOME>/bin/crsctl stat res -t ——————————————————————————– Name Target State Server State details ——————————————————————————– Local Resources… Continue reading 12c Grid Infrastructure Quick Reference
How to Transport a Tablespace Using the DBMS_FILE_TRANSFER Package
The source database on Windows is PROD1 and the target database is a 11g RAC database RACDB1. 1) Create the tablespace and the test object in the source database. SQL> create tablespace test_asm datafile size 100m; Tablespace created. SQL> select file_name from dba_data_files where tablespace_name=’TEST_ASM’; FILE_NAME —————————————————————————— +DATA/PROD1/datafile/test_asm.376.696333127 SQL> conn system/xxx Connected. SQL> create table… Continue reading How to Transport a Tablespace Using the DBMS_FILE_TRANSFER Package
ORA-00257:Archiver Error, Connect Internal Only Until Freed and ORA-16014 and ORA-00312
Cause The flash_recovery_area is full. SQL> archive log list; Database log mode Archive Mode Automatic archival Enabled Archive Destination USE_DB_RECOVERY_FILE_DEST Oldest online log sequence 231 Next log sequence to archive 231 Current log sequence 233 SQL>select group#,status archived from v$log; GROUP# ARCHIVED ———— ———————— 1 INVALIDATED 2 INACTIVE 3 INACTIVE The suggested solution to… Continue reading ORA-00257:Archiver Error, Connect Internal Only Until Freed and ORA-16014 and ORA-00312
TNS-12518 TNS listener could not hand off client connection
Step 1. Is listener version compatible to the database Check if you are using compatible listener version for your database version. If the database is 8i then use 8i or 9i listeners only. 10g listeners are not compatible to work with 8i databases. For 9i databases, 9i or 10g listeners can be used. For 10g… Continue reading TNS-12518 TNS listener could not hand off client connection
Exclude Partitions Through a DataPump Export (EXPDP) Backup
1. Create the environment SQL> connect / as sysdba Connected. SQL> drop user ebernal cascade; User dropped. SQL> purge dba_recyclebin; DBA Recyclebin purged. SQL> create user ebernal identified by passwd default tablespace users temporary tablespace temp; User created. SQL> grant connect, resource to ebernal; Grant succeeded. SQL> create or replace directory dpudir as ‘/tmp’; Directory… Continue reading Exclude Partitions Through a DataPump Export (EXPDP) Backup