-
I'm trying to connect to a remote database that 's running on another machine.
this is my first attempt at oracle, and though I've ready many articles on the topic, it still isn't explained thouroughly enough to of any assistance.
We're trying to use a webpage as a frontend interface to an Oracle database, and tying SQL statements to the buttons to perform the actions we need.
I've been told that you can execute SQL statements in SQLPlus like:
SQL> connect username/password
Now, that works great if I'm trying to connect to a database on my machine, but what if someone else wants to connect to my database? Or me to theirs?
SQL> SQLPLUS username/password
... was the last piece of information I was given, but where do you specify the host to connect to? And in what format?
I'm learning more and more about Oracle, but what a wicked learning curve. The ironic thing, is that most of it seems to be in the setup. Once the database is running, the rest is just learning how to interface with it.
Anyway, this is where I'm stuck.
Many thanks,
Wesley Allan Kells.
-
Hi,
You have to configure your tnsnames.ora file so that your machine will recognize the remote database.
If you are using Windows based Oracle simply go to start->programs->Oracle for Windows NT->Oracle Net8 Easy Config.
If you are running Oracle on a unix machine simply edit the tnsnames.ora file in $ORACLE_HOME/network/admin/ directory.
Good Luck
-
use explorer to navigate to the tnsnames.ora file on the database server. Copy the contents of that file, and close it. Navigate to the tnsnames.ora file on the client (where SQL*PLUS is to be run), copy that tnsnames.ora to tnsnames.old, then open it, go to the bottom and paste the copied values. Save as tnsnames.ora.
connect username/password@service_name
Good luck!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|