Coskan’s Approach to Oracle

July 30, 2007

Nice RMAN command for double checkers or careless ones

Filed under: Backup/Recovery — coskan @ 2:38 pm

Suppose that, you have a RMAN command file and you are sure about the syntax of the commands you wrote. You scheduled it to run at midnight ( without testing on any test server) on production system, and when you came to office next day you saw that the script failed due to a syntax error. To avoid this kind of errors RMAN of 10G R2 has a new feature to check the syntax before you run them. The command is CHECKSYNTAX, what it does is only check the syntax of the commands you give as an input, also you do not need any target connection to run this command. Lets see how it works

Usage is simple

C:\Documents and Settings\cgundogar>rman checksyntax
Recovery Manager: Release 10.2.0.1.0 – Production on Pzt Tem 30 17:28:29 2007Copyright (c) 1982, 2005, Oracle. All rights reserved.RMAN> backup database;The command has no syntax errors

RMAN> backup datafile;

RMAN-00571: ===========================================================

RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============

RMAN-00571: ===========================================================

RMAN-00558: error encountered while parsing input commands

RMAN-01009: syntax error: found “;”: expecting one of: “double-quoted-string, integer, single-quoted-string”

RMAN-01007: at line 1 column 16 file: standard input

for command files you only give the input file and take the result set;

suppose that your command file is like below

run {
allocate channel ch1 type disk;
restore archivelog ;
}

C:\Documents and Settings\cgundogar>rman checksyntax
Recovery Manager: Release 10.2.0.1.0 – Production on Pzt Tem 30 17:28:29 2007Copyright (c) 1982, 2005, Oracle. All rights reserved.RMAN> @rman.txt

RMAN> run {

2> allocate channel ch1 type disk;

3> restore archivelog ;

RMAN-00571: ===========================================================

RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============

RMAN-00571: ===========================================================

RMAN-00558: error encountered while parsing input commands

RMAN-01009: syntax error: found “;”: expecting one of: “all, from, high, like, logseq, low, scn, sequence, time, until”

RMAN-01007: at line 3 column 20 file: rman.txt

When you give the correct command the output will be like below

C:\Documents and Settings\cgundogar>rman checksyntax
Recovery Manager: Release 10.2.0.1.0 – Production on Pzt Tem 30 17:28:29 2007Copyright (c) 1982, 2005, Oracle. All rights reserved.RMAN> @rman.txt

RMAN> run {

2> allocate channel ch1 type disk;

3> restore archivelog all;

4> }

The cmdfile has no syntax errors

RMAN>

RMAN> **end-of-file**

References Used:

10G R2 Documentation – Backup and Recovery Basics

July 27, 2007

UK will be my new home

Filed under: Diary — coskan @ 10:38 am

 I was thinking of going , living and working in UK, since 1992 .  Yesterday, I got the news of having HSMP Visa approved and my childhood dream became true. It will be very hard for me to change my whole life, but  I need a fresh start after 28 years. I will be in UK in October and I hope I can get used to UK daily and business life asap.  I did not find any employer yet, nevertheless I hope to find one before I go to UK.  I will quit my recent job in September and I wish Oracle 11g will be available before  September and I can try the new features of 11g and share my experiences with you for one month.

July 23, 2007

latch: cache buffer chain with negative address value

Filed under: Tips — coskan @ 2:40 pm

Sometimes I face with negative P1 value from the 10046 trace output of some sessions. The output like below
WAIT #9: nam=’latch: cache buffers chains’ ela= 1 p1=-4611686000696528624 p2=116 p3=0

When I try to convert this value to hexadecimal to use as an input to find the hot block (metalink note id 163424.1) . I searched internet, metalink but I couldn’t find any answer, till Ogun Heper, one of the members of Turkish Oracle Users (DBA & Developers), answered the reason of my problem.

The reason was simple, the sign bit of the p1 value was 1 and this causes to get negative value when using 64 bit OS.
If you want to convert it to hexadecimal value by using Glenn Fawcetts useful convertion script, you must first add 2 to the power 64 to the p1 value then convert the value to module 16.

You can find the modified script of Glenn Fawcett here

July 11, 2007

Oracle 11g is launched

Filed under: Diary — coskan @ 4:47 pm

I watched the launch of Oracle New release 11g 20 minutes ago. I couldn’t catch all of the presentations, but I caught some highlights about what Oracle 11g promises us.

1- Partitioning advisor: Oracle 11g will give us advises for partitioning tables on which column and what type of partitioning.

2- Automated partitioning: You will not have to worry about the creating new partitions for upcoming dates . Oracle 11g will do it or you.

3- Business driven partitioning: Oracle 11g enlarge the composite partition capabilities. Prior to 11g we can only do hash over range partitioning or list over range partitioning. Now we have 3 more composite partitioning options.

  1. Range over range partitioning
  2. range over list partitioning
  3. list over list partitioning

4- Information Lifecycle Management (ILM): ILM will help you about management of your mature, less active data.
5- Advanced compression: By advanced compression we can compress our data up to 3X and this will ease our life about archiving our database

6- Rolling online upgrade with data guard: You will do your upgrade on your standby database then switchover to standby database and upgrade your primary database by this way Oracle 11g can promise us no downtime for upgrading process. From now on, you do not need to have a RAC database to make online upgrades, what you only need is to have a standby database which is according to me a must for high availability . (If you don’t have yet start to Think more to have a standby database).

7- Real application testing: if it work as it said to be, I think this feature is a revolution for testing. You capture the workload from your database and apply it to your test environment which is replicated from your database. Think about how much time you save when this happens (minimum test environment preparation time and minimum testing duration minimum effort for creating stress scenarios)

I saw so many enhancements about spatial and streams which are not my main topics, but I hear that the guest CIO s, told how much they liked those features.

you can find more about Oracle 11g from official site

I cross my fingers and start to wait to download the new release for trying new features.

July 4, 2007

Database users vs Database Admins

Filed under: Diary — coskan @ 7:31 am

Today I read the great, funny post of

  1. Database users are just like women, they will always want more.
    (I am not a misogynist, do not hate me, I never met a woman who doesn’t want more :) )
  2. If you ever run a sql 100 times and 99 of them lasts only 1 second and only one of them lasts 5 minutes, then they would nevertheless come up with the idea that the database is slow. They will never look at the bright side :( When they experience any slowness for just only one time, it would be very hard for you to erase this experience from their minds.
  3. This is the reality of DBA business. Do not get angry to the “others”, do what Jeff did (Say them “I need to get back to my office, call me if you have any problems.” :)) )

July 2, 2007

Campaign against separately licensed Diagnostics Pack

Filed under: Uncategorized — coskan @ 8:15 am

 Mark Brinsmead from Pythian Group wrote an open letter to Larry Ellison for reviewing the licensing policy of Diagnostics Pack. I digitally signed and hope you all sign that letter till 10 July the day before the planned announcement of Oracle 11g.

You can read and sign the blog entry from this link

http://www.pythian.com/blogs/526/an-open-letter-to-larry-ellison-on-awr-and-ash-licensing

The Silver is the New Black Theme Blog at WordPress.com.

Follow

Get every new post delivered to your Inbox.

Join 193 other followers