Posts Tagged ‘Oracle Database’

Oracle Data Guard new behaviour in a switchover

It has been a while since I last posted, but here I  go again.

I was recently installing Oracle Data Guard for a client that is running 11.2.0.2 on a Windows Servers 2008 system.  After configuring Data Guard I started testing the switch overs. As per the  instructions I was using  for Data Guard, I tested. I was  issuing a switchover to standby and then issuing a shutdown in the primary server. The shutdown caused Oracle to display an error ORA-01092 Oracle Instance Terminated. This was a bit disconcerting as without anything to go by it seemed that the instance had done an abort. Some research found in the alert log the following

Switchover: Primary controlfile converted to standby controlfile successfully. Switchover: Complete – Database shutdown required Completed: alter database commit to switchover to physical standby with session shutdown Fri Oct 21 10:21:15 2011 Performing implicit shutdown abort due to switchover to physical standby Shutting down instance (abort) License high water mark = 28 USER (ospid: 6244): terminating the instance Instance terminated by USER, pid = 6244 Fri Oct 21 10:21:18 2011 Instance shutdown complete ORA-1092 : opitsk aborting process

Now for me I don’t like when I issue a command and something entirely different happens, i get a little concerned. The SQLPlus session may have to be closed after this happens., as it is no longer connected to the instance.

In the absence of finding the knowledge from the documentation, it is there, I raised an SR and got a response explaining that this is in fact now the behaviour from 11.2 onwards as this allows the switchover to proceed faster. I would have liked either an error when I tried to issue the shutdown or the shutdown immediate however at this time this is not the case, I am not sure if there is any alternative with the SQLplus handling the abort

So don’t be concerned by this error if you are using Data Guard in 11.2 onwards as this is expected behaviour.

I hope this makes some else life a little easier

 

See ya round

Peter

Share

Schema objects with the same name in Oracle 11.2

I read a recent article about the way in which an table name supposedly could not have the same name as a the database name  in SQL Server 2008, this was possibly valid at some time in a previous version. Now most are aware that objects in a different schema in an Oracle DB can have the same name, but can a table and a view, or a table and an index have the same names. So here is a few little tests and lets see what I found.

CREATE USER test1 IDENTIFIED BY test1 DEFAULT TABLESPACE test1;

GRANT CREATE TABLE TO test1;

GRANT CREATE TYPE TO test1;

GRANT CREATE VIEW TO test1;

GRANT CREATE SESSION to test1;

Log in as user TEST1

SQL> create table test1(                                     2  test1 varchar2(10),   3  test1 number(10,2)); test1 number(10,2)) * ERROR at line 3: ORA-00957: duplicate column name Ok thats fair enough

SQL> create table test1(   2  test1 char(10),   3  test2 varchar2(10),   4  test3 number(10,2));

Table created.

SQL> create index test1 on test1(test1);

Index created.

create view test1 as (select test1 from test1); create view test1 as (select test1 from test1)             * ERROR at line 1: ORA-00955: name is already used by an existing object

And that one makes sense as well

So it really makes sense when you think about it if I want to select from an object in the context it is used eg select test1 from test1 is valid to I can have a column in the table test1 called test1 I can have an index the same name but I could not have a link in this schema as test1 as that would be confusing with this schema. I could not have a global link in the database as selecting from the test 1 schema or the Link would not differentiate, I can however have any number of the same object names across many schemas, many developers know this often having their own schema in the database for the code they are working on.

Juast a side note I saw in a Don Burleson article a mention that GRANT CREATE INDEX doesn’t work in some distributions, I found that to be true in my 11.2 distribution on Linux x64. It would appear that the GRANT CREATE TABLE provides the support for creating indexes.

I hope this might help in someone understanding of using object names in Oracle databases.

Oh what was the answer with SQL Server, well it was like Oracle a database and table name can be the same.

 

See ya round

 

Peter

Enhanced by Zemanta Share

Does anyone use the VSS writer technology?

Hi

I recently had to do some installations on a windows server running on a VM. This made me have a look at the VSS technology and at the end can to the conclusion that VSS has limited usefulness for most Oracle sites. Now someone might correct me and show what is missing in my understanding but without regular say hourly snapshots to another place its adds little value. Wouldn’t a daily rman backup and regular backups of archive logs provide a better alternative?

I understand some SANS can provide SAN mirroring with the use of VSS, but to do this the database still have to be quiesced. From what I looked at Data Guard is a much better solution for a recovery from many failure situations. Doing snapshots with VM technology leaves you with a potentially degraded database, some testing suggested in a slow system, that is one with a very low transaction rate it perhaps will be recoverable. Some testing I did left me with  a question mark over what might happen in the event of  a problem occurring.

I ran some tests and had it snapshotted whilst conducting a number of transactions using Jmeter to create some traffic on the database without using VSS to determine if a database was recoverable from a snapshot, in each case as the redo logs were ok the database recovered and started, I identified that this was only good luck as in different circumstances this could easily been in a situation whereby this database became unrecoverable, basically what had happened was all my redo logs were still at the same SCN number and as such the database simply recovered as when a shutdown abort occurs.

 

Oracle provides a fantastic tool in RMAN and Data Guard if you need fast recovery from some situations and using VM snapshots with VSS  or without may not be your best option, check out thoroughly any recovery scenarios you may need to handle and especially your lost time window when you cannot apply logs before choosing one over the other. I am sure in many cases Oracle will provide you with better alternatives than external tools such as VM snapshots.

 

What has been your experiences and what paths have you chosen and why? I am interested to hear

 

 

See ya round

Enhanced by Zemanta Share

Oracle Security Basics – Internal Database Features

There is a lot of information to know and understand about Oracle Security and the internal database features. The security features that i will discuss here are those that are internal to the database and in future articles I will look deeper into some of these articles. Transparent Data Encryption (TDE) is the ability to encrypt data internal in the database so it appears only as encrypted strings to those that don’t have appropriate privileges. The data is encrypted by column so only that information that is truly sensitive such as the credit card number or health care number that could identify a patient is encrypted. The encryption requires the use of the wallet. Ideally it would be kept in a separate file system which increases the level of difficulty of it being recovered along with the database from backups in the event of it being stolen. It need not be as the master key cannot be retrieved without the wallet password. The great feature of Transparent Data Encryption is that it works without altering any application code or features. A few quick changes, you can enable transparent data encryption in around 30 minutes with a few simple changes.

Proxy User is another great feature that is there to allow middle tiers to connect to the database with restricted privileges. This then means that a connection to the database from the middle tier that is compromised in an attack as not so likely to expose the data. The other feature that this brings is that in increases the audit capabilities from a three tier application. This feauter from 10gR2 is available via both thick and thin client. There is credential proxy which requires certificates and Internet Directory to associate the certificate with the LDAP DN for the user. The other feature in this is Application user proxy. Many application servers use a connection pool that is using a single user to connect to the database. This allows application users to be traced within the sessions created with the connection pool Using Internet directory is an additional feature as identification of users can be very clearly defined and privileges are able to be managed from central privilege sets. Another useful feature is the shared schem user that can be configured in the Internet Directory This user is able to be mapped along with any others to a single schema and provided with a role that controls what that user has access to. These would be great for use with tools like Discoverer, where users could be logged into a schema with managed views of data and then through applied privileges have data access restricted.

Other features to discuss are Virtual Private database and Row Level Encryption, then there is Auditing and fine grained auditing to boot, which allows very intense scrutiny of what people are looking at.  When Oracle 10g came out there was additional auditing of the SYSDBA account and Oracle Vault has also been added to the mix. These are all features to protect your data within the database. There are still many external features available to protect communications to the database and protect the data at rest in backups or elsewhere. In wrapping up Oracle has many security features internal to the database that allow the DBA to configure a level of security for the businesses needs to protect important data. I will discuss this in greater details in future articles on security that I have coming up

See ya round

Peter

Share

Guess the future – Predictions for Oracle-Sun post the merger

Ok I am sure others are thinking things but I am going to be bold and list my predictions for the world as it may be post the Sun Oracle Merger. I have been telling this to people around the office and I thought well lets make a real fool and try it out there in the big wide world.

This is my take on how the Sun products fare after the merger, here we go:

MySQL will be bigger and better than ever

Why you ask, MySQL has a huge base in lightweight databases across the web supporting many Open Source projects and millions of websites. Oracle cannot sell Oracle databases licenses to all those Most cannot afford it and many will just migrate to a new free product. Instead Oracle will increase support for MYSQL doing what it does best. It will look to leveraging from those customers so that when they need to scale up to something bigger for a project, they will look to Oracle for the Oracle database to support that project. Oracle already a couple of years ago bought a transaction engine for My SQL, so that will dovetail in nicely. One of the first things I expect oracle to do is get the MySQL people together to understand the issues with the fragmentation of the code base and forks that have developed and bring everyone back to the same single code base. It is to Oracles best interest to have the efforts singularly focused to utilise MySQL as a great feed product into the use of the other products and Oracle Support for your MySQL databases.

Prediction: It’s staying and will get bigger and better

Java & Java FX

This is probably the real baby oracle wants out of all this. They have been major contributors for a number of years to the development of Java. Oracle has a huge investment in Java and its future, They will tend and care for it well as if they convince IBM of their unworthiness of holders of the flag IBM will make their life hell. It probably will not help either and be a benefit to Microsoft more than any other. FX will have a lot of effort poured into it to develop rich Java applications this is something Oracle will see great benefit in not only for their own products but for many other products. Expect to see a lot of good stuff come from the Java team to support all Java developers to build fast rich and easy developed Web Applications.

Prediction: It’s staying and will get bigger and better

Solaris X86

This has been a niche product for most of its life. It had many issues and Sun never saw it worth developing fully. I don’t see it going away instead I see the Open Source project being better resourced to garner product enhancements that go into the SPARC platform. Expect a solid X86 Open Source project, but don’t expect Oracle databases to run unless it develops code compatibility with Linux and its usage widens dramatically. Oracle has supported Oracle 10 on x86 but has seen little penetration.

Prediction: Will remain as Open Source

Application Server Glassfish

The Glassfish project will remain and will be open-source, the commercial end will go as Oracle focuses its efforts on Weblogic. Interesting and useful features and ideas will evolve in Glassfish and be ported into Weblogic.

Prediction: Its staying but only as open source

Sun hardware business

Particularly the SPARC business was always part of the main plan so it has a proposed long life ahead. X86 there is no reason to ditch it as it runs the Linux program of which there is a large investment on Oracles part. hardware not going anywhere and I expect further acquisitions to build out the Sun hardware product range over time to provide a Sun data centre.

Prediction: Its staying, but only as open source

Identity Management

Sun has a good business here and some of the Oracle product might end up dead instead, replaced by Sun product. Once again the open Source projects will be alive and well. Oracle has a great source of product ideas in all the open source project, They are great at the business end and will monetise it. Some will stay and some will be retired as oracle puts together a better solution out of existing and the new Sun gear.

Prediction: Some of it is staying

NetBeans

Netbeans is possibly going to fold. Oracle already has JDeveloper and supports Eclipse for Weblogic. I don’t see why this would be kept unless it has a substantial user base that is worth maintaining.

Prediction: I expect it to go.

OpenOffice

This just doesn’t fit with Oracle, but could it I do think it has great value. Weave the oracle Instant client into the product in the Star Office version or just make it easily integrate and allow the use of Open Office base or any other part be able to integrate to the databases both Oracle and MySQL. I see further integration to other products in the Oracle suite driving a compelling reason for corporations to give Open Office some daylight in their product mix.

Prediction: Its staying

The wrap

I also see Oracle working to develop a bundle for deployment that targets Microsoft from the bottom in the application server and database market using Linux/Solaris x86/Glassfish and MySQL as the basis of that offering. many of them would not have bought Oracle but will have to opportunity of buying Oracle support for their bundled server. Oracle only needs to add some great console tools similar to a CPanel product that web hosts already use and a well managed web driven appliance product is ready to rock and white ant the low end MS customer base

I think the new Sun driven Exabyte “Wow what a machine is showing the way of the future with the Sun Oracle Merger and unfortunately it doesn’t run Solaris for those that were wondering”

There will be some products that end, but they probably never would have lived with Sun as an independent business anyway.

So that’s my predictions

Anyone else willing to guess the future?

See ya round

Peter

Reblog this post [with Zemanta] Share
Improve the web with Nofollow Reciprocity.
ClickBank Products
moneymaker63 Mae Ploy Thai Restuarant
Great
What I'm Doing...

Posting tweet...

Powered by Twitter Tools