Oracle : TRANSPORTABLE TABLESPACE IN ORACLE
TRANSPORTABLE TABLESPACE IN ORACLE Transportable Tablespace is used to move large amount of data between… Read More
TRANSPORTABLE TABLESPACE IN ORACLE Transportable Tablespace is used to move large amount of data between… Read More
Hadoop has many distributions and every distribution has a stack or you can say a collection of technologies/framework that work in conjunction with Hadoop and is knows as HADOOP ECOSYSTEM. Below is the hadoop ecosystem. Please note there are a plethora of technologies and distributions… Read More
MySQL Replication Setup Replication in MySQL. You will have to setup Master and Slave server. All read-writes to the DB could go to your Slave Server. Advantage of having Replication is you can take a backup from your slave server without interrupting Master server,… Read More
Installing Multiple MySQL The need to have multiple instances of MySQL (the well-known mysqld process) running in the same server concurrently in a transparent way, instead of having them executed in separate containers/virtual machines. MySQL provides a tool to facilitate the execution of… Read More
Oracle provides a trial cloud account worth USD 300 to individuals and organizations to test the cloud services. This is a good starting point to be familiar and have a hands on with oracle cloud services. The trial account provides complete spectrum of services to play with. Sign up… Read More
Different options in Export and Imports Schema export and import using remap_schemas. 1) create directory dpump as ‘/u02/dpump’; 2) grant read,write on directory dpump to system;
|
1 |
expdp user/password directory=dpump dumpfile=export.dup logfile=export.log schemas=scott |
For importing schema : 1) Cretae directory dpump as ‘/u02/DATAPUMP’; 2) grant read,write on directory… Read More
MySQL MySQL belongs to relational database management system (RDBMS Software). MySQL is one of the most widely using open source relational database. MySQL was started developing by Michael Widenius “Monty” in the year 1979. At that time it named as UNIREG. It’s an in-house database tool… Read More
Table has to be created for capturing the CPU Utilization and save it to Database.
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 |
CREATE TABLE "SCOTT"."UTILIZATIONS" ("DATE_ID" DATE DEFAULT SYSDATE, "TIME_ID" VARCHAR2(15 BYTE), "CPU" VARCHAR2(5 BYTE), "USER_PCT" NUMBER(4,2), "NICE_PCT" NUMBER(4,2), "SYSTEM_PCT" NUMBER(4,2), "IOWAIT_PCT" NUMBER(4,2), "STEAL_PCT" NUMBER(4,2), "IDLE_PCT" NUMBER(4,2), "INST_NAME" VARCHAR2(10 BYTE) ) SEGMENT CREATION IMMEDIATE PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT) TABLESPACE "SCOTT_DATA" ; sar.ctl is the control file for loading the Text file (Utilizations) to Database. cat <strong>/u01/app/oracle/DBA/tasks/sardata/sar.ctl </strong> load data infile '/u01/app/oracle/DBA/tasks/sardata/sar.txt' append into table UTILIZATIONS fields terminated by "," trailing nullcols( DATE_ID DATE "DD-MM-YYYY", TIME_ID, CPU, USER_PCT, NICE_PCT, SYSTEM_PCT, IOWAIT_PCT, STEAL_PCT, IDLE_PCT, INST_NAME CONSTANT ORCL12) $ cat <strong>/u01/app/oracle/DBA/tasks/sardata/sarcollect.sh</strong> cd /u01/app/oracle/DBA/tasks/sardata cd /u01/app/oracle/DBA/tasks/sardata export ORACLE_SID=orcl12 export ORACLE_HOME=/u01/app/oracle/product/12102 export PATH=/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/home/oracle/.local/bin:/home/oracle/bin:/u01/app/oracle/product/12102/bin export LC_TIME="POSIX" ####(For A Particular Date Use the following Line by multiplying 86400 * No.of days ##################sar -f /var/log/sa/sa19 | grep -v 'Average'|awk '{ print strftime("%d/%m/%Y",systime()-172800), $0; fflush() }' > /u01/app/oracle/DBA/tasks/sardata/sa.txt sar -f /var/log/sa/sa$(date +%d -d yesterday) | grep -v 'Average'|awk '{ print strftime("%d/%m/%Y",systime()-86400), $0; fflush() }' > /u01/app/oracle/DBA/tasks/sardata/sa.txt sed -i -e 1,3d /u01/app/oracle/DBA/tasks/sardata/sa.txt sed -i -e '$d' /u01/app/oracle/DBA/tasks/sardata/sa.txt sed 's/ \{1,\}/,/g' /u01/app/oracle/DBA/tasks/sardata/sa.txt > /u01/app/oracle/DBA/tasks/sardata/sar.txt cp /u01/app/oracle/DBA/tasks/sardata/sar.txt /u01/app/oracle/DBA/tasks/sardata/log/sar`date -dy '+%m%d%y'`.log sqlldr scott/tiger123 control=sar.ctl bindsize=512000 rows=100000 errors=10000 rm sar.txt Query for getting CPU Utilization from Database Query. SELECT DATE_ID,TIME_ID,(100-IDLE_PCT) AS UTILIZED_CPU_PCT FROM SEPHORA.UTILIZATIONS WHERE INST_NAME='ORCL12' ORDER BY 1,2; The same can be used for multi node RAC Database, for different time frames to see how the utilization is. |
Dear Readers, In this article we will see Cassandra Data distribution and replication. Cassandra is a Distributed NoSQL database means all the data is distributed across the Cluster. in Cassandra data distribution and replication go together. The distribution and replication depending on the partition key,… Read More
Automating SQL Caching for Amazon ElastiCache and RDS Heimdall Data, an AWS partner that offers a “DBA assistant” tool in the AWS Marketplace. This tool transparently auto-caches into Amazon ElastiCache for Redis with any relational database. This solution automates the management of a Redis query cache… Read More