This is default featured slide 1 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions..

This is default featured slide 2 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions..

This is default featured slide 3 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions..

This is default featured slide 4 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions..

This is default featured slide 5 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions..

 

Tuesday, March 22, 2011

ORA-12514: TNS:listener does not currently know of service requested in connect descriptor

Cause:
The listener received a request to establish a connection to a database or other service. The connect descriptor received by the listener specified a service name for a service (usually a database service) that either has not yet dynamically registered with the listener or has not been statically configured for the listener. This may be a temporary condition such as after the listener has started, but before the database instance has registered with the listener.


Solution:
1. Check your tnsnames.ora as shown in my post on ora-12154.
2. Check if your listener service are on, if not start your lisnter using lsnrctl. More information on this take a look at the same post at ora-12154
3. Check if the service is on using command line lsnrctl services
4. Check your listener.log 

ORA-12154: TNS:could not resolve the connect identifier specified

Cause:
A connection to a database or other service was requested using a connect identifier, and the connect identifier specified could not be resolved into a connect descriptor using one of the naming methods configured. For example, if the type of connect identifier used was a net service name then the net service name could not be found in a naming method repository, or the repository could not be located or reached.

Solution:
1. Check your tnsnames.ora.
Check your tnsnames.ora if it is configured property the key to check is SID, dba host name or ip address. The syntax are something similar this this:


ORA_TNS =
 (DESCRIPTION = 
   (ADDRESS_LIST =
     (ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521))
   )
 (CONNECT_DATA =
   (SERVICE_NAME = ORA-10)
 )
)



2. Check your listener.ora if sid_list_listenner setup is there.
By Default when you install new oracle database the listener.ora would contain only listener configuration section but no sid_list_listenner setup. In many occasion when I have this ora-12154 problem the solution that help me is modifying listener.ora, adding SID_LIST_LISTENER section the syntax should be something similar to the below syntax:





SID_LIST_LISTENER =
   (SID_LIST =
    (SID_DESC =
      (ORACLE_HOME = /u01/app/oracle/product/10.1.0/db_1)
      (SID_NAME = ORA-10)
    )
  )



The complete file are as shown below



# listener.ora Network Configuration File: /u01/app/oracle/product/10.1.0/db_1/network/admin/listener.ora
# Generated by Oracle configuration tools.

SID_LIST_LISTENER =
   (SID_LIST =
     (SID_DESC =
       (ORACLE_HOME = /u01/app/oracle/product/10.1.0/db_1)
       (SID_NAME = ORA-10)
     )
   )

LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
      (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
    )
  )

After adding SID_LIST_LISTENER in your listener.ora, restart or reload your listener service. I prefer using command line lnsrctl follow by parameter reload or restart, or you can just type lnsrctl and then enter and type reload or restart. With this command line (lsnrctl) you can also check oracle listener status by enter parameter status. 


3. Check the environmental variables
Check if the environmental variables like ORACLE_HOME, ORACLE_SID, ORACLE_BASE, ORACLE_PATH do exist. The most important environmental variables are the first two variable ORACLE_HOME, ORACLE_SID.

Tools
The very handy tool you can use to check the connection is the command tnsping follow by your service name configured in your tnsnames.ora from the example above is ORA_TNS.

Thursday, November 11, 2010

SQLLoader with text file format

When loading text file into db via sqlloader, there might be the case that varchar2 column with Thai character data turn out weird (i.e. instead of showing "รถยนต์นั่งไม่เกิน 7 คน" it turn out to be "เธžเธฃเธš เธฃเธ–เธขเธ™เธ•เนŒเธ™เธฑเนˆเธ‡เน„เธกเนˆเน€เธเธดเธ™ 7 เธ„เธ™").

The cause of this problem, from what I experienced, is that the format/encoding of text file is invalid.
To solve this you need to open the file with your fave text editor, then use "save as" menu and choose file format/encoding as ANSI/ASCII (default one is the current format/encoding of the file).

Thursday, October 28, 2010

Save your foreign key constraint before dropping table

There might be the case that you find it difficult to recreate the table with another table having foreign keys dependent on it. When you need to recreate the table that mean you need to drop that table first. Apart form losing data and other objects related to that table you will also lost foreign key constraint on every tables which referring to it. There is a little tip top help you get all those foreign key constraints back with an ease, below are a few step to do it.

1. Before dropping the table run the below script which will prompt you to input the table you are about to drop and keep the output.

select 'alter table ' || cc.table_name || ' add constraint ' || c.constraint_name || ' foreign key(' ||
cc.column_name || ') references ' || cc_r.table_name || '( ' || cc_r.column_name || ');'
from user_constraints c, user_cons_columns cc, user_cons_columns cc_r
where c.constraint_type = 'R' and
cc.constraint_name = c.constraint_name and
cc.table_name = c.table_name and
cc_r.constraint_name = c.r_constraint_name and cc_r.TABLE_NAME = '&ref_tab';


2. drop the desired table
3. recreate that table
4. run the output scripts you get from number 1

Sunday, August 22, 2010

solaris UX: useradd: ERROR: Inconsistent password files. See pwconv(1M).

When trying to add oracle user on unix or linux there might be the case that you get the following error:
solaris UX: useradd: ERROR: Inconsistent password files. See pwconv(1M).

Here are steps to fix this problem, and what causes this error.
The reason behind this error is that the /etc/passwd and /etc/shadow files are out of synchronization on your machine.
To fix this, run the following command
  • pwconv to check if there is any error, if there is/are fix that/those error(s).
  • wc -l /etc/passwd /etc/shadow to check if both password and shadow file are synchronized, the out put will be

    x /etc/passwd

    y /etc/shadow

    x+y total

    where x, y is the number of lines in passwd and shadow file, and the total line would be the sum of lines in passwd and shadow file.

Thursday, November 5, 2009

ORACLE RAC 10g

Oracle Real Application Cluster
The video talk about Oracle RAC architecture there are 2 parts of it.

Video I



Video II

Oracle RMAN Demonstration

Oracle RMAN Setup Tutorial

"Oracle RAC - Why VIPs" by Alex Gorbachev

This videocast explains Vitrual IP (VIP) usage in Oracle Clusterware 10g and 11g - why they are needed and how they are used. A must know for any Oracle RAC DBA.

Wednesday, July 15, 2009

Oracle Security Alerts: Oracle Critical Patch Update July 2009

The Critical Patch Update for July 2009 was released on July 14, 2009. Oracle strongly recommends applying the patches as soon as possible.

The Critical Patch Update Advisory is the starting point for relevant information. It includes the list of products affected, pointers to obtain the patches, a summary of the security vulnerabilities for each product suite, and links to other important documents. Supported products that are not listed in the "Supported Products and Components Affected" section of the advisory do not require new patches to be applied.

Also, it is essential to review the Critical Patch Update supporting documentation referenced in the Advisory before applying patches, as this is where you can find important pertinent information.

The Critical Patch Update Advisory is available at any of the following locations:

Oracle Technology Network: http://www.oracle.com/technology/deploy/security/alerts.htm

Oracle, PeopleSoft and JD Edwards products: https://metalink3.oracle.com/od/faces/secure/km/BrowseResults.jspx?fid=15948.1

Oracle BEA products: http://www.oracle.com/technology/deploy/security/alerts.htm

The next four Critical Patch Update release dates are:

October 13, 2009
January 12, 2010
April 13, 2010
July 13, 2010

Friday, May 22, 2009

What are Data Recovery Services?

You may notice a lot of online data businesses are now
offering several different services to customers who
like to play it safe and prepare for the worst.

Some of the services they offer include online and
offline secured data storage and data recovery
services.

The purpose is to protect what we spend several hours
typing up and it is like they are saying "We’ve got
your back" so you don’t need to worry about losing a
document or project that may be very important.

With online and offline secured data storage you get a
backup program that will back up your desktop, laptop,
and server to store all the information. You can
access it anytime of the day or night.

This will prevent you from going through the process
of storing all your important information on disks or
tapes in order to back up your work. You set a
schedule that will allow your computer data to be
transmitted to a secured data center where it will be
stored until you need it.

When you are ready to access your data you simply
visit the site and log in to download your information
at a fast pace and at anytime. It doesn’t matter what
size business you run they assist you with your data
needs.

The backup service is worked the same way. If you lose
an important document you can access your account and
upload the information back to your system and
continue where you left off. It is a safe bet for
those who use their computers for business of any
size.

Wednesday, May 20, 2009

Ways to prevent Data loss

When your computer becomes the most used piece of
equipment you have, you spend countless hours sitting
down typing important information down so you don’t
lose anything.

It may also be the way you earn your living so the
last thing you need is some serious time off because
your computer has failed.

There are several ways that you can prevent the loss
of data and it doesn’t cost a fortune.

The most common way to protect the data in your
computer is to use an online data service. This type
of service can provide you with data coverage twenty
four hours a day seven days a week.

You can have your data stored for a certain amount
every month to ensure the safety of your data. Losing
data will no longer be a problem for you because they
can recover any data you lose.

These services are available to service desk tops,
laptops, ipods, digital camera memory, SIM cards,
Zune, and other important digital storing data
equipment.

In order to get started with these services you can do
an online search to determine which company may be the
best one for your data.

You can also choose to use a data loss program that
can help to recover any important data that may be
lost or deleted on purpose or accidentally.

This type of software can be purchased online or at a
computer retail store. Restoring your data is easier
than ever today with new technology. Save your
important documents today to avoid any down time in
the future.

Data Recovery Techniques due to Physical Damage

You may have lost some data recently and you need to
be able to recover it. This is easier than ever to do
and the cost is minimal.

You can always have your data stored professionally to
avoid losing your data and without being invaded and
interrupted.

These programs are available online and can
periodically save your data while you relax and keep
working.

Data recovery techniques are complicated if you do not
know much about computer systems and how they work.
There are three highlighted recovery techniques that
you may choose to use if you lose your data.

1) Replace the parts in the hard drive. When you
replace the parts it does not always work but it is
usually the best place to start.

Your hard drive may be malfunctioning for some odd
reason and it may need to have a part replaced on it.
Although this technique may make your disk readable
you may still be left with damage that is irreversible
to your hard drive.

2) Repair the hardware that is in your system. There
are several different pieces of hardware that can be
replaced in order to make your hardware work again.
You may be able to spot the problem immediately and
get it fixed in no time.

3) Use the deleted image to reconstruct another image.
This may not always allow you to have complete
restoration of the lost data but it may be enough for
you to recover the data that you lost.

Tuesday, May 19, 2009

What Physical Damage can do to your Data?

Physical damage is not like picking up your computer
and slamming it down on the floor or carrying it up a
flight of stairs only to drop it at the top.

Physical damage can occur in several ways.

You use your computer’s hard drive everyday not
realizing that every time you use it you are putting
your computer at risk of a malfunction that can lose
your data and be hard to recover it all completely.

Physical damage done to a CD-ROM is usually visible by
scratches or marks that can be seen. When you insert
these scratched up or marked disks into the hard drive
they can cause mechanical failure to your system.

You may or may not be able to reverse the damage once
it is done and your computer will never operate the
same. Dust can become trapped in the hard disk drive
causing problems in your computer that may be
irreversible.

This type of damage can be prevented if you take the
time to clean the area frequently and protect it with
protective covers.

In order to fix any of the problems done to your hard
drive you may need to take it to a professional in
order to get if fixed. Professionals discourage users
from fixing their own hard drives when physical damage
has been done.

Complications may occur and may make the problem hard
to fix with minimal expense. If you want to fix your
own physical damage, consult a professional to make
sure that you are using the right tools to keep damage
and cost to a minimum.

The importance of Data Recovery

With technology today records and other important
documents are now kept on computers instead of the
traditional pen and paper style of bookkeeping.

People put a lot of faith into computers and trust
that they will always provide the documentation that
they store forever. Most of the time people do not see
the need for a back up system to recover any data that
may get lost or they may think that it is important
but they put off using the backup and eventually
forget about it.

Today, social security information, military records,
birth records, death records and prison sign in and
discharge records can be viewed from the comfort of
your home computer.

This information that we all have access to is
priceless. It takes less time for someone to type out
these documents than it does to mail in a request,
have someone write it up make a copy and then send it
by mail to the person that requested the information.

This is okay as long as there is a backup plan to
saving or recovering data. If there was a fire in a
courthouse or file room that housed all the important
information then we would only have our computers to
gather the information and would have to question the
accuracy of that document.

Data recovery is very important and in some cases
vital in order to maintain records that may otherwise
get lost in the shuffle. Protecting our important
documents is the number one goal to a great data
recovery.

Data Recovery Tools

When you lose your data for what ever reason you want
to be able to recover it with minimal complication and
time.

In order to do that you may need to purchase a data
recovery tool kit that is designed to help you recover
your data on your own without any help on or off line.

Data can be lost quickly and may have been important
to you for personal reasons or for work.

Sometimes accidents happen and you or someone else
deletes an important project that you are working on.
You need to be able to recover it without losing time.

Software is the most common tool used to recover data
that has been erased or lost. This software can find
accidentally deleted data and restore it easily from
the trash bin or other storage areas of the computer.

With software tools you can undelete accidents or
recover data from damaged hard drives, SIM cards,
memory cards, ipod’s, pen drives, removable media,
zune, and more.

What ever you use you can always recover most anything
that is lost. Other tools to use include actual tool
kits that are suited to work on computers, laptops or
other information sources that store important data
and documents.

These tools are normally used by professionals that
need important data due to forensic evidence or for
other reasons.

The main point to remember is if you lose your data
you can usually recover it quickly and easily. If you
have data that you thought would be hopeless to
recover, give it a try and see.