Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Database name

Status
Not open for further replies.

codehead

Programmer
Aug 25, 1999
96
US
Hello All:

I have installed the Personal Edition of Oracle 8i. Now I am trying to connect with VisualCafe, but I can't figure out what the default database name is that Oracle automatically assigned to the default database that it created upon installation. VisualCafe wants a *subprotocol* entry in the format:

@<databasename>

which I can't figure out.

Is there an SQL statement that I can run, that will tell me the name of the database that I have connected to? (I connect with SQL Plus but there isn't any host string, since it is a local database). Can I do a search for a file name? Is the simplest solution to create a new database and forget about the default one? If so, what is the SQL to create the database (if I can create it properly, I can figure out how to add the tables, etc.).

TIA,

Codehead

 
If you look in your INIT.ora file it will tell you what your database name is and also allows you to change it.

path goes something like: C:\Orahome\Admin\Orcl\PFILE

This file is referred to as the initialisation file for the database and contains various config info.
Don't know how to find out the name via SQL but I wouldn't be surprised if its in the database metadata somewhere.
 
I tried that, but my database isn't using it. The only file that I could find named init.ora was a sample file that came with Oracle and it just gives examples of names.
 
select * from global_name;

The answer to this query will be dbname.world
In Visual Cafe try it with and without the .world

Steve
 
Thanks mcowen and Steve!

I finally have the database name, but I still can't connect using the dbNAVIGATOR in VisualCafe. I tried both variations as you suggested, Steve, but to no avail.

According to the VisualCafe documentation the Vendor SubProtocol is: oracle:eek:ci8 and the Vendor SubName is: @<database>. Also, it says that the database name should either be in the tnsnames.ora file or should be a SQL*net name-value pair. The only tnsnames.ora file that I can find is in C:\Oracle\Ora81\Network\Admin\Sample, so I don't think my system is using it. I can connect with SQL Plus without any host string, whereas at work I have to put the database name in the host string and Oracle uses the tnsnames.ora file to resolve it. What should I have for an entry in the tnsnames.ora file when the database resides on my PC (the client)? What would the SQL*net name-value pair be in this case (if any)?

The VisualCafe documentation also states that when using oci8, ensure that the Oracle 8 client is installed, but since I can connect with SQL Plus, it must be installed, right?

Thanks!

Codehead

 
Your right about the file. TNSNAMES.ORA is normally in C:\Oracle\Ora81\Network\Admin with LISTENER.ORA and SQLNET.ORA.

I would try installing additional components from the 8i CD or at least have a look. I know that in 8.1.7 there are various options for installation (I remember only programmer and client) and they each may install different files.

Rgds
Matt
 
With Personal Oracle it is possible to connect to SQL*PLUS without the &quot;Oracle Client&quot; (which refers to the networking software needed to connect to a remote database) - since PO is intended to be a single machine database, not a server. The database name is defined in the Registry and/or via an environment variable. However you can use the &quot;Oracle Client&quot; with it if you choose. As mcowen suggests, go back to your install disk and install the Oracle client, if it isn't there.

If it is there, you might just need to configure it - Under the Start Menu/Programs/Oracle-OraHome81/Network Administration/Net8 Configuration Assistent.

Also a hint - If your PC does not have a network card, use the IP address 127.0.0.1 as your address - this means &quot;local machine&quot;.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top