• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 696
  • Last Modified:

Cannot connect to Oracle database

I just moved my Oracle server to a new domain by backing up the VM and dropping it down on a VM in the new domain.

I've edited the listener, sqlnet, and tnsnames files to reflect the changes, but I'm still not able to connect to my databases.  A TNSPING against the instances finds them alive, well, and seemingly eager to cooperate, but all connections (SQLPLUS, etc.) are refused with an ORA-12514 error.

lsnrctl suggests that all of the instances are trying to communicate via the old domain name.

I know that this is an easy fix, but I'm brain dead.


Thoughts?

Thanks,
Kent
0
Kent Olsen
Asked:
Kent Olsen
  • 9
  • 7
  • 2
1 Solution
 
namethisCommented:
Run lsnrctl status on the database server and check that the service
is registered, and its name matches the one you use when connecting with sqlplus.
0
 
Kent OlsenData Warehouse Architect / DBAAuthor Commented:
Hi namethis,

I have run lsnrctl and the instances are registered, but they are still communicating as if they were still running on the old domain/server.  The listener shows the registered name(s) as INSTANCE.old.domain.name.

The listener, sqlnet, and tnsnames files are all updated and correct.


Kent
0
 
slightwv (䄆 Netminder) Commented:
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
Kent OlsenData Warehouse Architect / DBAAuthor Commented:
Hi Steve,  I was hoping that you or Sean would pop in.  :)

The global name is dbname.{olddomain}

I've gained temporary access to the database (from the server) by configuring the listener to look for the old name, and equating the old name to localhost in the etc/hosts file.  (This is on Windows Server, by the way.)

And I have been able to connect as sysdba.  I suspect that my next step is to create a pfile, edit the db_domain parameter, and restart with the new selection.

Or am I missing something?
0
 
slightwv (䄆 Netminder) Commented:
>>The global name is dbname.{olddomain}

Change it?  

From the link above:
ALTER DATABASE RENAME GLOBAL_NAME TO database.domain;

This is a relatively safe thing to mess with.  I've had to do it once in a while but my systems aren't that complicated (no RAC or Grid control/etc....).

>> I suspect that my next step is to create a pfile, edit the db_domain parameter,

Is db_domain set?  I've never really messed with it.  

Guess that isn't really a parameter you can mess with after all.

Per the docs, you cannot change it:
http://docs.oracle.com/cd/E11882_01/server.112/e25513/initparams055.htm#i1126251
0
 
namethisCommented:
Check the DB_DOMAIN initialization parameter.
0
 
slightwv (䄆 Netminder) Commented:
>>Check the DB_DOMAIN initialization parameter.

namethis,
Please read previous posts.  I already covered this an hour ago in http:#a38396172.

It also cannot be changed per the docs in my last post.
0
 
Kent OlsenData Warehouse Architect / DBAAuthor Commented:
Hi Steve,

I was able to change it in the pfile, generate an spfile, and restart the instance.  However, the instance now seems to have no idea who or what it is, and I cannot connect.  lsnrctl doesn't show any of the instance's services.

Oops...
0
 
slightwv (䄆 Netminder) Commented:
>>However, the instance now seems to have no idea who or what it is

I guess you were already messing with it when I posted this:

re http:#a38396415   "Guess that isn't really a parameter you can mess with after all.  Per the docs, you cannot change it"
0
 
Kent OlsenData Warehouse Architect / DBAAuthor Commented:
I had read the docs as "you can't mess with it via the ALTER statement", though that now seems rather naive.

I can't believe that you can't drop a complete server into a new domain without having to rebuild Oracle from the ground up.
0
 
Kent OlsenData Warehouse Architect / DBAAuthor Commented:
Hi Steve,

According to the Oracle forums, db_domain can be changed by editing the spfile and restarting the server -- exactly what I did.

Now I'm wondering why the instance seems to be off in the ozone?  Any ideas?
0
 
slightwv (䄆 Netminder) Commented:
>>I can't believe that you can't drop a complete server into a new domain without having to rebuild Oracle

It's been a long week with our move and I'm still in idiot mode!  You can change db_domain with the way you did or even an alter system.  Modifiable just means you need to bounce the database.

For grins, just remove that parameter from the init.ora and restart.


Have you also already altered the global_name?
0
 
Kent OlsenData Warehouse Architect / DBAAuthor Commented:
Not the global name, just db_domain.
0
 
slightwv (䄆 Netminder) Commented:
typing over each other...

>>Not the global name, just db_domain.

Alter the global name and remove db_domain from the init.ora file and see what happens.
0
 
Kent OlsenData Warehouse Architect / DBAAuthor Commented:
I've got 5 of the 7 instances corrected.  One's giving me a bit of a headache, but that's probably because there's another set of hands working it from a different angle.

sigh....

Will check back in a bit.
0
 
slightwv (䄆 Netminder) Commented:
Personally I removed all domain information in my instances.  Unless you are running hierarchical databases there really isn't a reason to have them set.

If you aren't I would suggest you remove it as well unless you just like it for some reason or all your client installs have the default domain set in their sqlnet.ora file.
0
 
Kent OlsenData Warehouse Architect / DBAAuthor Commented:
All but 1 of my databases are up and running normally.  The problem with the other one really is another issue so I'm going to close this out and ask another question.  


Thanks,
Kent
0
 
Kent OlsenData Warehouse Architect / DBAAuthor Commented:
Getting the domain name correct was clearly the solution.  The instance that isn't coming up has another issue.  It makes sense to put both in the PAQ as separate discussions.
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

  • 9
  • 7
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now