Sunday, July 28, 2013

How to change the open mode of listed PDBs

The clauses of the ALTER PLUGGABLE DATABASE statement that modify the mode of a PDB are:
- OPEN READ WRITE [RESTRICTED] [FORCE]: it opens the PDB in read/write mode;
- OPEN READ ONLY [RESTRICTED] [FORCE]: it opens the PDB in read-only mode;
- OPEN UPGRADE [RESTRICTED]: it opens the PDB in migrate mode;
- CLOSE [IMMEDIATE]: it places the PDB in mounted mode and it is the PDB equivalent of the SQL*Plus SHUTDOWN command;

When using the RESTRICTED option, only users with RESTRICTED SESSION privilege can log into the PDB: all other sessions connected to the PDB without RESTRICTED SESSION privilege are terminated and their transactions rolled back.
When FORCE is specified, the statement opens a PDB that is currently closed and changes the open mode as specified.

To modify the open mode of one or more PDBs you have to ensure that the current container is the root:
SQL> SELECT SYS_CONTEXT ('USERENV', 'CON_NAME') FROM DUAL;

SYS_CONTEXT('USERENV','CON_NAME')
--------------------------------------------------------------------------------
CDB$ROOT
Let's get information about current pluggable databases querying the V$PDBS view:
SQL> select NAME, OPEN_MODE, CON_ID from V$PDBS;

NAME          OPEN_MODE      CON_ID
------------------------------ ---------- ----------
PDB$SEED         READ ONLY    2
PDB001          READ WRITE    3
PDB002          READ WRITE    4
I want to "shutdown" the pluggable database identified as PDB001: all current connected sessions will be terminated and their transaction rolled back.
You need to use the alter pluggable database command:
SQL> alter pluggable database pdb001 close immediate;

Pluggable database altered.
The specified pluggable database is put in MOUNTED mode:
SQL> select NAME, OPEN_MODE, CON_ID from V$PDBS;

NAME          OPEN_MODE      CON_ID
------------------------------ ---------- ----------
PDB$SEED         READ ONLY    2
PDB001          MOUNTED     3
PDB002          READ WRITE    4
If you want to open the pluggable database PDB001 in READ ONLY mode you can use again the alter pluggable database command:
SQL> alter pluggable database pdb001 open read only;

Pluggable database altered.
It's now open in READ ONLY mode.
SQL> select NAME, OPEN_MODE, CON_ID from V$PDBS;

NAME          OPEN_MODE      CON_ID
------------------------------ ---------- ----------
PDB$SEED         READ ONLY    2
PDB001          READ ONLY    3
PDB002          READ WRITE    4
What does it happen when you try to open it in READ WRITE mode ?
SQL> alter pluggable database pdb001 open read write;
alter pluggable database pdb001 open read write
*
ERROR at line 1:
ORA-65019: pluggable database PDB001 already open
Oracle throws the following exception:
[oracle@localhost trace]$ oerr ora 65019
65019, 00000, "pluggable database %s already open"
// *Cause:  An attempt was made to open a pluggable database that was already
//          opened.
// *Action: Check V$PLUGGABLE_DATABASE.STATE.
If you want to open in READ WRITE mode your pluggable database, currently in READ ONLY mode, you have to add the FORCE option to the previous command:
SQL> alter pluggable database pdb001 open read write force;

Pluggable database altered.
The pluggable database is now open in READ WRITE mode again:
SQL> select NAME, OPEN_MODE, CON_ID from V$PDBS;

NAME          OPEN_MODE      CON_ID
------------------------------ ---------- ----------
PDB$SEED         READ ONLY    2
PDB001          READ WRITE    3
PDB002          READ WRITE    4

In the next post I will decribe the limitations of the open mode of the root imposed on the open mode of PDBs.

That's all.

11 comments:

oakleyses said...

oakley sunglasses, prada handbags, oakley sunglasses, longchamp handbags, longchamp handbags, louboutin shoes, louis vuitton handbags, coach factory outlet, tiffany and co, coach purses, louis vuitton outlet, polo ralph lauren outlet, air max, prada outlet, longchamp outlet, oakley sunglasses cheap, ray ban sunglasses, louboutin outlet, michael kors outlet, michael kors outlet, tiffany and co, burberry outlet, christian louboutin shoes, coach outlet store online, jordan shoes, polo ralph lauren outlet, louboutin, kate spade handbags, michael kors outlet, coach outlet, air max, gucci outlet, michael kors outlet, ray ban sunglasses, chanel handbags, michael kors outlet, tory burch outlet, nike free, kate spade outlet, louis vuitton outlet, burberry outlet, louis vuitton outlet stores, louis vuitton, nike shoes, michael kors outlet

oakleyses said...

air max, hollister, true religion outlet, nike blazer, louboutin, ray ban sunglasses, polo ralph lauren, michael kors, true religion jeans, sac guess, sac longchamp, hogan outlet, ralph lauren, vans pas cher, sac louis vuitton, air max pas cher, nike free pas cher, nike free, air max, mulberry, nike roshe run, sac burberry, hollister, vanessa bruno, louis vuitton, lululemon, michael kors pas cher, oakley pas cher, air jordan, ray ban pas cher, new balance pas cher, polo lacoste, converse pas cher, north face, sac louis vuitton, michael kors, sac hermes, nike tn, timberland, louis vuitton uk, longchamp, true religion jeans, nike air max, air force, north face

oakleyses said...

abercrombie and fitch, instyler, ghd, bottega veneta, ugg boots, jimmy choo outlet, soccer shoes, ugg pas cher, herve leger, beats by dre, birkin bag, abercrombie and fitch, north face jackets, soccer jerseys, mont blanc, rolex watches, lululemon outlet, celine handbags, nike roshe run, nike trainers, giuseppe zanotti, hollister, wedding dresses, nike huarache, mcm handbags, vans shoes, chi flat iron, babyliss pro, north face outlet, nike roshe, ugg australia, ugg, marc jacobs, barbour, nfl jerseys, p90x, new balance shoes, asics running shoes, ferragamo shoes, mac cosmetics, insanity workout, uggs outlet, reebok outlet, longchamp, valentino shoes

oakleyses said...

converse, air max, gucci, canada goose, juicy couture outlet, canada goose, wedding dresses, moncler, ralph lauren, lancel, montre homme, moncler, louboutin, oakley, karen millen, vans, coach outlet store online, air max, canada goose jackets, ugg, hollister clothing store, louis vuitton, baseball bats, hollister, rolex watches, juicy couture outlet, iphone 6 cases, canada goose uk, canada goose outlet, ugg, moncler, moncler outlet, timberland boots, hollister, supra shoes, moncler, canada goose, converse shoes, toms shoes, moncler, moncler, canada goose, ugg boots, ray ban, parajumpers, canada goose

Nike Free said...

The most bizarre Ray-Ban design In ‘Fear and Loathing in Las Vegas’, that weird thing on Raoul Duke’s Aviators was a cigarette holder. This is considered as one of the most bizarre Ray-Ban designs ever.Tom Cruise’s effect Time and again, Tom Cruise has been credited for increasing the fake ray bans sales of Ray-Ban sunglasses. In 1983, he was seen in ‘Risky Business’ wearing a pair of Wayfarers. That year, the sales of Ray-Ban increased by 50 percent. Three years later, he was seen sporting Aviators in films. This led to a 40% increase in ray ban sunglasses the sales of Ray-Ban eyewear.Did you know these facts about Ray-Ban before? Now, go ahead and share these with your friends and close ones and be known as a Ray-Ban expert.Over the years, sunglasses have ceased to exist as a mere protective gear. Celebrities prescription ray ban sunglasses across the globe are seen sticking to sunglasses, even as they ditch designer labels or peels of makeup. No matter what time of the day or night it is, a smart pair of glares is capable of making or breaking a personality.
There are ray bans glasses two categories of people, the ones who love Ray Bans and the ones who don’t. For those who do, no reasons are required to sport one of these classic shades, and for the latter, give them a try. You won’t regret your decision.Like one cheap ray ban sunglasses must see the Eiffel Tower once in a lifetime, it is a must to own a pair of Ray-Ban sunglasses once in your life! There may be numerous fancy designer brands of sunglasses doing the rounds, but none has reached the iconic status enjoyed http://www.ray-bansunglasseswarbyparker.com by Ray-Ban for decades.
Always remember that by taking good care of your Ray-Ban sunglasses, you are helping them and yourself to look and perform great. Like any other equipment, sunglasses too require good care and regular clean-up and maintenance to last long and cheap ray bans stay in premium condition.It’s time to face the urban jungle. The Camouflage, aka Camo prints are in full force this summer season. From Milan Fashion Week to FTV models, from men to women – everyone is going wild with the Camo.Whiel the military-inspired motif ray ban eyeglasses was always a favourite with men, it’s selling like hot cakes for women too now.Design inspiration
World’s leading eyewear brand, Ray-Ban is not only about fashion and style but also about the warby parker high quality, effective functionality and latest technology. Designed with different patterns and colours, these single vision eyeglasses or fashionable shades are out to enchant the world. You can view and buy these shades at LensKart.com. LensKart is India’s leading online shopping portal which sells hundreds of eyewear brands from premium to low priced. The site is quite famous among people since here glasses and shades corresponding to every outfit and ray-ban sunglasses occasion are available.

Nike Free said...

While the "Rand" Wayfarers are no longer available, the Paul supporter susceptible to ultraviolent rays still has a protective option. Paul's online store offers a baseball ray ban outlet hat tagged with the "Rand" logo for $25 that should do the trick.We all know skin can burn in the hot sun - yet few people realise their eyes are also vulnerable.Sometimes they will actually hurt immediately after sun exposure, but more often damage accumulates over the years, leading to sight problems.The ultraviolet rays from the sun - in particular UVB, the same spectrum of ultraviolet that causes the skin to burn - are most damaging to the eyes.
Check the nose pad. The nose pad RB should read correctly when the glasses are held upside down.Look at the carrying case. Cases should include a quality cleaning cloth and an information book printed by the company as well as a distribution seal printed on the case itself.Compare price. If you find brand name glasses for $10, they are probably not real. Even discount dealers like Simply Sunglasses cannot sell real brand name sunglasses at a 90 percent discount.Simply Sunglasses Offers Ray-Bans at Great Prices
This exciting new feature offers you a unique way to stand out from ray ban sale the crowd by rocking the iconic Ray-Ban Aviator and Wayfarer silhouettes in a completely personalised colour way. The design process is incredibly streamlined and involves three simple steps: choosing a model, remixing the colours and lenses, and adding your personal finishing touch through engravings on the temples and case.With a total of seven possible models, the variety of frames and lens combinations is incredible. Everything from tortoiseshell to semi-transparent rubber is featured alongside standard, gradient, mirrored or polarised lenses.As always, all the Ray-Ban lenses ray ban wayfarer offer 100% UV Eye Protection and Durability technology, whilst the other details serve to make your glasses as stylish as can be. The glasses are offered in all the classic sizes of the other Ray-Ban lines, so if you’ve been a customer before, you’ll have no trouble finding your perfect pair.
Since pilots were flying farther, faster, and higher than ever before, these Icaruses would come down with massive headaches from the bright sun. Lieutenant General John MacCready of the U.S. Air Corps called ray ban sunglasses up Bausch & Lomb, who tackled the situation and unwittingly left the greatest mark on the history of eyewear.The first guy to popularize the Aviator was not a celebrity, but rather General Douglas MacArthur.When he landed on a beach in the Philippines during WWII, photojournalists snapped pics that would give the shades their first global exposure. They became popular with the French Army soon after, giving the Arkansas-born commander the fashion validation that he obviously didn't need.The original Ray-Ban prototype had green-tinted lenses and ray ban eyeglasses was made of plastic.
Sales stagnated in recent years, rebounding in the second-half of 1997 thanks to promotional tie-ins to the hit film "Men in Black." As a result of that movie, Ray-Ban saw a threefold increase in sales of its Predator line.

Nike Free said...

The Jordan Horizon‘s DNA is predominantly made up of inspiration from the Air Jordan 13. You can see it in the outsole and overall shape of the silhouette, but this time around, Jordan Brand’s latest lifestyle model adds to that list of retro inspirations through a new colorway. The French Blue shade was made famous by the Air Jordan 12 and for good Air Jordan 11 Retro 72 10 reason. The hypnotizing azure shade is unique to JB’s heritage and works rather well on this silhouette as a bolstered mesh sees a contrasting cheap jordans for sale white webbing throughout. Check out more official photos below and we’ll keep you updated on a release date in the near future as this jordans 2016 pair could release as soon as February.
We doubted that Carmelo Anthony would actually be a fan of this latest Jordan Melo M12 given cheap jordan shoes that the colorway depicts his alma mater’s Big East rival Marquette’s signature colors. But Melo went ahead and tweeted out the PE and thanked jordan 11 legend blue the squad for their support anyways. Perhaps Melo flashed back to his days playing in Denver given the similar aesthetic or even his prime jordan 13 college years competing against jordans for sale the Golden Eagles. In one of the flashiest looks to date, the M12 features a bright sky blue mesh upper complete with a contrasting midnight navy heel plate that sees Marquette’s logo subtly imprinted on the back and insole. Are you a fan of the jordans shoes look? Check out a full look after the break and we’ll keep you updated with more on-feet selections right here on Sneaker News.
cheap jordans

oakleyses said...

jordan shoes, christian louboutin, uggs outlet, michael kors outlet online, uggs on sale, louis vuitton outlet, louis vuitton outlet, louis vuitton, ray ban sunglasses, replica watches, christian louboutin uk, chanel handbags, michael kors outlet online, uggs outlet, longchamp outlet, nike air max, michael kors outlet, burberry handbags, tiffany and co, polo outlet, nike free, nike air max, ugg boots, oakley sunglasses, ray ban sunglasses, michael kors outlet online, oakley sunglasses, christian louboutin outlet, longchamp outlet, prada handbags, gucci handbags, prada outlet, oakley sunglasses wholesale, michael kors outlet, oakley sunglasses, kate spade outlet, christian louboutin shoes, louis vuitton outlet, tory burch outlet, ugg boots, michael kors outlet online, burberry outlet, cheap oakley sunglasses, louis vuitton, ray ban sunglasses, nike outlet, longchamp outlet

oakleyses said...

sac vanessa bruno, new balance, vans pas cher, ray ban uk, nike blazer pas cher, true religion outlet, michael kors outlet, true religion outlet, replica handbags, polo lacoste, oakley pas cher, coach purses, hollister uk, abercrombie and fitch uk, nike free uk, north face uk, louboutin pas cher, polo ralph lauren, hollister pas cher, nike air max uk, michael kors pas cher, nike air max, true religion jeans, timberland pas cher, nike air max uk, coach outlet, air max, michael kors, jordan pas cher, sac hermes, north face, lululemon canada, coach outlet store online, nike roshe, sac longchamp pas cher, nike air force, mulberry uk, hogan outlet, ralph lauren uk, longchamp pas cher, michael kors, converse pas cher, burberry pas cher, nike roshe run uk, true religion outlet, kate spade, nike free run, nike tn, ray ban pas cher, guess pas cher

oakleyses said...

asics running shoes, babyliss, soccer jerseys, hermes belt, reebok outlet, ipad cases, oakley, iphone cases, soccer shoes, iphone 5s cases, nfl jerseys, north face outlet, abercrombie and fitch, ghd hair, vans outlet, iphone 6 cases, hollister, nike roshe run, wedding dresses, mac cosmetics, lululemon, new balance shoes, jimmy choo outlet, instyler, giuseppe zanotti outlet, p90x workout, s6 case, chi flat iron, iphone 6s cases, longchamp uk, baseball bats, mcm handbags, iphone 6 plus cases, bottega veneta, ferragamo shoes, timberland boots, mont blanc pens, insanity workout, nike air max, nike trainers uk, herve leger, nike huaraches, celine handbags, north face outlet, beats by dre, iphone 6s plus cases, valentino shoes, ralph lauren, hollister clothing, louboutin

oakleyses said...

moncler uk, louis vuitton, thomas sabo, wedding dresses, barbour, moncler, gucci, montre pas cher, supra shoes, hollister, barbour uk, nike air max, karen millen uk, pandora uk, moncler, canada goose uk, coach outlet, ugg, juicy couture outlet, swarovski, canada goose, louis vuitton, moncler outlet, louis vuitton, hollister, ugg,ugg australia,ugg italia, canada goose outlet, replica watches, pandora jewelry, ugg,uggs,uggs canada, moncler, canada goose outlet, ugg pas cher, louis vuitton, juicy couture outlet, swarovski crystal, louis vuitton, canada goose, pandora charms, canada goose outlet, links of london, marc jacobs, lancel, converse, converse outlet, toms shoes, doudoune moncler, moncler, pandora jewelry, canada goose jackets, vans, canada goose