[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

need to configure odbc connection

Posted on 2008-06-22
33
Medium Priority
?
657 Views
Last Modified: 2013-12-18
I have the following image attached I don't know what is my listner. When it drops down i get a whole bunch of weird ascii characters.
see attached image.
Can you help.
image1.jpg
0
Comment
Question by:mathieu_cupryk
[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
  • 19
  • 11
  • 3
33 Comments
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 21841112
> I don't know what is my listner
check out the contents of the tnsnames.ora file in your oracle home.
it will (should) contain the tns name config for the database you want to connect to.
0
 

Author Comment

by:mathieu_cupryk
ID: 21841144
where can I check this tnsnames.ora?

it seems i cannot see this file in vista.
0
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 21841283
in your oracle home folder, then network\admin
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:mathieu_cupryk
ID: 21842089
if i go to oracle folder all i can see is product folder

0
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 21842097
what oracle client did you install on the machine you want to connect from?
0
 
LVL 16

Expert Comment

by:Richard Olutola
ID: 21842238
Perhaps he's using instant client?

R.
0
 

Author Comment

by:mathieu_cupryk
ID: 21842386
i downloaded the production db
production client
product companion
and installed all three.
0
 
LVL 16

Expert Comment

by:Richard Olutola
ID: 21842450
Did you install all 3 on the same machine? If so, then you didn't need to install the client because the client is included in the main database server (production db).
Anyway, I'm assuming you're working on the same machine you installed all these things on. In which case, if you kept notes during your installation, then you should recall the ORACLE_HOME parameter you set.

The tnsnames.ora file is located in $ORACLE_HOME/network/admin directory. Sorry I don't know if you are windows or linux/unix.

If you open this file then you should see your connection details for any databases you have created.

It would look something like:

myConn =
  (DESCRIPTION =
    (ADDRESS_LIST =
        (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.2)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = myDB.mydomain.com)
    )
  )
   
In the above, my myConn is the alias and it is what I'll use to connect to my database.

Alternatively, you could search for tnsnames.ora
0
 

Author Comment

by:mathieu_cupryk
ID: 21842682
this is what I have i do not know where things are:
see attached image.
services1.jpg
0
 
LVL 16

Expert Comment

by:Richard Olutola
ID: 21842709
OK.

Are you on Vista?
Did you search for tnsnames.ora?

I can guess that you would have an entry in yout tnsnames.ora for XE so when you're asked for a TNS Service Name, you could enter/select XE.

If this doesn't work then I'll have to insist that you create a tnsnames.ora and if one doesn't exist then we'll have to create one.

R.
0
 

Author Comment

by:mathieu_cupryk
ID: 21842725
yes i am on vista. there is no tnsnames.ora
see attached file.

tns.jpg
0
 
LVL 16

Expert Comment

by:Richard Olutola
ID: 21842771
Tell me if you have the following directory

oraclexe\app\oracle\product\10.2.0\server\network\admin

If you do then create tnsname.ora file here.

You should use Net Configuration Assistant or Net Manager to create tnsnames.ora but you appear not to be familiar with these tools so we'll try and create one manually.

The content should be as follows:


# tnsnames.ora Network Configuration File: C:\oraclexe\app\oracle\product\10.2.0\server\network\admin\tnsnames.ora
# Generated manually.
 
xe =
  (DESCRIPTION =
    (ADDRESS_LIST =
        (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = xe)
    )
  )

Open in new window

0
 
LVL 16

Expert Comment

by:Richard Olutola
ID: 21842776
You should also create sqlnet.ora in the same directory with the following simple content


# sqlnet.ora Network Configuration File: <your path>\sqlnet.ora
# Generated by Oracle configuration tools.
 
#SQLNET.AUTHENTICATION_SERVICES= (NTS)
 
NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)

Open in new window

0
 

Author Comment

by:mathieu_cupryk
ID: 21842777
this is what I have in the file:

XE =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = matt-PC)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = XE)
    )
  )

EXTPROC_CONNECTION_DATA =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE))
    )
    (CONNECT_DATA =
      (SID = PLSExtProc)
      (PRESENTATION = RO)
    )
  )

ORACLR_CONNECTION_DATA =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE))
    )
    (CONNECT_DATA =
      (SID = CLRExtProc)
      (PRESENTATION = RO)
    )
  )
0
 

Author Comment

by:mathieu_cupryk
ID: 21842784
so I will create the file:

# sqlnet.ora Network Configuration File: <your path>\sqlnet.ora
# Generated by Oracle configuration tools.
 
#SQLNET.AUTHENTICATION_SERVICES= (NTS)
 
NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)


and what should i modify above in the tsnames.ora
0
 

Author Comment

by:mathieu_cupryk
ID: 21842789
this is what i have already in the
# This file is actually generated by netca. But if customers choose to
# install "Software Only", this file wont exist and without the native
# authentication, they will not be able to connect to the database on NT.

SQLNET.AUTHENTICATION_SERVICES = (NTS)

what should i modify this.
0
 

Author Comment

by:mathieu_cupryk
ID: 21842794
it is saying access denied when i try to save.
0
 
LVL 16

Expert Comment

by:Richard Olutola
ID: 21842796
So you already have it. That's fine.

Like I suspected, you do have an entry for XE so just enter/select XE as your TNS Service Name when you need to connect to your XE database or you need to configure your odbc connection.

R.
0
 
LVL 16

Expert Comment

by:Richard Olutola
ID: 21842821
You have both files!!! You do not need to create or modify anything.

R.
0
 

Author Comment

by:mathieu_cupryk
ID: 21842830
ok now what should i do?

cause it looks like the oracle maestro is looking for the TNS listner
can we use something else.
should i goto the odbc connections in administration.

0
 

Author Comment

by:mathieu_cupryk
ID: 21842834
ok now what should i do?

cause it looks like the oracle maestro is looking for the TNS listner
can we use something else.
should i goto the odbc connections in administration.

0
 

Author Comment

by:mathieu_cupryk
ID: 21842838
if i goto odbc
oracle in XE
oracle in Client
microsoft odbc for oracle.
which one do i select.
0
 

Author Comment

by:mathieu_cupryk
ID: 21842859
unable to connect sqlstate=08004
[oracle][odbc] ora-12154: tns:could not resolve the connect indentifier specified.
0
 
LVL 16

Expert Comment

by:Richard Olutola
ID: 21842870
Tell me what you're trying to do. And maybe show me a screen print of where you're faced with these choices.

From the command prompt do you get a positive response when you do tnsping xe?

This tells you that the listenener is working. And if the listener is working and it has registered the database so that it knows that it exists then anything should be able to connect to the database via the listener.

R.
0
 

Author Comment

by:mathieu_cupryk
ID: 21842873
when i did the following system dns
see attached image
I have a connection that works.

connection.jpg
0
 

Author Comment

by:mathieu_cupryk
ID: 21842884
TNS Ping Utility for 32-bit Windows: Version 10.2.0.1.0 - Production on 22-JUN-2
008 19:54:30

Copyright (c) 1997, 2005, Oracle.  All rights reserved.

Used parameter files:
C:\oraclexe\app\oracle\product\10.2.0\server\network\admin\sqlnet.ora


Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = matt-PC)
(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = XE)))
OK (20 msec)

C:\Users\matt>
0
 
LVL 16

Expert Comment

by:Richard Olutola
ID: 21842887
So you're OK now?

R.
0
 

Author Comment

by:mathieu_cupryk
ID: 21842901
i am using dreamcoder
they asm me for connection manager
I would like to create a schema name with init_price.
Should i log in with sysdba or system.
system worked for the odbc.
see image attached.


oracle-connection.jpg
0
 

Author Comment

by:mathieu_cupryk
ID: 21842914
i got in with sysoper. mode.

I need to import the following file and put in under the schema init_price.

init_price should be granted sysoper.

Can you help me.

export.txt
0
 
LVL 16

Expert Comment

by:Richard Olutola
ID: 21842924

Good. It sounds like you've been successful.

Log in as SYS (with SYSDBA privilege) to create a user. You could log in as anybody with SYSDBA privileges.

R.


0
 

Author Comment

by:mathieu_cupryk
ID: 21842945
i am in the sys@XE

i need to creat this user

I am in the sql editor.


0
 
LVL 16

Accepted Solution

by:
Richard Olutola earned 2000 total points
ID: 21842951
Log in as SYS and select the SYSDBA mode. Then you can create a user.

Can this tool be used to create a user? If so, then you should be able to create a user when logged in as SYS.

If you have another question then I think you should close this one and start a different thread since the purpose of this thread has been met - To create an odbc connection.

R.
0
 

Author Closing Comment

by:mathieu_cupryk
ID: 31469537
Well done. Excellent performance.
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

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

Have you ever had to make fundamental changes to a table in Oracle, but haven't been able to get any downtime?  I'm talking things like: * Dropping columns * Shrinking allocated space * Removing chained blocks and restoring the PCTFREE * Re-or…
Background In several of the companies I have worked for, I noticed that corporate reporting is off loaded from the production database and done mainly on a clone database which needs to be kept up to date daily by various means, be it a logical…
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
This video shows how to copy an entire tablespace from one database to another database using Transportable Tablespace functionality.

656 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