Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 659
  • Last Modified:

need to configure odbc connection

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
mathieu_cupryk
Asked:
mathieu_cupryk
  • 19
  • 11
  • 3
1 Solution
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
> 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
 
mathieu_cuprykAuthor Commented:
where can I check this tnsnames.ora?

it seems i cannot see this file in vista.
0
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
in your oracle home folder, then network\admin
0
Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

 
mathieu_cuprykAuthor Commented:
if i go to oracle folder all i can see is product folder

0
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
what oracle client did you install on the machine you want to connect from?
0
 
Richard OlutolaConsultantCommented:
Perhaps he's using instant client?

R.
0
 
mathieu_cuprykAuthor Commented:
i downloaded the production db
production client
product companion
and installed all three.
0
 
Richard OlutolaConsultantCommented:
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
 
mathieu_cuprykAuthor Commented:
this is what I have i do not know where things are:
see attached image.
services1.jpg
0
 
Richard OlutolaConsultantCommented:
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
 
mathieu_cuprykAuthor Commented:
yes i am on vista. there is no tnsnames.ora
see attached file.

tns.jpg
0
 
Richard OlutolaConsultantCommented:
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
 
Richard OlutolaConsultantCommented:
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
 
mathieu_cuprykAuthor Commented:
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
 
mathieu_cuprykAuthor Commented:
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
 
mathieu_cuprykAuthor Commented:
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
 
mathieu_cuprykAuthor Commented:
it is saying access denied when i try to save.
0
 
Richard OlutolaConsultantCommented:
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
 
Richard OlutolaConsultantCommented:
You have both files!!! You do not need to create or modify anything.

R.
0
 
mathieu_cuprykAuthor Commented:
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
 
mathieu_cuprykAuthor Commented:
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
 
mathieu_cuprykAuthor Commented:
if i goto odbc
oracle in XE
oracle in Client
microsoft odbc for oracle.
which one do i select.
0
 
mathieu_cuprykAuthor Commented:
unable to connect sqlstate=08004
[oracle][odbc] ora-12154: tns:could not resolve the connect indentifier specified.
0
 
Richard OlutolaConsultantCommented:
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
 
mathieu_cuprykAuthor Commented:
when i did the following system dns
see attached image
I have a connection that works.

connection.jpg
0
 
mathieu_cuprykAuthor Commented:
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
 
Richard OlutolaConsultantCommented:
So you're OK now?

R.
0
 
mathieu_cuprykAuthor Commented:
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
 
mathieu_cuprykAuthor Commented:
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
 
Richard OlutolaConsultantCommented:

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
 
mathieu_cuprykAuthor Commented:
i am in the sys@XE

i need to creat this user

I am in the sql editor.


0
 
Richard OlutolaConsultantCommented:
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
 
mathieu_cuprykAuthor Commented:
Well done. Excellent performance.
0

Featured Post

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

  • 19
  • 11
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now