Sql Plus & Listener & TNSname are my problems
I have installed Oracle Enterpise Sever on Linux Server (Open Linux of Caldera).
I have installed Oracle Client on Win98 workstation.
I have problem after set Net8 conf client.
Servicename = oralin (same as server)
Protocol = TCP (same as server)
Host=192.168.0.11 (server ip addr.)
SID=oralin (same as server)
==============================================================
My Sqlnet.ora at client is
#sqlnet.authentication_services = (NONE)
#NAME.DEFAULT_ZONE = world
#SQLNET.EXPIRE_TIME = 0
#SQLNET.ENCRYPTION_SERVER = requested
#SQLNET.ENCRYPTION_CLIENT = requested
SQLNET.EXPIRE_TIME = 0
SQLNET.ENCRYPTION_SERVER = requested
SQLNET.ENCRYPTION_CLIENT = requested
NAMES.DIRECTORY_PATH= (TNSNAMES, HOSTNAME, ONAMES)
==============================================================
My TNSname 's syntax at client is
ORALIN =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.11)(PORT = 1521))
(CONNECT_DATA = (SID = oralin))
==============================================================
My TNSname 's syntax at server is
ORALIN =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.11)(PORT = 1521))
(CONNECT_DATA =
(SERVICE_NAME = oralin)
==============================================================
My LISTENER.ORA at Server side
LISTENER =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.11)(PORT = 1521))
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = oralin)
(ORACLE_HOME = /usr/oracle)
(SID_NAME = oralin)
==============================================================
At server listener for protocol TCP, host 192.168.0.11, port 1521 has been started. Database has also been started.
I am able to test Net 8 conf at server side. It works fine.
This is my LISTENER status
LSNRCTL for Linux: Version 8.1.6.0.0 .....
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.0.11)
(PORT=1521)))
STATUS of the LISTENER
Alias LISTENER
Version TNSLSNR for Linux Version 8.1.6.0.0 - Production
Services Summary
oralin has 1 service handler(s)
The command completed successfully
==============================================================
But from client, I run Net8 conf to test TNS
then I got like below...
The test did not succeed.
ORA-12545: Connect failed because target host or object does not exist
There may be an error in the fields entered
or the server may not be ready for a connection.
You can check the server and retry, or continue.
But if I run sqlplus, then prompt show
Enter user name : system (i type and enter)
I got like below...
Error
ORA-12203: TNS: unable to connect to destination.
I know that it because of either TCP protocol or my setting.
But as my setting i said in the above, it should be ok.
And for TCP, I am able to ping 192.168.0.11
and I am to tnsping80 192.168.0.11 (it can contact listener which is runing on server)
Is there any setting or hint or problem to be done?
It is urgently
Thank you
read my post: http://technet.oracle.com:89/ubb/Forum7/HTML/200107.html
cheers,
Andrew
Similar Messages
-
Connect to database with SQL*Plus: is TNSNAMES.ORA used?
Hi ,
we have a local database called DEV01 and a duplicate of this database in a datacenter. To be able to connect to both databases the TNSNAMES.ORA
on the local database server (not the one in the datacenter) has the following entries:
/* Entry for local database */
DEV01_local, DEV01_local.WORLD =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = server01)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SID= DEV01)
/* Entry for database in datacenter */
DEV01,DEV01.WORLD =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = server02)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SID = DEV01)
When I connect to the local database server I set the Oracle-environment as follows:
export ORACLE_SID=DEV01
export PATH=/opt/oracle/app/oracle/product/9.2.0/bin:$PATH
export ORACLE_HOME=/opt/oracle/app/oracle/product/9.2.0
Now I start SQL*Plus as follows:
oracle#> sqlplus user/user
SQL> select instance_name, host_name from v$instance;
INSTANCE_NAME HOST_NAME
DEV01 server01
Since the SID is on both databases the same (DEV01) I really do not understand how Oracle decides to which database SQL*Plus connects to.
Is it a matter of the entries in the TNSNAMES.ORA?
But when I start SQL*Plus as follows:
oracle#> sqlplus user/user@DEV01_local
SQL> select instance_name, host_name from v$instance;
INSTANCE_NAME HOST_NAME
DEV01 server01
or
oracle#> sqlplus user/user@DEV01
SQL> select instance_name, host_name from v$instance;
INSTANCE_NAME HOST_NAME
DEV01 server02
everything is as expected.
Does anybody know which database gets chosen when just connect with "sqlplus user/user" (without @DEV01 or @DEV01_local)?
Any help will be appriciated!
Rgds
JanBoth databases have the SID=DEV01.
The ORACLE_SID is set to DEV01 - but when connecting I end up at
oracle#> sqlplus user/user
SQL> select instance_name, host_name from v$instance;
INSTANCE_NAME HOST_NAME
DEV01 server01
which is the database with the TNSNAMES.ORA entry "DEV01_local, DEV01_local.WORLD = ..."
In your case the one defined by ORACLE_SID environment variable => but which from both is it? -
Enterprise manager & sql* plus login failed
hi
this is the problem i encountered yesterday:
there are server_3 and rs_16 machines which are in D1 domain and server_1 in W1 workgroup. server_3 and rs_16 has no oracle software whatsoever and on server_1 8i database exists. other machines with 8i clients, all in D1 domain, succesfully connect to server_1.
i installed 10g database on server_3 machine; after installation i created a database db1. after the database was created, i tried to start enterprise manager (EM) and it failed (the database is not mounted ....), and i found out that tns listener wasn't created during the installation. so i created tns listener and started EM again and browser showed the proper page (username and login). so i entered sys as username, pswrd (created during the installation) and connect as sysdba. when i clicked on login button, the page refreshed but nothing happened, the same page (login) was still opened. i tried to connect from rs_16 and the same thing happened. this happened using internet explorer for opening EM. i tried to login as system, sysman but all in vain.
then i installed 10g on rs_16, created db2 database and found out that tnsnames.ora file was missing. created db3 as well, and all went ok. started EM, tried to login and the same thing happened as on server_3, browser just refreshed the page.
also have to say that i tried to connect to databases using sql* plus and login also failed.
also tried using administration assistent for windows and tried to connect to db3. when i tried to connect as sys acount (database authentication) login failed, but when i used os authentication i succeeded.
then i tried to start EM from another machine rs_13 (D1 domain) using internet explorer and i succeeded, there was no problem at all. after all, i installed mozilla firefox (1.0.6) on rs_16 and succesfully started EM for any database i wanted. but have to mention that i still can't connect to any db using sql* plus.
rs_13 setup:
- win 2000 + sp4
- ie 6.0.2600.0000IC
and rs_16:
- win xp + sp2
- ie 6.0.2900.2180.xpsp_sp2
server_3:
- windows server 2003
on every machine i was logged in as top administrator so i had any possible permission.
could anybody answer these questions:
1. why tnsnames.ora wasn't created?
2. why tns listener wasn't created?
3. why couldn't i start EM using ie on server_3 and rs_16 and could on rs_13?
4. why did login fail using sql* plus and why can't i still connect to any db using sql* plus? is it a problem of assigning some privileges or something else?
5. why did login fail using database authentication while succeeded using windows authentication in administration assistent for windows? what should i do to make it succeed? is this all problem due to ie browser, win security or oracle security?
6. why microsoft is giving me a hard time with their security?
thanks for help in advance
hope this post will help someone else as well !!
Message was edited by:
uncle carmine
Message was edited by:
uncle carminecould anybody answer these questions:
1. why tnsnames.ora wasn't created?
2. why tns listener wasn't created?I think you cancel Network Configuration Assistan which would create tnsnames.ora and listener. I hope others help you with the other questions I have plenty of work
Best Regards
Krystian Zieja / mob -
Checking Module to Prevent SQL Plus usage on Database
I have a question regarding logon triggers checking against SYS_CONTEXT('USERENV', 'MODULE'). I created a logon trigger that looks for SYS_CONTEXT('USERENV', 'MODULE') = 'SQLPLUS.EXE'
and if it matches then it only allows specified users to log in to the database. This code works but I am confused as to why when I check SYS_CONTEXT('USERENV', 'MODULE') after I login in
shows SQL*Plus which clearly does not match my IF statement in my logon trigger.
Second issue. If I rename sqlplus.exe to jeff.exe and run it I am abled to log in to the database as a non DBA user. But the module still shows as SQL*Plus. Why is this?
Database Version: 11.2.0.2 64bit
OS: Windows Server 2003 R2
Client: 11.2.0.1
/*********************Create Trigger******************************/
CREATE OR REPLACE TRIGGER application_check_al
after logon ON database
DECLARE
l_username VARCHAR2(20);
l_module VARCHAR2(20);
BEGIN
l_username := SYS_CONTEXT('USERENV', 'SESSION_USER');
l_module := UPPER(SYS_CONTEXT('USERENV', 'MODULE'));
IF l_module LIKE 'SQLPLUS.EXE' AND
l_username NOT IN ('SYS', 'SYSTEM', 'DVOWNER', 'DVMGR') THEN
raise_application_error(-20001, 'SQLPLUS ACCESS RESTRICTED FOR NON DBA USERS');
END IF;
END application_check_al;
/*********************Run SQLPLUS******************************/
SQL*Plus: Release 11.2.0.1.0 Production on Wed Mar 7 12:22:23 2012
Copyright (c) 1982, 2010, Oracle. All rights reserved.
Enter user-name: jeffc@dev
Enter password:
ERROR:
ORA-00604: error occurred at recursive SQL level 1
ORA-20001: SQLPLUS ACCESS RESTRICTED FOR NON DBA USERS
ORA-06512: at line 10
Enter user-name: system@dev
Enter password:
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
With the Partitioning, OLAP, Data Mining, Oracle Database Vault
and Real Application Testing options
system@dev> select sys_context('USERENV','MODULE') from dual;
SYS_CONTEXT('USERENV','MODULE')
SQL*Plus
SQL>jeff81 wrote:
That doesn't make sense. Why am I able to log in when I renamed the exe? And why does the module still show as SQL*Plus?You are right - it does not make sense. The idea that Oracle might perhaps set module to SQLPLUS.EXE on executable start, and then re set from SQLPLUS.EXE to SQL*Plus after connect, or in glogin.sql, to ensure it is consistent across all operating system never crossed my mind.
You might want to refer to Support Note "SQL*Plus Session/Module is Not Showing in V$SESSION" [ID 1312340.1] to see whether anything in there helps. I'm pretty sure http://docs.oracle.com/cd/E11882_01/server.112/e16604/ch_twelve040.htm#i2698573 doesn't help much, though.
I'd certainly be raising it with Support as a potential security challenge, to get that potential hole closed.
Edited by: Hans Forbrich on Mar 7, 2012 2:23 PM
I wonder whether Oracle put that capability in there - if an untained SQLPLUS.EXE, it tells you that it is SQLPLUS.EXE, but if renamed it tells you 'SQL*Plus'? Specuklation, but it is one thing I might do to subtly raise the flag. Best bet - ask Support.
Edited by: Hans Forbrich on Mar 7, 2012 2:29 PM -
Print a report from sql*plus.
Regards all
Let me know whether it is possible to print a hard report rom sql*plus and how.
waitingLet me know whether it is possible to print a hard report rom sql*plus Yes. SPOOL is a command to get SQL*Plus screen results to disk real-time.
and how.A "report" is such a generic term, that you will have to get started with at least some reading :)
http://otn.oracle.com/docs/products/oracle9i/doc_library/release2/server.920/a90842/toc.htm
(search for: "How Can I Learn SQL*Plus")
You may also address specific questions about the SQL*Plus product (that are not really Database SQL and/or PL/SQL related) via the [Technologies>Tools>iSQL*Plus] forum rather than here.
waiting That's up to you! Dig in!
Michael O'Neill
Publisher of the PigiWiki
clever-idea.com -
Is there some time setting in sql*plus or Oracle9i
Hi guys,
I just run the following simple query in sql*plus in oracle 9i:
select * from pers ;
The table is around 190k rows. But it always stops running after 28-30minutes. No error message displayed and the whole sql*plus just hang on there.... The only thing I can do is to restart the sql*plus.
I got this problem when I run some other query, so I use this simple query just to test if it will stop after running 30m. Now it does. I'm thinking there is some setting in sql*plus or ORACL9i I need to do. Could someone help me to solve this problem?
Thanks in advance,Hi,
you can check out this information in the user_resource_limits table.
select * from user_resource_limits;
COMPOSITE_LIMIT UNLIMITED
SESSIONS_PER_USER UNLIMITED
CPU_PER_SESSION UNLIMITED
CPU_PER_CALL UNLIMITED
LOGICAL_READS_PER_SESSION UNLIMITED
LOGICAL_READS_PER_CALL UNLIMITED
IDLE_TIME UNLIMITED
CONNECT_TIME UNLIMITED
PRIVATE_SGA UNLIMITED
Thanks. -
How to see the content of stored prodecure in sql plus worksheet or sql.plu
Hi
i want to see the content of the stored procedure on sql worksheet or sql plus. is there any command for this ?
please let me know
thanksHi Anil:
Following is for SQL*Plus
If you are logged on to the schema that owns the stored procedure you can issue the following query:
select text from user_source where name = 'MY_PROG_NAME'
ORDER BY TYPE, LINE ASC;
Where MY_PROG_NAME could be the name of a package, procedure or function. Note that when you look at a package source you'll get the specfification and the body listing, in that case you may want to split them into two with following queries:
spool MY_PROG_NAME.spec
select text from user_source
where name = 'MY_PROG_NAME'
AND TYPE = 'PACKAGE'
ORDER BY TYPE, LINE ASC;
SPOOL OFF
spool MY_PROG_NAME.body
select text from user_source
where name = 'MY_PROG_NAME'
AND TYPE = 'PACKAGE BODY'
ORDER BY TYPE, LINE ASC;
SPOOL OFF
If you are logged on as SYSTEm, you can substitute USER with DBA and look at code for all schemas, however you may need to add OWNER to your query.
DESC USER_SOURCE
Name Null? Type
NAME NOT NULL VARCHAR2(30)
TYPE VARCHAR2(12)
LINE NOT NULL NUMBER
TEXT VARCHAR2(2000)
DESC DBA_SOURCE
Name Null? Type
OWNER NOT NULL VARCHAR2(30)
NAME NOT NULL VARCHAR2(30)
TYPE VARCHAR2(12)
LINE NOT NULL NUMBER
TEXT VARCHAR2(2000)
Hope this helps,
Thomas -
hai friends.,
i created a java database pgm using jdbc:odbc connectivity, that creates a table in the database and i inserted some records in that table. how can i view those table and records in the sql plus. what commands are used to view those table
regards.,
sekarHi sekar,
Interesting, you're able to do a 'CREATE TABLE bla...' but are not familiar with 'SELECT'? I would suggest to read some basic stuff about SQL statements. What will you do when the next task is: "Hey, I need a pgm to change these values in the table!"?
Regards,
Guido -
Why SQL plus cannot insert CJK Character
When inserting the chinese character into the table
the return character all becomes '?'
(The column type set to NCHAR, and NCHAR charset is UTF16)
No matter I use OLE DB or SQL plus
the result are the same
How to insert it and read correctly ?Language in client machine is also Traditional Chinese
Now I have found a setting to solve it.
But it is very strange.
Originally, the Oracle's NLS_Characterset is Win1252 (Latin)
The NLS_NCHAR_CHARACTERSET is UTF16.
In this case, the chinese cannot be input.
But when I change the NLS_CHARACTERSET to UTF8.
It becomes ok.
I do not think that the NLS_CHARACTERSET will affect NCHAR
type, but it did, now.
Will the Oracle convert the UTF16 to the NLS_CHARACTERSET
codepage and save? -
OEM and SQL*Plus(Strange)
hii,
i use this command to see the space usage of my tablespaces using this script from sql*plus
SQL>select * from dba_tablespace_usage_metrics
After that i use OEM to monitor the space uage of my tablespaces.To my surprise used (%) result from SQL*Plus and OEM are entirely different.
SYSAUX used percent is 1.06315663 from SQL*Plus where as
SYSAUX used percent is 96.79 from OEM Grid control.
For all the tablespaces used(%) value differ
NOTE:The database i am monotoring from SQL*Plus and OEM is same.
Why different values for the same database.
Thankx....This is an undocumented view and bugged for DB version under 10g release 2
Bug 4203626 DBA_TABLESPACE_USAGE_METRICS / V$FILESPACE_USAGE may be wrong
Range of versions believed to be affected Versions < 10.2 -
Calling a remote procedure with db link - SQL Plus hangs
I am trying to call a procedure from a remote database with a db link, within a local procedure. The purpose of the calling the procedure is to get the server time from that database. When I try to compile this procedure on the local database SQL Plus hangs without giving any error message, I have to close SQL Plus. Below are my two procedures:
Local procedure:
CREATE OR REPLACE PROCEDURE get_server_time(p_remotetime IN OUT VARCHAR2)
IS
/*Grabs the system time from remote database .
l_remotetime varchar2(16) ;
BEGIN
get_remote_time(l_remotetime);
p_remotetime := l_remotetime;
END ;
Remote procedure:
CREATE OR REPLACE PROCEDURE get_remote_time(p_remotetime in out VARCHAR2)
IS
/* Grabs the system time from remote database and returns it to the
calling proc.
l_remotetime varchar2(16) ;
BEGIN
SELECT to_char(sysdate,'YYYYMMDDHH24MISS')
INTO l_remotetime
FROM dual ;
p_remotetime := l_remotetime ;
END ;
I personaly do not see anything unusall with the two procedures, but cant figure out what is making SQL*Plus hang.
Any help would be much appreciated.
Thanks In AdvanceHello
Are you able to run the procedure connected to the livetolocal database directly? It looks as if you either have a missing table or the permisions for the user associated with the database link are not sufficient.
As for calling the procedure, it would probably be more managable if you created a public synonym for it to hide the actual location. That way if you want to change the name of the DB link, or where it points to, no-one has to change their code, you just have to change the synonym.
HTH
David -
Oracle SQL*PLUS has encountered a problem and needs to close. We are sorry
I have installed oracle10g release2(10.2.0.1.0) in my system
my porblem when i am trying to issue command
SQL> commit;
Commit complete.
SQL> cl scr;
then it is show below mentioned error
Oracle SQL*PLUS has encountered a problem and needs to close. We are sorry for the inconvenience.
Please can anybody help for me.
with regards,
srinivas.When working with mixed environments you should make sure the path environment variable is consistent with the executables you are currently running, and try not to mix them, i.e. if you are working with the sqlplus from 9i, make sure you execute the sqlplus.exe file from the 9i oracle home and temporarily by means of a batch file put your Oracle Home 9i executables prior to those of 10g , and the other way around, when executing from the 10g make sure all executables and paths are consistent. It should be easier since when installing oracle, oracle configures the PATH environment variable so it can be seen first in the path environment variable.
In your case you are using two compatible versions, but if the dll's get mixed there could be unexpected results.
~ Madrid
http://hrivera99.blogspot.com/ -
Problem running SQL PLUS in Oracle 8i and 9i on Windows XP
I've tried installing both Oracle 8.17 Personal Edition and also 9i in Windows XP Professional (each on a different occassion). I have run into the same problem each time. The installation itself goes fine in both cases, but when I run SQL PLUS, the Log On screen appears for 1-2 seconds then whole thing just closes automatically, so I can't ever access that application which is the only thing I need to work with. Any ideas on what's going wrong? Thanks.
Patrick,
Well a few things. Did you try TNSPING to see if the listener is up? If it's ok, can you connect with FREE toad? Download Oracle OEM and install that (the SQL net and sql plus portions). If you can't get tnsping to work, sqlplus isn't going too either. I don't know why the sqplus is actually shutting down, but I'm guessing the TNS NAMES entry isnt there (in the tnsnames.ora file). If the tnsnames entry is there then tnsping should work. Get tnsping to work first.
Tyler. -
ORA-12541: TNS: no listener when attempting to log int SQL*Plus
Hi everyone,
Since we are now studying forms. I installed The Developer Suite on the same machine as the Oracle Database. I was able to use SQL*Plus and the Procedure Builder in Oracle Forms. I was able to connect to the Oracle 8i database with the Oracle 9i Developer. Then I started playing with forms and when I tried to run the form it told me that it could not find a listener. So, I made some changes on the Oracle Database and added a listener and gave it the 8888 port that it was looking for. That did not work so I change the properties on the forms to the port that the database listener had 1521 or at least that is what I believe it was. Now I cannot connect to Oracle SQL*PLus and I cannot connect from the forms to the database either. I have deleted the listeners and added them again. I have checked under services to make sure that it is started. Has anyone seen this before.
Thanks for any help.
RobertThe problem comes into play when you try to select the actual LOB locator remotely, however straight INSERTs aren't a problem.
SQL> desc test_clob1
Name Null? Type
A1 NUMBER
A2 CLOB
SQL> desc test_clob2@remotedb
Name Null? Type
A1 NUMBER
A2 CLOB
SQL> declare
2 big_text varchar2(32767) := rpad('#',32767,'#');
3 begin
4 insert into test_clob1 values (1, big_text );
5 end;
6 /
PL/SQL procedure successfully completed.
SQL> select a1, dbms_lob.getlength(a2) from test_clob1;
A1 DBMS_LOB.GETLENGTH(A2)
1 32767
SQL> select count(*) from test_clob2@remotedb;
COUNT(*)
0
SQL> insert into test_clob2@remotedb
2 select * from test_clob1;
1 row created.
SQL> select a1, dbms_lob.getlength(a2) from test_clob2@remotedb;
select a1, dbms_lob.getlength(a2) from test_clob2@remotedb
ERROR at line 1:
ORA-22992: cannot use LOB locators selected from remote tables
SQL> commit;
Commit complete.However, if I do a COMMIT and then go to the remote database and do the same query, I get the following:
SQL> select a1, dbms_lob.getlength(a2) from test_clob2;
A1 DBMS_LOB.GETLENGTH(A2)
1 32767HTH -
Problem logging on to SQl *Plus
Hi
I have installed Oracle 8i Personal Edition Release 8.1.7 on my computer where I have the operating system Windows 98. When I am trying to log on to the database through SQL*Plus, I get the following message: "ORA-12541: TNS: no bugging/listener " (I get the message in Swedish so I hope I have translated it correct in English)
kindly help me out to resolve this problem.
Thanks in advance
AnnaFrom the error messages documentation:
Cause: The connection request could not be completed because the listener is not running.
Action: Ensure that the supplied destination address matches one of the addresses used by the listener. Compare the TNSNAMES.ORA entry with the appropriate LISTENER.ORA file (or TNSNAV.ORA if the connection is to go by way of an Interchange). Start the listener on the remote machine.
Maybe you are looking for
-
Creating Query to show items from open sales orders with a/p invoice
Hi experts, I am trying to create a query that will show what items/quantities are still in open sales orders that can now be filled by an incoming shipment of goods, processed through the a/p invoice. This needs to be done using subqueries, which I
-
the details are in my last email to you, about 5 minutes ago.
-
Videos from Itunes store wont sync to ipod, format not playable
Hey everyone, Today i tried to sync my ipod to add some new songs, and it said that the two Pirates movies off itunes could not be transfered because they are unplayable for the ipod...mind you the videos were on it before and have been played. I tri
-
What will I gain/lose by moving from Expression Media to Lightroom
I've been using Microsoft products in general for years, and in the context of what I'm asking here, the Expression suite since Version 1. Expression Design doesn't come anywhere near Photoshop CS5, which I've just bought, but as well as an editing p
-
Special characters missing in 8500 WiFi
I tried to connect to my WiFi and was unable to do it because there is no ~ in the character set of the Printer (HP officejet 8500 A909 wifi). Can you tell me how can I insert this character (~)?