Instant Client - Oracle 10.2.0.1 + + Linux Ubuntu

DBA Geral (instalação, configuração do banco, scripts do Sql*Plus, shell scripts, batch scripts, etc...)
Post Reply
emej77
Rank: Estagiário Pleno
Rank: Estagiário Pleno
Posts: 6
Joined: Wed, 05 Apr 2006 12:11 pm
Location: São Paulo - SP

Guys, how are you?

I have a problem.

I installed the Oracle Instant Client 10.2.0.1 on Linux Ubuntu.
I installed with the following files:

Select all

- oracle-instantclient-basic-10.2.0.1-1.i386.rpm 
- oracle-instantclient-sqlplus-10.2.0.1-1.i386.rpm
So far so good.
The problem is that when executing the command below:

Select all

- sqlplus usuario@banco
The message below is displayed:

Select all

- ORA-12504: TNS:listener was not given the SID in CONNECT_DATA
I think the problem is in tnsnames.ora, but the problems is that I do not know where to create this file if you need to set any other party.

I need help.

Remembering that I only installed the Instant Client and not the complete bank.

What do I need to do?

-
Amplexes
User avatar
dr_gori
Moderador
Moderador
Posts: 5026
Joined: Mon, 03 May 2004 3:08 pm
Location: Portland, OR USA
Contact:
Thomas F. G

Você já respondeu a dúvida de alguém hoje?
https://glufke.net/oracle/search.php?search_id=unanswered

Make sure the tnsnames.ora is set right. Typically, this file finds in your Oracle_Home, in the Network / Admin folder folder.

You can easily search like this:

Select all

[oracle@ti-banco oracle]$ find -name tnsnames.ora 
./product/10.1.0/network/admin/samples/tnsnames.ora 
./product/10.1.0/network/admin/tnsnames.ora 
Find the file, make sure it is "pointing" for the Oracle server. It has an example there in the samples folder.
There goes mine:

Select all

[oracle@ti-banco admin]$ cat tnsnames.ora 
# tnsnames.ora Network Configuration File: /app/oracle/product/10.1.0/network/admin/tnsnames.ora 
# Generated by Oracle configuration tools. 
 
ORATESTE = 
  (DESCRIPTION = 
    (ADDRESS = (PROTOCOL = TCP)(HOST = ti-banco)(PORT = 1521)) 
    (CONNECT_DATA = 
      (SERVER = DEDICATED) 
      (SERVICE_NAME = ORATESTE) 
    ) 
  ) 

I am showing how to install the bank, I never installed only the Instant Client. .. maybe things be different there ... even so, I hope I have helped ...
emej77
Rank: Estagiário Pleno
Rank: Estagiário Pleno
Posts: 6
Joined: Wed, 05 Apr 2006 12:11 pm
Location: São Paulo - SP

DR_GORI

My tnsnames.ora is right as the example, just changing the name, host, and service_name.

Only I have not installed the complete Oracle, only the Instant Client.
Thanks.

Someone already installed this instant client and made it work on Linux?

-
Amplexes
User avatar
dr_gori
Moderador
Moderador
Posts: 5026
Joined: Mon, 03 May 2004 3:08 pm
Location: Portland, OR USA
Contact:
Thomas F. G

Você já respondeu a dúvida de alguém hoje?
https://glufke.net/oracle/search.php?search_id=unanswered

Verify that you have a variable with the SID you want:

Select all

[oracle@ti-banco ~]$ echo $ORACLE_SID 
ORATESTE 
[oracle@ti-banco ~]$
If you do not have, you must create.

Select all

export ORACLE_SID=seu_sid
Check if the TNS_ADMIN variable is pointing to the place where your tns_names.ora is located.

Another way to test \r\n

You can connect to Oracle without using TNSNAMES, Placing after @ your server, port and sid. Something like this:

Select all

sqlplus <usuário>/<senha>@<servidor>:<porta>/<sid>
Example:

Select all

sqlplus system/manager@myoracleserver:1521/o10g
The TNS is optional, it is like a phones schedule to simplify things at the time of connecting. ..

Try it!
emej77
Rank: Estagiário Pleno
Rank: Estagiário Pleno
Posts: 6
Joined: Wed, 05 Apr 2006 12:11 pm
Location: São Paulo - SP

dr_gori.

Remembering: I installed only the Instant Client

I did not understand the part of creating the SID variable
where the $ oracle_sid variable is recorded After creation?

Then look what I tried to do.

Select all

 
--> pelo nome do banco com domínio <-- 
sqlplus usuario/senha@BANCO.XXX.BR:1521/ORCL 
--> erro gerado 
ERROR: 
ORA-12504: TNS:listener was not given the SID in CONNECT_DATA 

Select all

 
--> pelo nome do banco sem domínio <-- 
sqlplus usuario/senha@BANCO:1521/ORCL 
--> erro gerado 
ERROR: 
ORA-12504: TNS:listener was not given the SID in CONNECT_DATA 

Select all

 
--> pelo IP do banco com domínio <-- 
sqlplus usuario/senha@999.99.99.999.XXX.BR:1521/ORCL 
--> erro gerado 
ERROR: 
ORA-12154: TNS:could not resolve the connect identifier specified 

Select all

 
--> pelo IP do banco sem domínio <-- 
sqlplus usuario/senha@999.99.99.999:1521/ORCL 
--> erro gerado 
ERROR: 
ORA-12504: TNS:listener was not given the SID in CONNECT_DATA 
So what's wrong?

-
Amplexes
gilbertoca
Rank: DBA Sênior
Rank: DBA Sênior
Posts: 372
Joined: Tue, 24 Jan 2006 3:33 pm
Location: Palmas - TO
Contact:

For you to connect with the Oracle server, you need three things the user ID, password and especially the service name on the network. The service name on the network is the path to the Oracle server and its service name, which is an alias for the bank.

The easiest way to configure this service name on the client is through the Netmgr utility.
For this you need to configure the main variables of environment, which are: oracel_base - where you install the Oracle products
oracle_home - oracle product installation place - in this case the client

To verify that you have already configured or not:

Select all

 
gilberto@TI-DES05:~> env|grep ORA 
ORACLE_SID=DESENV 
ORACLE_BASE=/opt/oracle 
ORA_NLS33=/opt/oracle/oracleDevSuite/ocommon/nls/admin/data 
ORACLE_HOME=/opt/oracle/oracleDevSuite 
gilberto@TI-DES05:~> 
If opposite, edit your environment configuration file, in my case I use bash, then it will be .bashrc and create these variables there.
then it is only to rotate the utility:

Select all

 
gilberto@TI-DES05:~> netmgr  
emej77
Rank: Estagiário Pleno
Rank: Estagiário Pleno
Posts: 6
Joined: Wed, 05 Apr 2006 12:11 pm
Location: São Paulo - SP

Wow, what complicated ...

So there are no directories.
The directories that exist are these

Select all

 
elias@DPD6002:/usr/lib/oracle/10.2.0.1/client$ 
elias@DPD6002:/usr/lib/oracle/10.2.0.1/client/bin$ 
elias@DPD6002:/usr/lib/oracle/10.2.0.1/client/lib$ 
I tried to run this command and it does not exist.

Select all

 
elias@DPD6002:~$ netmgr 
bash: netmgr: command not found 
I have the data below that I got from the tnsnames.ora from WinXP
user
password
domain
port
sid

I would like to create the variable (tns_names.ora) that you spoke in a response below, but where should I create this variable, and how?

is ... It's not easy.

I will continue to try ...
Thank you very much ...
syntax
Rank: Estagiário Sênior
Rank: Estagiário Sênior
Posts: 12
Joined: Sat, 18 Jun 2005 2:32 pm
Location: Campinas-SP

See if this helps
http://download-west.oracle.com/docs/ht ... tm#1005989

or this here
http://download-west.oracle.com/docs/ht ... 02/toc.htm


] or if you want a good toolkit to move in Oracle for Linux I advise this, good Toolkit very relieves the life of the DBA's
http://tora.sourceforge.net
or even the forum Ubuntu
http://www.ubuntuforums.org/
syntax
Rank: Estagiário Sênior
Rank: Estagiário Sênior
Posts: 12
Joined: Sat, 18 Jun 2005 2:32 pm
Location: Campinas-SP

I did not find an option for me to edit my post, but aí goes
I sent the link for Windows, sorry

http://otn.oracle.com/pls/db10g/portal. ... selected=1
emej77
Rank: Estagiário Pleno
Rank: Estagiário Pleno
Posts: 6
Joined: Wed, 05 Apr 2006 12:11 pm
Location: São Paulo - SP

Look, by what I'm seeing will not have a way.
So far I do not know anyone who has only installed the Instant Client.
I will download the complete CD from the Oracle bank and install the customer part.

Thanks for aid
-
Amplexes
emej77
Rank: Estagiário Pleno
Rank: Estagiário Pleno
Posts: 6
Joined: Wed, 05 Apr 2006 12:11 pm
Location: São Paulo - SP

I managed,
then I uninstalled and installed it again and it worked.

Thanks to all.

-

Amplexes
Post Reply
  • Information
  • Who is online

    Users browsing this forum: No registered users and 1 guest