One of the key task that a DBA performs repeatedly is Provisioning of Databases which also happens to one of the top 10 Database Challenges as per IOUG Survey .
Most of the challenge comes in form of either Lack of Standardization or it being a Long and Error Prone Process . This is where Enterprise Manager 12c can help by making this a standardized process using profiles and lock-downs ; plus have a role and access separation where lead dba can lock certain properties of database (like character-set or Oracle Home location or SGA etc) and junior DBA's can't change those during provisioning .Below image describes the solution :
In Short :
- Its Fast
- Its Easy
- And you have complete control over the lifecycle of your dev and production resources.
I actually wanted to show step by step details on how to provision a 11204 RAC using Provisioning feature of DBLM , but today i saw a great post by MaaZ Anjum that does the same , so i am going to refer you to his blog here :
Other Resources :
Official Doc : http://docs.oracle.com/cd/E24628_01/em.121/e27046/prov_db_overview.htm#CJAJCIDA
Screen Watch : https://apex.oracle.com/pls/apex/f?p=44785:24:112210352584821::NO:24:P24_CONTENT_ID%2CP24_PREV_PAGE:5776%2C1
Others : http://www.oracle.com/technetwork/oem/lifecycle-mgmt-495331.html?ssSourceSiteId=ocomen
Gee, that didn’t work.
For those of you wondering about the title of this post, I’m referring to the brew package manager for Mac OS — a nice utility for installing Unix-like packages on Mac OS similar to how yum / apt-get can be used on Linux.
I particularly like the way brew uses /usr/local and symlinks for clean installations of software without messing up the standard Mac paths.
Unfortunately, there isn’t a brew “formula” for installing sqlplus and the instant client libraries (and probably never will be due to licensing restrictions), but we can come close using ideas from Oracle ACE Ronald Rood and his blog post Oracle Client 11gR2 (22.214.171.124) for Apple Mac OS X (Intel).
Go there now and read up through “unzipping the files” — after that, return here and we’ll see how to simulate a brew installation.
organize the software
mkdir -p /usr/local/Oracle/product/instantclient/126.96.36.199.0/bin mkdir -p /usr/local/Oracle/product/instantclient/188.8.131.52.0/lib mkdir -p /usr/local/Oracle/product/instantclient/184.108.40.206.0/jdbc/lib mkdir -p /usr/local/Oracle/product/instantclient/220.127.116.11.0/rdbms/jlib mkdir -p /usr/local/Oracle/product/instantclient/18.104.22.168.0/sqlplus/admin
Change to the instantclient_11_2 directory where the files were extracted, and execute the following commands to place them into our newly created directories:
mv ojdbc* /usr/local/Oracle/product/instantclient/22.214.171.124.0/jdbc/lib/ mv x*.jar /usr/local/Oracle/product/instantclient/126.96.36.199.0/rdbms/jlib/ mv glogin.sql /usr/local/Oracle/product/instantclient/188.8.131.52.0/sqlplus/admin/ mv *dylib* /usr/local/Oracle/product/instantclient/184.108.40.206.0/lib/ mv *README /usr/local/Oracle/product/instantclient/220.127.116.11.0/ mv * /usr/local/Oracle/product/instantclient/18.104.22.168.0/bin/
While these commands place the files where we want them, we’ll need to do a few more things to make them usable. If you’re using brew already, /usr/local/bin will be in your PATH and you won’t need to add it. We’ll mimic what brew does and symlink sqlplus into /usr/local/bin.
cd /usr/local/bin ln -s ../Oracle/product/instantclient/22.214.171.124.0/bin/sqlplus sqlplus
This will put sqlplus on our path, but we still need to set the environment variables for things like ORACLE_BASE, ORACLE_HOME and the DYLD_LIBRARY_PATH. Ronald sets them manually and then adds them to his .bash_profile, but I wanted to mimic some of the brew packages and have a .sh file to set variables from /usr/local/share.
To do so, I created another directory underneath /usr/local/Oracle to hold my .sh file:
cd /usr/local/Oracle/product/instantclient/126.96.36.199.0 mkdir -p share/instantclient cd /usr/local/share ln -s ../Oracle/product/instantclient/188.8.131.52.0/share/instantclient/ instantclient
Now I can create an instantclient.sh file and place it in /usr/local/Oracle/product/instantclient/184.108.40.206.0/share/instantclient/ with the content I want in my environment.
$ cat /usr/local/share/instantclient/instantclient.sh export ORACLE_BASE=/usr/local/Oracle export ORACLE_HOME=$ORACLE_BASE/product/instantclient/220.127.116.11.0 export DYLD_LIBRARY_PATH=$ORACLE_HOME/lib export TNS_ADMIN=$ORACLE_BASE/admin/network
Once I have this file in place, I can edit my .bash_profile file and add the following line:
Open up a new Terminal window and voila! A working sqlplus installation that mimics a brew package install!
Nationwide Deploys Database Applications 600% Faster
Heath Carfrey of Nationwide, a leading global insurance and
financial services organization, discusses how Nationwide saves time and
effort in database provisioning with Oracle Enterprise Manager.
- Provisioning Databases using Profiles (aka Gold Images)
- Automated Patching
- Config/Compliance tracking
A quick note on how to install EMCLI which is used for various CLI operations from EM . I was looking to test some Database provisioning automation via EMCLI and thus was looking to setup the same .
To set up EMCLI on the host, follow these steps:
1. Download the emcliadvancedkit.jar from the OMS using URL https://<omshost>:<omsport>/em/public_lib_download/emcli/kit/emcliadvancedkit.jar
2. Set your JAVA_HOME environment variable and ensure that it is part of your PATH. You must be running Java 1.6.0_43 or greater. For example:
o setenv JAVA_HOME /usr/local/packages/j2sdk
o setenv PATH $JAVA_HOME/bin:$PATH
3. You can install the EMCLI with scripting option in any directory either on the same machine on which the OMS is running or on any machine on your network (download the emcliadvancedkit.jar to that machine)
java -jar emcliadvancedkit.jar client -install_dir=<emcli client dir>
4. Run emcli help sync from the EMCLI Home (the directory where you have installed emcli) for instructions on how to use the "sync" verb to configure the client for a particular OMS.
5. Navigate to the Setup menu then the Command Line Interface. See the Enterprise Manager Command Line Tools Download page for details on setting EMCLI.
Webcast: Database Cloning in Minutes using Oracle Enterprise Manager 12c Database as a Service Snap Clone
Since the demands
from the business for IT services is non-stop, creating copies of production
databases in order to develop, test and deploy new applications can be
labor intensive and time consuming. Users may also need to preserve private
copies of the database, so that they can go back to a point prior to when
a change was made in order to diagnose potential issues. Using Snap Clone,
users can create multiple snapshots of the database and “time
travel” across these snapshots to access data from any point
Join us for an in-depth
technical webcast and learn how Oracle Cloud Management Pack for Oracle
Database's capability called Snap Clone, can fundamentally improve the
efficiency and agility of administrators and QA Engineers while saving
CAPEX on storage. Benefits include:
- Agile provisioning
(~ 2 minutes to provision a 1 TB database)
- Over 90% storage
- Reduced administrative
overhead from integrated lifecycle management
April 24 — 10:00 a.m. PT | 1:00 p.m. ET
May 8 — 7:00 a.m. PT | 10:00 a.m. ET | 4:00 p.m. CET
May 22 — 10:00 a.m. PT | 1:00 p.m. ET
Found a very good paper: http://research.microsoft.com/pubs/204499/a20-appuswamy.pdf
This paper discuss if it is a right approach of using Hadoop as the analytics infrastructure.
It is hard to argue with the industry trend. However, Hadoop is not
new any more. It is time for people to calm down and rethink about the
Thank you for visiting. This blog has been closed down and merged with the WebCenter Blog, which contains blog posts and other information about ECM, WebCenter Content, the content-enabling of business applications and other relevant topics. Please be sure to visit and bookmark https://blogs.oracle.com/webcenter/ and subscribe to stay informed about these topics and many more. From there, use the #ECM hashtag to narrow your focus to topics that are strictly related to ECM.
See you there!
A nice little feature in Oracle Database 12c is to query patching information via SQL. You can do this from SQLPlus or any other SQL interface jdbc/odbc etc. You can find more details here
However you won't be surprised to find that the following query doesn't currently return any useful information.
SYS@//oracle12c/orcl > select DBMS_QOPATCH.GET_OPATCH_LIST from dual; GET_OPATCH_LIST ------------------------------------------------------------------------------------------------------------------------ <patches/>
I’ve been using the very useful scripts from FlashDBA to run SLOB2 on our new system, but unfortunately the analyze one is not RAC aware, so I’ve modified it, in very minor ways, such that it can use an AWR Global report (
awrgrpt.sql) as input and still extract the same values that the original does.
I call the script slob2-rac-analyze.sh
Here is an example run – ignore the numbers as they are not representative of anything in particular.
a555.net(jeff.a1):/app/support/SLOB: ./slob2-rac-analyze.sh rac_awr_12jul2013/awr.20.032/awr.20.032.txt > slob.csv
Info : Analyzing file rac_awr_12jul2013/awr.20.032/awr.20.032.txt
Info : Filename = awr.20.032.txt
Info : Update Pct = 20
Info : Workers = 032
Info : Read IOPS = 85.8
Info : Write IOPS = 33.0
Info : Redo IOPS = 15.6
Info : Total IOPS = 134.4
Info : Read Num Waits = 712
Info : Read Wait Time = 0.58
Info : Read Latency us = 814.606
Info : Write Num Waits = 926
Info : Write Wait Time = 0.28
Info : Write Latency us = 302.375
Info : Redo Num Waits = 2043
Info : Redo Wait Time = 0.37
Info : Redo Latency us = 181.106
Info : Num CPUs = 384
Info : Num CPU Cores = 192
Info : Num CPU Sockets = 24
Info : Linux Version = Red Hat Enterprise Linux Server release 6.3 (Santiago)
Info : Kernel Version = 2.6.32-279.2.1.el6.x86_64
Info : Processor Type = Intel(R) Xeon(R) CPU E7- 2830 @ 2.13GHz
Info : SLOB Run Time = 300
Info : SLOB Work Loop = 0
Info : SLOB Scale = 10000
Info : SLOB Work Unit = 256
Info : SLOB Redo Stress = LIGHT
Info : SLOB Shared Data Mod = 0
Info : No more files found
Info : =============================
Info : AWR Files Found = 1
Info : AWR Files Processed = 1
Info : Errors Experienced = 0
Info : =============================
Jonathan Lewis has a nice article covering the different AWR Reports.
I’ve only tested it on the system at work and it seems to work OK – your mileage may vary and I’d be happy to hear comments to the contrary, in relation to the changes I’ve made for use on RAC, but obviously the script is still 99% unchanged, so please contact FlashDBA if there are any generic issues you want to raise.
I’m not a unix shell script guy, but it seems to work…see what you think.
A new feature in Oracle Database 12c is the ability to intercept and translate third party SQL to Oracle syntactically correct SQL before it is parsed and executed. So you can now intercept SQL from applications using jdbc and odbc that were designed to run against a non Oracle database and potentially run them completely unchanged. The only work necessary is done by the database development/management team. In Oracle Database 12c we also currently support the automatic translation of some databases SQL. Currently this is limited to Sybase but we're working on others. You can find all the details here
You can also use the frame work against an application that already successfully runs against an Oracle Database. You might want to do this for migration/performance/security reasons. It also gives you an opportunity to try out an important part of the framework "Translation Profiles".
The following SQL demonstrates a simple use case. I'm using the Swingbench Order Entry schema but the sample schema OE would work just as well.
First grant the privilege to the user you want to create the SQL profile on in this case SOE. You need to do this as sys or system
grant create sql translation profile to SOE
Then connect to the user you've just granted the privilege to (SOE) and create a SQL Translation profile.
-- Drop the profile if it already exists -- exec DBMS_SQL_TRANSLATOR.DROP_PROFILE('ORDERS_APP_PROFILE'); -- Create a Translation Profile exec dbms_sql_translator.create_profile('ORDERS_APP_PROFILE');
Then add some SQL to be translated. In our simple example we are translating a count against the ORDERS table and translating it to run against the ORDERS_SOUTH table
-- Create a Translation in that profile BEGIN DBMS_SQL_TRANSLATOR.REGISTER_SQL_TRANSLATION( profile_name => 'ORDERS_APP_PROFILE', sql_text => 'select count(*) from orders', translated_text => 'select count(*) from orders_south'); END;
At this stage it's worth seeing whats been populated. You can see the SQL via the following views.
select * FROM USER_SQL_TRANSLATION_PROFILES; select * from USER_SQL_TRANSLATIONS;
Then test how this changes the execution by creating our new "ORDERS_SOUTH" table
-- Count the rows we get back from orders select count(*) from orders; -- Create a new table orders_south with just ten rows in create table orders_south as select * from orders where rownum < 11;
Now we've done that enable the sql translation profile we want to use
-- Set the session to use the sql translation profile alter session set sql_translation_profile = ORDERS_APP_PROFILE -- For testing make the sqlplus look like a foreign tool alter session set events = '10601 trace name context forever, level 32';
Now when we re run our query it will use the ORDERS_SOUTH table even though we've explicitly asked for a count against the ORDERS table.
select count(*) from orders;
-- We should just see 10 rows as opposed to hundreds of thousands
And thats a quick example of SQL Translator profiles in Oracle Database 12c
This blog is going production... Just like Oracle Database 12c.
Comments and code snippets to follow