Service_name or sid?
hi,
in some of our tnsnames.ora we're using service_name, and in some others, we're using sid.
what is the difference and which should be used when?
thanks
This is what Oracle doc(11.2) says for the service.
>
A logical representation of a database, which is the way a database is presented to clients. A database can be presented as multiple services and a service can be implemented as multiple database instances. The service name is a string that is the global database name, that is, a name comprising the database name and domain name, entered during installation or database creation. If you are not sure what the global database name is, then you can obtain it from the value of the SERVICE_NAMES parameter in the initialization parameter file.>
http://download.oracle.com/docs/cd/E11882_01/network.112/e10835/glossary.htm#NETRF1839
And this is what is for SID
>
A name that identifies a specific instance of a running an Oracle database earlier than release 8.1. For any database, there is at least one instance referencing the database.
For Oracle databases earlier than release 8.1, a SID is used to identify the database. The SID is included in the connect descriptor of a tnsnames.ora file and in the definition of the listener in the listener.ora file.>
http://download.oracle.com/docs/cd/E11882_01/network.112/e10835/glossary.htm#BGBIAEED
With the SID, which Sybrand has explained clearly is an older wayout,you are going to connect through the specific instance with very little options for HA solutions like Load Balancing and Fail Over. OTOH SErvice is a "logical gateway" to access the database which is not tied to any specific instance as such. Using the service name, you may connect to any instance which is configured to serve that service. The concept goes in much better conjuction with the RAC environments where we do configure any one active insntance as the preferred instance for the service where it runs in the first place and the other instance(s) as avaialable instance where it can also run in case the primary fails. So using the new syntax of serivices, the HA capabilities are available to you in a complete manner and now , almost all the things of Oracle, including scheduler, resource manager are shifting to services only and Oracle is also recommending people to use service_name parameter to use than the sid.
HTH
Aman....
Similar Messages
-
Hi
What is the difference between the Service_Name and the SID and when is it used.
In the Default Listener File we have :
(ADDRESS=(PROTOCOL=ipc)(KEY=PNPKEY)))
Any comments for why/where is it used.
ThanksHi,
Serice Name represents the global database name but SID represents instance name. both of them can be used in case of single instance but in RAC envirnoment you will have to specify the SID in case of that you want to login to specific instance of the instances in the RAC envirnoment.
Here is a sample of a RAC tnsnames entry:
SEC.GROUP.LOCAL =
(DESCRIPTION =
(ENABLE=BROKEN)
(ADDRESS_LIST =
(LOAD_BALANCE=ON)
(FAILOVER=ON)
(ADDRESS = (PROTOCOL = TCP)(HOST = 193.16.1.162)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = 193.16.1.161)(PORT = 1521))
(CONNECT_DATA =
(SERVICE_NAME = GRP)
(FAILOVER_MODE=
(TYPE=SELECT)
(METHOD=BASIC)
in the above example Service name (Global database name is used) if you want to be loged on a specific instance change :
1. remove the address cluase of the unneeded instances
2. add (SID=GRPx) cluase where GRPx is the SID of the needed instance.
Regards; -
Em_using_existing_db.rsp service_name vs sid
Running 10.2.0.3 install in silent mode on redhat5. Need to run in separate pieces with the final piece being the configuration of the repository. The create respository step failes bacause the listener does not know of the SID that I am referening in the response file. It should say SERVICE_NAME in the connect string, not SID. I know it previously build the connect string with SERVICE_NAME, but now it build it using SID. Anyone know how to get the connect string build with SERVICE_NAME? Thanks.
I can't reproduce it I'm afraid.
I've switched to a 9i database, and I've added (SERVER=DEDICATED) to both entries and they both still work.
trotty_SERVICE =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = xxxxxxx)(PORT = 1521))
(CONNECT_DATA =
(SERVICE_NAME = trotty)
(SERVER = DEDICATED)
TROTTY_SID =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST =xxxxxxx)(PORT = 1521))
(CONNECT_DATA =
(SID = trotty)
(SERVER = DEDICATED)
)The only thing I can suggest is an obscure syntax error which is being removed when you remove the (server=dedicated) line. -
I'm a bit confused about what a SID is. I understand that it represents a Database instance. However, as I create my database for the first time, I'm asking myself if I really understand what a SID is?
My impression of a SID is a database instance that can contain/manage serveral databases. Is that correct?
However, I wonder if I'm being miss lead by my thinking. During the database creation process it appears that there is a one-to-one relationship between a database and a SID. Meaning that a SID and database are a unique pair and that a one-to-one relationship exist only.
That being the case when it comes the environment variable for "Oracle_SID" does it support having multiple SID's. What is the maximum number of SID that it can support? When connecting to a database in Oracle do I have to supply both the SID and global database name to make a connection? I plan to connect to my databases using both Java and C++.
ThanksThanks for you help. However, My question is about
the "Oracle_SID" environment variable. I fully
understand that a SID helps identify resources to
manage a database. However, a server/machine can
have any number of database residing on the
server/machine.
The installation instructions talk about the
environment variables for a machine with the
"Oracle_SID being one of those variables. Based on
what you are telling me a server/machine can have
only 1/one database residing on it based on the fact
that the "Oracle_SID" environment variable can only
accomodate one/1 SID. NO. That is NOT what I said. I said - One SID will equate to One database instance.
You can have any number of SIDs.
BUT you set the SID as an environment variable to tell the software which instance to you wish to connect. ORACLE_SID can only be set to one value. That represents the database instance to which you are about to connect. A tool such as SQLPlus supports only one connection to one instance at a time.
>
Is the "Oracle_SID" environment variable important
when it comes to connecting to a database remotely?Not really. The key is the SERVICE_NAME which is used to tell the LISTENER which SERVICE you want to use.
By default, there is one service that has the same name as the instance's SID.
There is a connection description file, called TNSNAMES.ORA. That file is used the same as /etc/hosts in *nix - pass in an alias and get a connection description - IP in the case of HOSTS; machine, listener port and 'instance information' in the case of TNSNAMES.ORA
The typical connection to an instance is something like
sqlplus hans/test@ORCL
The ORCL is the alias to look up in the TNSNAMES.ORA (or other lookup technique - equivalent to DNS). The client looks up the 3 pieces of information, sends a request to the listener which is (hopefully) listening on the specified port on the indicated machine. It then uses the 'instance information' to ask the database instance for a thread or process.
Oracle8 and older used ORACLE_SID as the 'instance information'
Oracle8i and newer uses SERVICE_NAME as the 'instance information'.
Some Newbie DBAs equate SERVICE_NAME to ORACLE_SID, because one of the services has the same name as the SID. However, one can have up to 64 SERVICES managed by a single instance.
Some Experienced DBAs equate SERVICE_NAME to ORACLE_SID, because they have not spent time in the documentation to understand the difference between SERVICE_NAME and SID. As a result, they generally do not 'get it' when it comes to resource management or instance consolidation.
>
If I'm managing a database at the server and the
server has multiple database residing on it, how do I
define a SID for each database using the "Oracle_SID"
environment variable?If on LINUX, using bash, you simply
export ORACLE_SID=abc
or use the oraenv script to set the SID and all the other environment variables based on the SID.I give a description and example below.
>
I'm just not clear about the relationship between the
"Oracle_SID" environment variable and access a
database when logged onto the database
server/machine.Say I have 2 databases, called 'ORCL' and 'TEST', each with a user (and schema) called 'hans'. Both are down. I want them both up. Therefore I want to start 2 instances.The pattern, on Linux (it's subtly different on Windows) is
# set the environment to start ORCL
. oraenv
ORCL
# or
export ORACLE_SID=ORCL
export ORACLE_HOME=some-directory-path-to-the-ORCL-database's-software
export PATH=$PATH:$ORACLE_HOME/bin
# use the tools to start the database
sqlplus / as sysdba # note that I did not specify SID ... that was given above
startup
exit
# at this point ORCL database, and all the schemas in the ORCL database, are available
# from anywhere in the network, or on the local machine, I can:
sqlplus hans/password@ORCL
select * from dual;
exit
# but TEST is not up and
sqlplus hans/password@TEST
# will fail with a 'database not available' type of message
# now set up to start test. Use oraenv OR do it manually
export ORACLE_SID=TEST
export ORACLE_HOME=the-path-to-the-TEST-database's-software-which-could-be-the-same
export PATH=$PATH:$ORACLE_HOME/bin
# and use the tools to start the database
sqlplus / as sysdba
startup
exit
# note that I did not specify SID ... that was given above and tells SQLPLUS to establish a connect to the
# instance called TEST. SQLPlus has special powers in the "as sysdba" mode - it can execute the
# startup process.
# NOW the TEST and the ORCL databases are available through the TEST and ORCL instances
sqlplus hans/password@TEST
select * from dual;
connect hans/password@ORCL
select * from dual;
exit>
I understand that when using the Enterprise Manager I
have to specify the SID and database name but, does
the environment variable "Oracle_SID" have to reflect
a SID for each database that is present on the
server/machine.
The SID tells the system
1) which shared memory segment to use - if we are on the server
2) which instance to connect to over the network, because the SID is the same as the default SERVICE
In Enterprise Manager Database Control, the entry point for the configuration files is a special directory under the ORACLE_HOME that consists of the machine name and the SID. The purpose of setting the ORACLE_SID in this case is to tell the database control which directory to use to find the EM configuration files for that database and instance.
No matter which way you slice it:
1) an Oracle SID is used to point to the configuration information for one database and it's related instance;
2) an Oracle SID is really only meaningful on the machine where the instance is to run;
3) an Oracle SID environment variable can only contain the value for one SID if it is to be intepreted by Oracle programs;
4) an Oracle SID plays no significant part in establishing the connection for an appication;
5) an Oracle SID MAY be used as input to environment-setting programs that make it easier to get the right environment for an application;
6) an Oracle SID is NO LONGER the correct way to set up the TNSNAMES.ORA file to establish a connection. -
Difference between service name and sid
Hi All,
1. I am not able to understand the difference between Service_name and SID.
2. And I have 3 different databases(like 9i,10g,11g) with 3 instances in each(total 6), Can I configure one listener for all the databases and instances, as I have found in some documents that we need to set SID's list in listener.ora file.
Please help me in this regard,
Thanks in advanceRafi (Oracle DBA) wrote:
Hi,
If you wanted to have multiple databases specified you could nest more SID_DESC parameters in the SID_LIST. In the same way, if you wanted to listen on diffrent IP addresses you could use multiple DESCRIPTION sections in the DESCRIPTION_LIST. For example:
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.10.0.130)(PORT = 1521))
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.20.0.10)(PORT = 1522))
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(ORACLE_HOME = /u01/app/oracle/product/10.1.0/db_1)
(SID_NAME = test)
(SID_DESC =
(ORACLE_HOME = /u01/app/oracle/product/10.1.0/db_1)
(SID_NAME = anotherdb)
For more details check below link from oracle:
http://download-west.oracle.com/docs/cd/B12037_01/network.101/b10776/toc.htm
Best regards,
Rafi.
http://rafioracledba.blogspot.com/
Hi Rafi,
Thanks for your reply. Can I configure different version databases in same listener file with different port. For example:
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.10.0.130)(PORT = 1521))
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.20.0.10)(PORT = 1522))
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(ORACLE_HOME = /u01/app/oracle/product/10.1.0/db_1)
(SID_NAME = test)
(SID_DESC =
(ORACLE_HOME = /u01/app/oracle/product/11.1.0/db_1)
(SID_NAME = anotherdb)
Edited by: user7280060 on Jun 15, 2011 2:36 AM
Edited by: user7280060 on Jun 15, 2011 2:37 AM -
Tnsnames.ora is not working
Hello,
In my UAT envirnment we have 3 database on IBM AIX powerPC (64-bit) all are on 10.2.0.5.0
My listener.ora and tnsnames.ora is at default location $ORACLE_HOME/network/admin/
my listener is up
$ lsnrctl status
LSNRCTL for IBM/AIX RISC System/6000: Version 10.2.0.5.0 - Production on 04-MAR-2011 11:56:08
Copyright (c) 1991, 2010, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1)))
STATUS of the LISTENER
Alias LISTENER
Version TNSLSNR for IBM/AIX RISC System/6000: Version 10.2.0.5.0 - Production
Start Date 16-FEB-2011 18:51:16
Uptime 15 days 17 hr. 4 min. 52 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/product/10.2.0.1/db_1/network/admin/listener.ora
Listener Log File /u01/app/oracle/product/10.2.0.1/db_1/network/log/listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=172.16.8.17)(PORT=1521)))
Services Summary...
Service "PLSExtProc" has 1 instance(s).
Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "preprod" has 1 instance(s).
Instance "preprod", status UNKNOWN, has 1 handler(s) for this service...
Service "uat" has 2 instance(s).
Instance "uat", status UNKNOWN, has 1 handler(s) for this service...
Instance "uat", status READY, has 1 handler(s) for this service...
Service "uat_XPT" has 1 instance(s).
Instance "uat", status READY, has 1 handler(s) for this service...
Service "uattest" has 2 instance(s).
Instance "uattest", status UNKNOWN, has 1 handler(s) for this service...
Instance "uattest", status READY, has 1 handler(s) for this service...
Service "uattest_XPT" has 1 instance(s).
Instance "uattest", status READY, has 1 handler(s) for this service...
The command completed successfully
i can remotely connected to database but on the same server tnsping is showing following error
$ tnsping UATTEST
TNS Ping Utility for IBM/AIX RISC System/6000: Version 10.2.0.5.0 - Production on 04-MAR-2011 11:59:09
Copyright (c) 1997, 2010, Oracle. All rights reserved.
Used parameter files:
/u01/app/oracle/product/10.2.0.1/db_1/network/admin/sqlnet.ora
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 172.16.8.17)(PORT = 1521))) (CONNECT_DATA = (SERVICE_NAME = uat)))
TNS-12535: TNS:operation timed out
or some time
ORA-12547: TNS: lost contact
remotely all the users are connected to listener but on the same server the operation is failed
I cant connect to other database using this tnsnames.ora file
can any one help me
regards
Bhushan
Edited by: user9176407 on Mar 3, 2011 10:38 PMuser9176407 wrote:
Thanks for the reply
In My server 3 database are there there a database by service name uat also present there
I check all the configuration the entries in my tnsnames.ora is as below
PREPROD =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 172.16.8.17)(PORT = 1521))
(CONNECT_DATA =
(SERVICE_NAME = preprod)
UAT =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 172.16.8.17)(PORT = 1521))
(CONNECT_DATA =
(SERVICE_NAME = uat)
UATTEST =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 172.16.8.17)(PORT = 1521))
(CONNECT_DATA =
(SERVICE_NAME = uattest)
conf_uat =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS =
(PROTOCOL = TCP)
(HOST = 172.16.8.17)
(PORT = 1521)
(CONNECT_DATA =
(SERVICE_NAME = uat)
(SID = uat)
also my listner file entries are
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /u01/app/oracle/product/10.2.0.1/db_1)
(PROGRAM = extproc)
(SID_DESC =
(SID_NAME = uat)
(ORACLE_HOME = /u01/app/oracle/product/10.2.0.1/db_1)
(SID_DESC =
(SID_NAME = uattest)
(ORACLE_HOME = /u01/app/oracle/product/10.2.0.1/db_1)
(SID_DESC =
(SID_NAME = preprod)
(ORACLE_HOME = /u01/app/oracle/product/10.2.0.1/db_1)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
(ADDRESS = (PROTOCOL = TCP)(HOST = 172.16.8.17)(PORT = 1521))
Ok, for your listener.ora file, above you have the SID_LIST and the LISTENER sections. But what is this that follows, below?
>
uat =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 172.16.8.17)(PORT = 1528))
SID_LIST_uat =
(SID_LIST =
(SID_DESC =
(SID_NAME = configdb)
(ORACLE_HOME = /u01/app/oracle/product/10.2.0.1/db_1)
which is working file
but i have an problem in my tnsname.ora file -
Rman clone duplicate database from active database
Hi All,
I read document saying that rman can duplicate database from active database (prod) to a remote server, so long as you configure listener and tnsname.
I am working toward it.
I met a problem, which is when i bring up auxiliary database in nomount mode, the listener service of that auxiliary database is in BLOCKED status, and throw out ora-12528 error when I rman auxiliary sys/pass@clonedb. Isn't nomount mode the mode which auxiliary db is supposed to be in?
(ora-12528: TNS:listener: all appropriate instances are blocking new connections)
Thanks,
milicYou may have run into the same problem like I did recently:
The (UR=A) clause in tnsnames.ora is intended to work with a dynamically registered handler so the use of SERVICE_NAME versus SID is preferred.
ORA-12528: TNS listener BLOCKED - trying to duplicate database
Also for further problems:
RMAN 11gR2 duplicate database ORA-17627 ORA-01017 RMAN-03009 ORA-17628 -
Duplicate database from active database in 11g?
Does anyone know if it's possible to clone a database from stby by issuing RMAN duplicate database FROM ACTIVE DATABASE command in 11g?
I know it's possible from primary to create stby.
Thanks in advanceYou may have run into the same problem like I did recently:
The (UR=A) clause in tnsnames.ora is intended to work with a dynamically registered handler so the use of SERVICE_NAME versus SID is preferred.
ORA-12528: TNS listener BLOCKED - trying to duplicate database
Also for further problems:
RMAN 11gR2 duplicate database ORA-17627 ORA-01017 RMAN-03009 ORA-17628 -
ORA-12514 when disconnecting from LAN domain
Hi all,
I'm facing issue that when I use Oracle XE locally and when I'm connected to the LAN domain, I can connect successfully to the teh DB but at home or when I'm disconnecting from the LAN, I got the error ORA-12514 from toad and sql plus
I thought that the error was the hostname on tnsname.ora but I already changed it to 127.0.0.1 and also localhost but the same issue appears
Hope that someone can help me on that
Thanks in advance
l12metnsname.ora but I already changed it to 127.0.0.1 and also localhostBoth localhost and 127.0.0.1 are the loopback TCP address, its part of an IP interface but connections to that IP don't go anywhere but the local machine. A working 127.0.0.1 just verifies that TCP is configured- and that's about it for usefulness of localhost|127.0.0.1, or when remote http access is disabled it is the address part of the URL to access Apex.
The tnsnames.ora host= has to have the correct IP address or hostname to connect to the machine where the database is running, as well as the port= for the listener port, and a connect_data ... service_name= or SID= entry to complete the connection string details.
If you're getting a -12514 error the host= and port= are pointing to an address and port with an Oracle listener, so:
A) service_name= or sid= aren't correct in tnsnames.ora
Or
B) host= isn't contacting the correct host. -
DG Observer triggering SIGSEGV Address not mapped to object errors in alert log
Hi,
I've got a Data Guard configuration using two 11.2.0.3 single instance databases. The configuration has been configured for automatic failover and I have an observer running on a separate box.
This fast-start failover configuration has been in place for about a month and in the last week, numerous SEGSEGV (address not mapped to object) errors are reported in the alert log. This is happening quite frequently (every 4/5 minutes or so).
The corresponding trace files show the process triggering the error coming from the observer.
Has anyone experienced this problem? I'm at my wits end trying to figure out how to fix the configuration to eliminate this error.
I must also note that even though this error is occurring a lot, it doesn't seem to be affecting any of the database functionality.
Help?
Thanks in advance.
BethHi.. The following is the alert log message, the traced file generated, and the current values of the data guard configuration. In addition, as part of my research, I attempted to apply patch 12615660 which did not take care of the issue. I also set the inbound_connection_timeout parameter to 0 and that didn't help either. I'm still researching but any pointer in the right direction is very much appreciated.
Error in Alert Log
Thu Apr 09 10:28:59 2015
Exception [type: SIGSEGV, Address not mapped to object] [ADDR:0x9] [PC:0x85CE503, nstimexp()+71] [flags: 0x0, count: 1]
Errors in file /u01/app/oracle/diag/rdbms/<db_unq_name>/<SID>/trace/<SID>_ora_29902.trc (incident=69298):
ORA-07445: exception encountered: core dump [nstimexp()+71] [SIGSEGV] [ADDR:0x9] [PC:0x85CE503] [Address not mapped to object] []
Use ADRCI or Support Workbench to package the incident.
See Note 411.1 at My Oracle Support for error and packaging details.
Thu Apr 09 10:29:02 2015
Sweep [inc][69298]: completed
Trace file:
Trace file /u01/app/oracle/diag/rdbms/<db_unq_name>/<SID>/trace/<SID>_ora_29902.trc
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning and Oracle Label Security options
ORACLE_HOME = /u01/app/oracle/product/11.2.0.3/dbhome_1
System name: Linux
Node name: <host name>
Release: 2.6.32-431.17.1.el6.x86_64
Version: #1 SMP Wed May 7 14:14:17 CDT 2014
Machine: x86_64
Instance name: <SID>
Redo thread mounted by this instance: 1
Oracle process number: 19
Unix process pid: 29902, image: oracle@<host name>
*** 2015-04-09 10:28:59.966
*** SESSION ID:(416.127) 2015-04-09 10:28:59.966
*** CLIENT ID:() 2015-04-09 10:28:59.966
*** SERVICE NAME:(<db_unq_name>) 2015-04-09 10:28:59.966
*** MODULE NAME:(dgmgrl@<observer host> (TNS V1-V3)) 2015-04-09 10:28:59.966
*** ACTION NAME:() 2015-04-09 10:28:59.966
Exception [type: SIGSEGV, Address not mapped to object] [ADDR:0x9] [PC:0x85CE503, nstimexp()+71] [flags: 0x0, count: 1]
DDE: Problem Key 'ORA 7445 [nstimexp()+71]' was flood controlled (0x6) (incident: 69298)
ORA-07445: exception encountered: core dump [nstimexp()+71] [SIGSEGV] [ADDR:0x9] [PC:0x85CE503] [Address not mapped to object] []
ssexhd: crashing the process...
Shadow_Core_Dump = PARTIAL
ksdbgcra: writing core file to directory '/u01/app/oracle/diag/rdbms/<db_unq_name>/<SID>/cdump'
Data Guard Configuration
DGMGRL> show configuration verbose;
Configuration - dg_config
Protection Mode: MaxPerformance
Databases:
dbprim - Primary database
dbstby - (*) Physical standby database
(*) Fast-Start Failover target
Properties:
FastStartFailoverThreshold = '30'
OperationTimeout = '30'
FastStartFailoverLagLimit = '180'
CommunicationTimeout = '180'
FastStartFailoverAutoReinstate = 'TRUE'
FastStartFailoverPmyShutdown = 'TRUE'
BystandersFollowRoleChange = 'ALL'
Fast-Start Failover: ENABLED
Threshold: 30 seconds
Target: dbstby
Observer: observer_host
Lag Limit: 180 seconds
Shutdown Primary: TRUE
Auto-reinstate: TRUE
Configuration Status:
SUCCESS
DGMGRL> show database verbose dbprim
Database - dbprim
Role: PRIMARY
Intended State: TRANSPORT-ON
Instance(s):
DG_CONFIG
Properties:
DGConnectIdentifier = 'dbprim'
ObserverConnectIdentifier = ''
LogXptMode = 'ASYNC'
DelayMins = '0'
Binding = 'optional'
MaxFailure = '0'
MaxConnections = '1'
ReopenSecs = '300'
NetTimeout = '30'
RedoCompression = 'DISABLE'
LogShipping = 'ON'
PreferredApplyInstance = ''
ApplyInstanceTimeout = '0'
ApplyParallel = 'AUTO'
StandbyFileManagement = 'MANUAL'
ArchiveLagTarget = '0'
LogArchiveMaxProcesses = '4'
LogArchiveMinSucceedDest = '1'
DbFileNameConvert = ''
LogFileNameConvert = ''
FastStartFailoverTarget = 'dbstby'
InconsistentProperties = '(monitor)'
InconsistentLogXptProps = '(monitor)'
SendQEntries = '(monitor)'
LogXptStatus = '(monitor)'
RecvQEntries = '(monitor)'
SidName = ‘<sid>’
StaticConnectIdentifier = '(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=<db host name>)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=<service_name>)(INSTANCE_NAME=<sid>)(SERVER=DEDICATED)))'
StandbyArchiveLocation = 'USE_DB_RECOVERY_FILE_DEST'
AlternateLocation = ''
LogArchiveTrace = '0'
LogArchiveFormat = '%t_%s_%r.dbf'
TopWaitEvents = '(monitor)'
Database Status:
SUCCESS
DGMGRL> show database verbose dbstby
Database - dbstby
Role: PHYSICAL STANDBY
Intended State: APPLY-ON
Transport Lag: 0 seconds
Apply Lag: 0 seconds
Real Time Query: ON
Instance(s):
DG_CONFIG
Properties:
DGConnectIdentifier = 'dbstby'
ObserverConnectIdentifier = ''
LogXptMode = 'ASYNC'
DelayMins = '0'
Binding = 'optional'
MaxFailure = '0'
MaxConnections = '1'
ReopenSecs = '300'
NetTimeout = '30'
RedoCompression = 'DISABLE'
LogShipping = 'ON'
PreferredApplyInstance = ''
ApplyInstanceTimeout = '0'
ApplyParallel = 'AUTO'
StandbyFileManagement = 'AUTO'
ArchiveLagTarget = '0'
LogArchiveMaxProcesses = '4'
LogArchiveMinSucceedDest = '1'
DbFileNameConvert = ''
LogFileNameConvert = ''
FastStartFailoverTarget = 'dbprim'
InconsistentProperties = '(monitor)'
InconsistentLogXptProps = '(monitor)'
SendQEntries = '(monitor)'
LogXptStatus = '(monitor)'
RecvQEntries = '(monitor)'
SidName = ‘<sid>’
StaticConnectIdentifier = '(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=<db host name>)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=<service_name>)(INSTANCE_NAME=<sid>)(SERVER=DEDICATED)))'
StandbyArchiveLocation = 'USE_DB_RECOVERY_FILE_DEST'
AlternateLocation = ''
LogArchiveTrace = '0'
LogArchiveFormat = '%t_%s_%r.dbf'
TopWaitEvents = '(monitor)'
Database Status:
SUCCESS -
How does connection to host really work?
I've been trying to debug this myself, but there seems to be a missing piece, and I'd like some help understanding the components and sequence of the process.
My immediate issue is, how do I get past the"ORA-12170: TNS:Connect timeout occurred" error shown below? It seems that hostname "hcm" is recognized as valid but then points to nowhere.
Environment: Windows 2000, Oracle 10g rel 2, localhost (IP starts with 127), MS loopback adaptor (IP starts with 192), computer name dimension4100, primary dns suffix ora.newmiddleclass.com, database name (same as SID) is hcm.
etc\hosts file:
127.0.0.1 dimension4100.ora.newmiddleclass.com localhost
192.168.255.255 dimension4100.ora.newmiddleclass.com dimension4100
192.168.255.255 dimension4100.ora.newmiddleclass.com hcm
192.168.255.255 dimension4100.ora.newmiddleclass.com hcm2
192.168.255.255 dimension4100.ora.newmiddleclass.com hcm3
192.168.255.255 dimension4100.ora.newmiddleclass.com no-tns
I'm trying to connect via sqlplus with this syntax:
sqlplus SYS/pw@hcm
ORA-12154: TNS:could not resolve the connect identifier specified
when I try to connect via @ using anything other than localhost or dimension4100 or a host name specified in the hosts file.
- Implies that this is the first step in the process
...so using host string @hcm as shown above avoids the 12154 error. Next, one of two things happens:
ORA-12541: TNS:no listener
Only with localhost or dimension4100. e.g.
sqlplus SYS/pw@dimension4100
- or -
ORA-12170: TNS:Connect timeout occurred
Only with hostnames that are mapped to 192 in hosts file (except for dimension4100). Doesn't matter if the hostname is in tnsnames.ora. e.g.
sqlplus SYS/pw@hcm
sqlplus SYS/pw@hcm2
sqlplus SYS/pw@no-tns ("no-tns" is not defined in tnsnames.ora)
Note:
- I've verified that the hosts and ora files I've edited are really the files that the system is reading.
- I can ping any hostname in the hosts file and get the correct IP address.
- I can connect via sqlplus / as sysdba
- I have to start the listener manually via lsnrctl start. It listens via protocol tcp on the loopback IP (192) on port 1521, as well as protocol ipc (EXTPROC1ipc)
- lsnrctl services:
LSNRCTL for 32-bit Windows: Version 10.2.0.1.0 - Production on 29-SEP-2008 09:22:40
Copyright (c) 1991, 2005, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1)))
Services Summary...
Service "PLSExtProc" has 1 instance(s).
Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
Handler(s):
"DEDICATED" established:0 refused:0
LOCAL SERVER
The command completed successfully
(Is this a problem? Should it be using the TCP protocol?)
- Services via control panel:
(started)
OracleOraDb10g_home1iSQL*Plus
OracleOraDb10g_home1TNSListener
OracleServiceHCM
(disabled)
OracleJobSchedulerHCM
- tnsnames.ora:
HCM3 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.255.255)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = OracleServiceHCM)
HCM2 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.255.255)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = HCM.ora.newmiddleclass.com)
HCM =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.255.255)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = HCM.ora.newmiddleclass.com)
EXTPROC_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
(CONNECT_DATA =
(SID = PLSExtProc)
(PRESENTATION = RO)
...so....how do I get past the"ORA-12170: TNS:Connect timeout occurred" error?
Thanks.Ok Justin, so you're saying that because I hard-coded the IP address in tnsnames.ora, the etc\hosts file is not used for the connection. My current entry for hcm is:
HCM =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.255.255)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = HCM.ora.newmiddleclass.com)
I changed that to
HCM =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.255.255)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = HCM)
I also tried
HCM =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.255.255)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = HCM)
(SID = HCM)
and
HCM =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.255.255)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = HCM.ora.newmiddleclass.com)
(SID = HCM)
also trying hcm in lower case, but in all scenarios I got the same error:
ORA-12170: TNS:Connect timeout occurred
And I tried vetris' suggestion re telnet (not ping) on both IP addressess and I get error:
Could not open a connection to host on port 1521: Connect failed -
Error Message, After Installing
Database Log In Failed
TNS could not resolve service name
Verify that the TNS name in the connectstring entry of the DAD for this URL is valid.
URL =
http://192.9.201.10/pls/simpledad/sample.home
I added the URL b/c, even though its internal,
I want to know how to alter the tnsnames.ora
Please help me alter the tnsnames file.
Here is a copy of my tnsnames.ora file:
TNSNAMES.ORA Network Configuration File: /opt/OraHome1/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.
ORACLEDB =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = SunBlade)(PORT = 1521))
(CONNECT_DATA =
(SERVICE_NAME = oracleDB)
INST1_HTTP =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = SunBlade)(PORT = 1521))
(CONNECT_DATA =
(SERVER = SHARED)
(SERVICE_NAME = oracleDB)
INST1_HTTP =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = SunBlade)(PORT = 1521))
(CONNECT_DATA =
(SERVER = SHARED)
(SERVICE_NAME = oracleDB)
(PRESENTATION = http://admin)
EXTPROC_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))
(CONNECT_DATA =
(SID = PLSExtProc)
(PRESENTATION = RO)
Thank you,
David
[email protected]Hi,
take a backup of this file(tnsnames.ora) and make another tnsnames.ora with following entry.
ORACLEDB =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = SunBlade)(PORT = 1521))
(CONNECT_DATA =
(SERVICE_NAME = oracleDB)
I am asuming the service_name or SID you have choosen is oracleDB and name of
oraclle host machine is Sunblade.
if this does not work, put the ip address of the machine in place of host
name.
Yogi
[email protected] -
Database Hung problem in Oracle9i Enterprise Edition Release 9.2.0.7.0
Hello,
I am using the Oracle9i Enterprise Edition Release 9.2.0.7.0. Our database suddenly get hung and we need to give a Hard reset.
Following are errors are in listener log.
TNS-12571: TNS:packet writer failure
27-OCT-2008 00:33:00 * service_died * nm45 * 12571
TNS-12571: TNS:packet writer failure
27-OCT-2008 00:33:13 * CONNECT_DATA=(SERVICE_NAME=<Service>)(SID=NM45)(SDU=2048)(CID=(PROGRAM=<EXE>)(HOST=<Host>(USER=<User>))) * (ADDRESS=(PROTOCOL=tcp)(HOST=<IP>)(PORT=<Port>)) * establish * <DB> * 12560
TNS-12500: TNS:listener failed to start a dedicated server process
TNS-12537: TNS:connection closed
TNS-12560: TNS:protocol adapter error
TNS-00507: Connection closed
32-bit Windows Error: 109: Unknown error
Error in Oracle trace:
ORACLE V9.2.0.7.0 - Production vsnsta=0
vsnsql=12 vsnxtr=3
Windows 2000 Version 5.2 Service Pack 1, CPU type 586
Oracle9i Enterprise Edition Release 9.2.0.7.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.7.0 - Production
Windows 2000 Version 5.2 Service Pack 1, CPU type 586
Instance name: <SID>
Redo thread mounted by this instance: 1
Oracle process number: 30
Windows thread id: 1172, image: ORACLE.EXE
*** 2008-10-27 00:54:04.300
async error encountered when answering new connection:
NS Primary Error: TNS-12560: TNS:protocol adapter error
*** 2008-10-27 01:14:38.175
async error encountered when answering new connection:
NS Primary Error: TNS-12560: TNS:protocol adapter error
async error encountered when answering new connection:
NS Primary Error: TNS-12560: TNS:protocol adapter error
*** 2008-10-27 01:22:48.894
async error encountered when answering new connection:
NS Primary Error: TNS-12560: TNS:protocol adapter error
async error encountered when answering new connection:
NS Primary Error: TNS-12560: TNS:protocol adapter error
*** 2008-10-27 01:39:21.800
async error encountered when answering new connection:
NS Primary Error: TNS-12560: TNS:protocol adapter error
*** 2008-10-27 01:50:40.910
async error encountered when answering new connection:
NS Primary Error: TNS-12560: TNS:protocol adapter error
*** 2008-10-27 02:39:51.285
async error encountered when answering new connection:
NS Primary Error: TNS-12560: TNS:protocol adapter error
What could be the reason.
Regards
HemantHello Hemant,
Thanks for the response. Following error are in sqlnet.log. We are using the static id.
Fatal NI connect error 12560, connecting to:
(LOCAL=NO)
VERSION INFORMATION:
TNS for 32-bit Windows: Version 9.2.0.7.0 - Production
Oracle Bequeath NT Protocol Adapter for 32-bit Windows: Version 9.2.0.7.0 - Production
Windows NT TCP/IP NT Protocol Adapter for 32-bit Windows: Version 9.2.0.7.0 - Production
Time: 27-OCT-2008 00:33:13
Tracing not turned on.
Tns error struct:
ns main err code: 12560
TNS-12560: TNS:protocol adapter error
ns secondary err code: 0
nt main err code: 0
nt secondary err code: 0
nt OS err code: 0
Regards
Hemant. -
OCCI/ODBC application sql trace failure...
Hi,
I was doing the sql*net trace for an OCCI/ODBC Application writen in c++. I have an InstantClient on my PC. I was trying to access the Oracle through my C++ program to
compare the performance of OCCI and ODBC.
I was using the Oracle 10g(ver10.2.0.1.0 ), Oracle instant cilent(win32-10.2.0.3-20061115), and VS 8.0.
TNSNAMES.ora:
ORCL =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = host_name)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = ORCL)
(SID = ORCL)
LISTENER.ORA:(It was created by net manager.)
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = ORCL)
(ORACLE_HOME = F:\oracle\product\10.1.0\Db_3)
(SID_NAME = ORCL)
LISTENER =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = HOST_NAME)(PORT = 1521))
The sqlnet.ora file was writen to trace the client sql. Fortunately, my C++ program can access the oracle and get my result back successfully. In the same time, the trace files
can be created, but when using the tkprof tool to explain it, it comes to the file with useless information.
One of the *.trc file explaind by tkprof tool:
Sort options: default
count = number of times OCI procedure was executed
cpu = cpu time in seconds executing
elapsed = elapsed time in seconds executing
disk = number of physical reads of buffers from disk
query = number of buffers gotten for consistent read
current = number of buffers gotten in current mode (usually for update)
rows = number of rows processed by the fetch or execute call
Trace file: ora21763.trc
Trace file compatibility: 8.00.04
Sort options: default
1 session in tracefile.
0 user SQL statements in trace file.
0 internal SQL statements in trace file.
0 SQL statements in trace file.
0 unique SQL statements in trace file.
327 lines in trace file.
Finally, I got TNS-12518 TNS-12564 error. I tried to add DIRECT_HANDOFF_TTC_LISTENER=OFF, but it didnt work. I traced the listener, the error occured in the listener.trc "
ntt2err: soc 464 error " and " nsbequeath: error reading REDIR/NSE msg".
I just cann't get the right trace file and cann't sovle the two errors(TNS-12518 TNS-12564). Can somebody give me some advices, please.Hi,
The TKPROF facility accepts as input an SQL trace file generated when SQL Trace has been turned on for the system or a session, not a SQL*NET trace file. A SQL*Net trace file is a dump of raw data packets and communications at the SQL*NET layer. If you want to get performance statistics from SQL beign executed by your application, then you need to turn on SQL Trace not SQL*MET tracing.
To enable SQL trace at the system level, you need to execute:
alter system set SQL_TRACE=TRUE
The NS-12518 TNS-12564 normally means you are running into some sort of resource deletion issue. This can be caused by various things. Make sure you are properly cleaning up and closing sessions in your application.
Are you performing some sort of stress test or have you just written a Multi-threaded test harness that executes different types of SQL with OCCI/ODBC?
HTH
J.B. -
Problem with oracle 9i DS with oracle 9i database
I tried to install Oracle 9i DS on oracle 9i database.
database successfully installed, but when installing 9i DS, I get error "error in writing to file C:\oracle\Orahome90\ociw32.dll ....
I retry even after uninstalling all the oracle product, deleted all the oracle keys from the registry and restart the PC.
I get same result again.
If I IGNORE and continue with the setup of 9i DS, I am getting following error:-
while running forms developer -- ifbld90.exe --application failed to start because oci.dll was not found.
-frm-10142 - HTTP listener was not running on port 8888.
while running reports developer - rwbuilder.exe -- application failed to start because oci.dll was not found.
I have tried clean installation after deinstalling again and again, but all in vain.
I convey my sincere thanks in advance if anybody can suggest solution to my email [email protected]
bye for now.
ManojSome hints:
Check if the listener service is running.
Play with domain extensions in the *.ora files. This is such a messy part with Oracle. Usually I keep trying several combinations in tnsnames.ora (.world, .<domain>, no domain extension) until it works.
Sometimes changing "service_name=" to "sid=" in tnsnames.ora works.
Maybe you are looking for
-
I was hit by a slew of Java Script Exploits as well as Trojans this past week
Hello: On 7/10/2012, my desktop machine got hit by a slew of Virus and Trojans which even though removed, they are impacting the use of my computer. Information below. First 7.10/2012 Trojan win32/Tibs.IT Severe Threat detected by Microsoft security
-
Is there a size limit to internal drive?
For some reason I remember there being a size limit for internal drives on the Power Mac, dual 2.0 GHz G5. I have one 250 Gig drive installed, and want to add another 500 gig drive. Will the drive exceed the size limit? If the size is ok, does anyone
-
Hello guys, I have printed a pdf from a program, but it isn't editabl the thing is i don't know exactly what am i doing wrong, but I have realized that some pdf's when u right click on them u get the option to insert text at cursor. while other's don
-
Custom reports do not run with error message: Routine FDPREP cannot read ..
Hi Can anybody help me with this issue pls? The dev system is cloned from production a few days ago. After running the post clone procedure, the dev is working fine except when we are trying to run custom reports, it errorred out with error message -
-
My boss wants to be able to use his phone as an employee directory, any ideas on best route
Something he could also access on his iPad and Mac computer would be the best. He's looking for a way to look up and recognize his staff of over 300.