Say I have created a new tablespace recently and did not yet take a backup of the datafile. Now I lose that datafile. Dilemma? No, because I can do an ALTER DATABASE CREATE DATAFILE. Sounds complex? Well even if I wouldn’t be aware of that possibility, a simple RMAN restore will work – as if there were a backup:
RMAN> create table adam.nu tablespace tbs1 as select * from adam.sales where rownum<=10000; Statement processed RMAN> alter system switch logfile; Statement processed RMAN> host 'echo kaputt > /u01/app/oracle/oradata/prima/tbs1.dbf'; host command complete RMAN> select count(*) from adam.nu; RMAN-00571: =========================================================== RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== RMAN-00571: =========================================================== RMAN-03002: failure of sql statement command at 10/20/2015 11:50:12 ORA-01115: IO error reading block from file (block # ) ORA-01110: data file 5: '/u01/app/oracle/oradata/prima/tbs1.dbf' ORA-27072: File I/O error Additional information: 4 Additional information: 131 RMAN> alter database datafile 5 offline; Statement processed RMAN> restore datafile 5; Starting restore at 2015-10-20 11:50:43 allocated channel: ORA_DISK_1 channel ORA_DISK_1: SID=187 device type=DISK creating datafile file number=5 name=/u01/app/oracle/oradata/prima/tbs1.dbf restore not done; all files read only, offline, or already restored Finished restore at 2015-10-20 11:50:45 RMAN> recover datafile 5; Starting recover at 2015-10-20 11:50:52 using channel ORA_DISK_1 starting media recovery media recovery complete, elapsed time: 00:00:01 Finished recover at 2015-10-20 11:50:53 RMAN> alter database datafile 5 online; Statement processed RMAN> select count(*) from adam.nu; COUNT(*) ---------- 10000
Cool isn’t it? Requires that you have all archived logs available since the creation of the tablespace. And besides the SQL commands inside the RMAN shell, it is not a 12c new feature. It works that way since forever, as far as I recall. Don’t believe it, test it! Maybe not on a production system ;-)
Tagged: Backup & Recovery, RMAN
The v$log_history view contains important information on how application’s users use the database , this view can help you define periods with the most activity in the database. v$log_history queries You can adapt the query to your needs, you just have to change the way you format the date to be able to drilldown to the … Continue reading Analyze database activity using v$log_history →
Full details on NEOOUG Sept 2015 presentations
November meeting we have Daniel Morgan woo hoo!
These guys are both Oracle Ace Directors and great dynamic speakers it should be a great time.
Complete information including bio's and abstracts for the sessions should be out soon.
Sorry for the radio silence but this post will make up for it ( or maybe not ha ha ) makes me grumpy
Last week at the Federal Reserve Bank of Cleveland we had a very important visitor. It was Janet Yellen the chairwoman of the well everything the chair of the Federal Reserve.
She was delivering a speech at the well known Cleveland City Club but stopped our bank. My area was involved in doing two brief demo's of what we are working on she sat on the other side of the table across from me. I did not have a speaking part ( just eye candy I guess ha ha ) but the people in my area who did speak were also in pictures. Maybe next time?
I am kind of thinking about a presentation on sql plan baselines as being something to work on this winter? There are a number of good ones out there already but the critical part of using a baseline is figuring out where to get one from ( and quickly ha ha ).
Read more here about the PRESS RELEASE: Oracle Delivers Latest Release of Oracle Enterprise Manager 12c
Service Catalog for Database and Middleware as a Service; Enhanced
Database and Middleware Management Help Drive Enterprise-Scale Private
In coming weeks , i will be covering latest topics like :
- DbaaS Service Catalog incorporating High Availability and Disaster Recovery
- New Rapid Start kit
- Other new Features
Stay Tuned !
Interesting info-graphics on Data-center / DB-Manageability
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
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