Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

database name problem

Posted on 2001-07-19
12
Medium Priority
?
478 Views
Last Modified: 2012-06-27
I have installed developer on my machine after that i have installed oracle8(custom) on same machine but in different home and i created one database named orc1 .now
my problem is that in developer sql connectivity is working but it does n't take that database name .In developer one default database is there with no name.every thing is working in developer but it is not accepting orc1 database and orc1 is also not accepted by oracle itself.most of the time it gives error ora-12203.so how can i make my created database as default database.
I have made entries in tnsnames and seted the sid also but still it not working.
Help me.
0
Comment
Question by:pankajbhatia
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
  • 2
  • +3
12 Comments
 

Expert Comment

by:mnarayan
ID: 6300476
Check out your system or user variables to see what's your default ORACLE_HOME and ORACLE_SID.  May be you want to change them to what you need.  Also make sure the databace ORC1 in developer is down if you are not using.
0
 
LVL 5

Expert Comment

by:ser6398
ID: 6303191
When you create an oracle database, Oracle normally stores files in an Oracle Home Directory.  Several init files are stored in subdirectories under this directory.  Three very important files are TNSNAMES.ORA, SQLNET.ORA, and LISTENER.ORA.  These files are normally found in:  \\<oracle_home>\NET80\ADMIN or \\<oracle_home>\NETWORK\ADMIN subdirectory.  These files tell Oracle programs what Oracle databases are out there and how to find them.  You may have to run NET8 Easy Config or NET8 Assistant to initially set up these files for you.  Once they are set up, you normally leave them alone (unless the database moves to a new location or you need to add a database to it).  SQL*Plus uses these files to locate Oracle databases.

When you install Developer on a machine, it sometimes needs to be installed in a different Oracle Home Directory.  Developer stores it's own versions of TNSNAMES files (often containing only a sample right after install).  When you run Developer Forms and Reports they will try to use the TNSNAMES files from the Developer home (which normally don't contain info about your database right after install).  This leads to a case where you can connect to the database from SQL*Plus (which is using the correct TNSNAMES files), but NOT from Developer Forms and Reports.

What I normally do in this case is find the correct TNSNAMES files in the original directory and copy them over into the Developer Oracle Home directory.  You can SEARCH for TNSNAMES.ORA to find all the versions that exist.  You can open each of them up in NOTEPAD (they are simple text files) to see which one is the correct one.  Normally, the correct one will contain info about how to connect to your particular database SIDs and the others will just contain Oracle Examples (not specific to your particular database).  It is best to move incorrect versions into temporary directories instead of overwriting them just in case you make a mistake.
0
 
LVL 1

Expert Comment

by:leolkk
ID: 6304152
1) Make a copy of TNSNAMES.ora files
2) Paste the following element into your Oracle "CLIENT" tnsnames.ora,
3) Login using connection: ORCL,
4) If not success, replace ORCL with ORC1, and login again with connection: ORC1.

--- TNSNAMES.ORA element ----
ORCL.world =
  (DESCRIPTION =
    (ADDRESS_LIST =
        (ADDRESS =
          (COMMUNITY = beq.world)
          (PROTOCOL = BEQ)
          (PROGRAM = oracle80)
          (ARGV0 = oracle80ORCL)
          (ARGS = '(DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))')
        )
    )
    (CONNECT_DATA = (SID = ORCL)
    )
  )
--- End of TNSNAMES.ORA element ----
0
Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

 

Author Comment

by:pankajbhatia
ID: 6307659
i HAVE TRIED ALL THE SOLUTIONS AND COMMENTS STILL IT'S NOT TAKING ORC1 DATABASE.SO PLEASE SUGGEST OTHER SOLTUIONS.HOW CAN I CHECK USER VARIABLES IN MY SYSTEM.TELL ME.

0
 
LVL 1

Expert Comment

by:leolkk
ID: 6307786
1) Make sure ORC1 Services: OracleServiceORC1, and OracleStartORC1, is running (by Control Panel --> Service).

2) Use "program --> Find --> Files or Folders" to find "ALL" tnsnames.ora files

3) Make copy of "ALL" tnsnames.ora

4) Remove all elements: "ORCL" and "ORC1" in your tnsnames.ora files

5) add elements into "ALL" tnsnames.ora files

ORC1.world =
 (DESCRIPTION =
   (ADDRESS_LIST =
       (ADDRESS =
         (COMMUNITY = beq.world)
         (PROTOCOL = BEQ)
         (PROGRAM = oracle80)
         (ARGV0 = oracle80ORCL)
         (ARGS = '(DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))')
       )
   )
   (CONNECT_DATA = (SID = ORC1)
   )
 )


6) Pay attentions that whether there is a file: "sqlnet.ora" accompany with "tnsnames.ora". If not, copy sqlnet.ora from SERVER --> Network --> admin to Client side.

7) If there is no sqlnet.ora, change the elements into:

ORC1 =
 (DESCRIPTION =
   (ADDRESS_LIST =
       (ADDRESS =
         (PROTOCOL = BEQ)
         (PROGRAM = oracle80)
         (ARGV0 = oracle80ORCL)
         (ARGS = '(DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))')
       )
   )
   (CONNECT_DATA = (SID = ORC1)
   )
 )

and login with "ORCL" again.

8) IF STILL NOT WORK, POST content of "tnsnames.ora" and "sqlnet.ora" of SERVER and CLIENT sides, version of your Oracle Client and Server on the board so that we could be able to simulate.

0
 

Author Comment

by:pankajbhatia
ID: 6311306
i have cheked all the services and found that tnslistner service is not started .i have tried to start that service but it gives error .....

could not start the oraclemyoracletnslistener80 service on local computer, the service did not return an error.this could be an internal windows error or an internal service error.

Without listener we could not connect to the database so now tell me what to do for this rest everything is perfect.i have not cheked earlier this couz normaly if the listener is not started at the time of login it gives error no listener found but here at the time of login it gives error that could not resolve service name.
so now how can i start listener service.
0
 
LVL 1

Expert Comment

by:leolkk
ID: 6311491
For my configuration, it is for Local machine configuration only. Listener no need to be started, and database could also be connected.
You could try the above configuration I suggested.

Also, list "ALL" NT service name and their status (Start or Stop) relevant to Oracle in your machine. Otherwise, no sufficient information.
0
 

Expert Comment

by:mnarayan
ID: 6313798
You can start your listener manually from ms-dos prompt.  to start manually in MS-DOS prompt type "lsnrctl start".  This command assumes the listener is names LISTENER (which is the default).  To make sure you can look at $ORACLE_HOME/network/admin/listener.ora which would tell you the listener name.  To start with listener name type "lsnrctl start <listener name>"

Hope this helps.
0
 

Author Comment

by:pankajbhatia
ID: 6322274
Dear leolkk,
I have made changes in tnsnames.ora but it is not working so now i am posting original tnsnames and sqlnet and listner files so you can check and tell me the solutions
Dear mnaryan
I have tried to start the listener from dos prompt but it gives error that specified address is in use.i have posted listener file here .You can check the contents.if i change the address then at the time of login it gives error
ora -12202 TNS:internal nevigation error.....
So tell what i can do to solve this...

original TNSNAMES.ORA .......................
# F:\ORACLE\NET80\ADMIN\TNSNAMES.ORA Configuration File:F:\oracle\net80\admin\tnsnames.ora
# Generated by Oracle Net8 Assistant

PAN.WORLD =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = mha)(PORT = 1525))
    (CONNECT_DATA = (SID = orc1))
  )

CMEXAMPLE.WORLD =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = tcp)(PORT = 1610)(HOST = CM_SERVER))
      (ADDRESS = (PROTOCOL = tcp)(PORT = 1521)(HOST = LSNR_SERVER))
    )
    (CONNECT_DATA = (SID = ORCL))
    (SOURCE_ROUTE = yes)
  )

TCPEXAMPLE.WORLD =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(Host = Production1)(Port = 1521))
    (CONNECT_DATA = (SID = ORCL))
  )

NMPEXAMPLE.WORLD =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = NMP)(Server = FinanceServer1)(Pipe = ORAPIPE))
    (CONNECT_DATA = (SID = ORCL))
  )

EXTPROC_CONNECTION_DATA.WORLD =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
    (CONNECT_DATA = (SID = extproc))
  )

BEQ-LOCAL.WORLD =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = BEQ)(PROGRAM = oracle80)(ARGV0 = oracle80ORCL)(ARGS = '(DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))'))
    (CONNECT_DATA = (SID = ORCL))
  )

SPXEXAMPLE.WORLD =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = SPX)(Service = Server_lsnr))
    (CONNECT_DATA = (SID = ORCL))
  )

ORC1 =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1610))
      (ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1525))
    )
    (CONNECT_DATA = (SID = ORC1)(GLOBAL_DBNAME = orc1))
    (SOURCE_ROUTE = YES)
  )

TCP-LOOPBACK.WORLD =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(Host = 127.0.0.1)(Port = 1521))
    (CONNECT_DATA = (SID = ORCL))
  )

ORC1.world =
  (DESCRIPTION =
    (ADDRESS_LIST =
        (ADDRESS =
          (COMMUNITY = tcp.world)
          (PROTOCOL = TCP)
          (Host = MHA)
          (Port = 1525)
        )
        (ADDRESS =
          (COMMUNITY = tcp.world)
          (PROTOCOL = TCP)
          (Host = MHA)
          (Port = 1526)
        )
    )
    (CONNECT_DATA = (SID = ORC1)
    )
  )




sqlnet.ora..............

TRACE_LEVEL_CLIENT = OFF
#sqlnet.authentication_services = (NONE)
names.directory_path = (TNSNAMES, HOSTNAME)
names.default_domain = world
name.default_zone = world
automatic_ipc = off


listener.ora

F:\ORACLE\NET80\ADMIN\LISTENER.ORA Configuration File:F:\oracle\net80\admin\listener.ora
# Generated by Oracle Net8 Assistant

PASSWORDS_LISTENER= (oracle)

STARTUP_WAIT_TIME_LISTENER=0

LISTENER=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1))(ADDRESS=(COMMUNITY=NMP.world)(PROTOCOL=NMP)(SERVER=MHA)(PIPE=ORAPIPE))(ADDRESS=(PROTOCOL=TCP)(Host=mha)(Port=1521))(ADDRESS=(PROTOCOL=TCP)(Host=mha)(Port=1526))(ADDRESS=(PROTOCOL=TCP)(Host=127.0.0.1)(Port=1521))(ADDRESS=(PROTOCOL=IPC)(KEY=ORC1)))

CONNECT_TIMEOUT_LISTENER=10

SID_LIST_LISTENER=(SID_LIST=(SID_DESC=(SID_NAME=extproc)(PROGRAM=extproc))(SID_DESC=(SID_NAME=ORC1)))

TRACE_LEVEL_LISTENER=0
0
 
LVL 1

Accepted Solution

by:
leolkk earned 0 total points
ID: 6330971
1) make copy of tnsnames.ora
2) delete ORC1.world, and ORC1 component from your tnsnames.ora file(S).
3) Paste the following suggestion into tnsnames.ora file(s):

ORC1.WORLD =
 (DESCRIPTION =
   (ADDRESS = (PROTOCOL = BEQ)(PROGRAM = oracle80)(ARGV0 = oracle80ORCL)(ARGS = '(DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))'))
   (CONNECT_DATA = (SID = ORC1))
 )

4) Login Oracle again with:
user: system
passwords: manager  <default one, or corresponding one if it has been changed>
database: orc1

0
 
LVL 54

Expert Comment

by:nico5038
ID: 7259406

No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:
 - PAQ'd and pts removed
Please leave any comments here within the
next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER !

Nic;o)
0
 

Expert Comment

by:Jgould
ID: 7289204
Question has been closed as per recommendation

JGould-EE Moderator
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this blog post, we’ll look at how ClickHouse performs in a general analytical workload using the star schema benchmark test.
In today's business world, data is more important than ever for informing marketing campaigns. Accessing and using data, however, may not come naturally to some creative marketing professionals. Here are four tips for adapting to wield data for insi…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question