Why Start SQL*Plus with /nolog
What is the difference between starting SQL*Plus as in
sqlplus sys as sysdba
versus
sqlplus /nolog
connect sys as sysdba
I can imagine that the second method prevents some log file from being written but sometimes logs are useful. Is there more to it than that?
Thanks,
Gregory
It's really interesting to see how a question like this gets answered. Some of what you've been told is true, some not, and most of it is a red herring...
First, using /nolog (as has been correctly stated) has nothing to do with logging. It means "start sqlplus but don't log on to any database just yet"
Second, its user or lack of has nothing to do with connecting as sys, as sysdba, or any other special connection. It means, simply and only, "start sqlplus but don't log on to any database just yet"
It has nothing to do with the ability to run a sql script.
It has nothing to do with your ability to supply a password.
One reason to use it in a *nix environment is to be able to hide the userid and/or password from someone querying processes. As was hinted at, if someone performs a 'ps -ef', they will see the full command line that started the processes. So, if you start with
$>sqlplus system/manager
a ps -f will show the username and password.
If you start with
$>sqlplus system
you will be prompted for password and ps -ef will show the username, because it was on the command line
If you start with
$>sqlplus /nolog
Then supply the username and pswd manually (or in a script), then ps -ef will only show that sqlplus is running, but will not reveal anything about the credentials used.
Similar Messages
-
Problem in starting SQL*PLUS in oracle database 10g
Hi
Well I am facing one problem while starting SQL*PLUS in oracle database 10g
ERROR - "Procedure entry point longjmp could not be located in dynamic link library orauts.dll"
This has happened when I installed Oracle Database 11g on same machine and when I deinstalled Oracle 11g then SQL*PLUS is started...no error came
Can anybody tell me the reason please...hi
pls im having the same problem but in my own case i installed oracle apex using 11g.
im env variable is:
C:\Oracle\product\10.1.0\Client_1\bin;C:\Oracle\product\10.1.0\Client_1\jre\1.4.2\bin\client;C:\Oracle\product\10.1.0\Client_1\jre\1.4.2\bin;C:\app\Xty\product\11.2.0\dbhome_1\bin;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;;C:\Program Files\TortoiseSVN\bin;C:\Program Files\Microsoft SQL Server\80\Tools\Binn\;C:\Program Files\Microsoft SQL Server\90\DTS\Binn\;C:\Program Files\Microsoft SQL Server\90\Tools\binn\;C:\Program Files\Microsoft SQL Server\90\Tools\Binn\VSShell\Common7\IDE\;C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\PrivateAssemblies\
pls which is my apex_home so i can interchange it?
i also have oracle 10g client installed -
I am trying to find out where i can download the older verision of SQL PLUS with GUI interface.
My current SQL PLUS that came with oracle 11g release one is just a console.
thanksPl see if MOS Doc 207303.1 (Client / Server / Interoperability Support Between Different Oracle Versions0 can help
HTH
Srini -
Hi friends
I have installed oracle 9i on windows XP successfully.
I can't start SQL plus, i am typing scott as username and tiger as password then it gives me TNS protocol error.
Please help me, how shall I fix this problem.
Thanks
Harishthe service might not exist yet in the services panel. you'll have to execute the following command from the server where Oracle is installed:
c:\> lsnrctl start
You should receive a series of messages about the listener starting. Then re-check the services as described above and you should see it there. -
Configure SQL*plus with InstantClient to use TNSNAMES
I got following configuration:
Database - 10.2.0.4 EE x64 running on separate server, e.g. 192.168.1.1 with SID test
Client - clean CentOS 6.3 x86 installation.
I've downloaded oracle-instantclient-basic-10.2.0.4-1.i386.rpm and oracle-instantclient-sqlplus-10.2.0.4-1.i386.rpm and made rpm -i on them to install.
Made following exports:
LD_LIBRARY_PATH="/usr/lib/oracle/10.2.0.4/client/lib"
TNS_ADMIN="/usr/lib/oracle/10.2.0.4/client/admin"
/usr/lib/oracle/10.2.0.4/client
├── admin
│ ├── sqlnet.ora
│ └── tnsnames.ora
├── bin
│ ├── genezi
│ └── sqlplus
└── lib
├── glogin.sql
├── libclntsh.so.10.1
├── libnnz10.so
├── libocci.so.10.1
├── libociei.so
├── libocijdbc10.so
├── libsqlplusic.so
├── libsqlplus.so
└── ojdbc14.jar
cat /usr/lib/oracle/10.2.0.4/client/admin/sqlnet.ora
TRACE_LEVEL_CLIENT = OFF
names.directory_path = (TNSNAMES, HOSTNAME)
names.default_domain = world
name.default_zone = world
cat /usr/lib/oracle/10.2.0.4/client/admin/tnsnames.ora
test.world=
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.1)(PORT = 1521))
(CONNECT_DATA = (SID = test))
sqlplus access/[email protected]:1521/test
SQL*Plus: Release 10.2.0.4.0 - Production on Tue Aug 28 14:45:18 2012
Copyright (c) 1982, 2007, Oracle. All Rights Reserved.
ERROR:
ORA-12154: TNS:could not resolve the connect identifier specified
sqlplus access/access@test
SQL*Plus: Release 10.2.0.4.0 - Production on Tue Aug 28 14:45:18 2012
Copyright (c) 1982, 2007, Oracle. All Rights Reserved.
ERROR:
ORA-12154: TNS:could not resolve the connect identifier specifiedAdding .world change nothing.
Using direct connect string works fine:
sqlplus access/access@"(DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.1)(PORT = 1521))(CONNECT_DATA = (SID = test)))"
SQL*Plus: Release 10.2.0.4.0 - Production on Tue Aug 28 14:45:18 2012
Copyright (c) 1982, 2007, Oracle. All Rights Reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit ProductionWhere am I wrong and is it possible to make it work with TNS?
Thanks in advance.insanepi wrote:
sqlplus access/[email protected]:1521/test
SQL*Plus: Release 10.2.0.4.0 - Production on Tue Aug 28 14:45:18 2012
Copyright (c) 1982, 2007, Oracle. All Rights Reserved.
ERROR:
ORA-12154: TNS:could not resolve the connect identifier specified
Add EZ_CONNECT to your names.directory_path for this.
Also you may put .tnsnames.ora file into your $HOME path.
And tracing is a good starting point for troubleshooting. -
SQL*Plus with Oracle 10g Express Edition
How Can I do to log in using SQL*Plus into Oracle 10g?
My Schema is: Banco.Global
My Password is: 111111
I need to write SET SERVEROUTPUT ON to get answer?
I opened the Prompt, but i don't know to log in.
Thanks and my english is not as well as you.If i write:
SQL>connect "Banco.Global"/111111
a error message is raised: Invalid username/password; logon denied
but if I log in into Home Page with the same Username and Password, I get to log in.
There is difference to connect SQL*Plus and the connect with Home Page the Oracle?
I need to connect with SQL*Plus, because i need to make a test. -
CANNOT CONNECT SQL*PLUS WITH ORA-12547
제품 : ORACLE SERVER
작성날짜 : 2004-05-20
발생)
oracle 디렉토리를 변경하거나, 오라클 화일의 위치 또는 permission 을
변경한 다음부터, 오라클을 사용하는 일반 OS account 들이 sql*plus
에 접속할 때 다음과 같은 에러가 발생하면서 접속할 수 없는 현상입니다.
sqlplus scott/tiger
ld.so.1: <product name>:fatal:libsunmath.so.1: can't open file: errno=2
ld.so.1: <product name>:fatal:libsunmath.so.1: can't open file: errno=2
ld.so.1: <product name>:fatal:libsunmath.so.1: can't open file: errno=2
ERROR: ORA-12547: TNS:lost contact
make -f sqlplus.mk sqlplus 해도 에러 없이 생성된 sqlplus 가
위와 같은 에러를 보내면서 접속되지 않습니다.
해결 방안)
이 문제는 Solaris 의 Oracle 7.3.3 에서 발생합니다. listener 를 통해
접속한 process 는 LD_LIBRARY_PATH 가 설정되어 있지 않습니다.
따라서, listener.ora 를 다음과 같이 setting 합니다.
(SID_DESC=(SID_NAME=FNDFS)
(ORACLE_HOME=/appltop/fnd/6.1.1)
(PROGRAM=FNDFS)
(ENVS='LD_LIBRARY_PATH=/usr/dt/lib:/usr/openwin/lib:$
ORACLE_HOME/lib'))
listener 를 거치지 않는 사용자들은 다음과 같이 작업하십시오
즉, libsunmath.so.1 은 7.3.3 부터 $ORACLE_HOME/lib 에 포함되어 있는
library 입니다. 따라서, LD_LIBRARY_PATH 에 $ORACLE_HOME/lib 가 포함되어
있는지 확인하고, 만약 포함되어 있다면, 이 화일을 /usr/bin 으로 copy 하고
chmod 755, chown/chgrp를 bin 하면 됩니다.
"$ORACLE_HOME/lib" 에 있는 "libsunmath.so.1" 을 copy 하고 permission 을
변경하는 절차는 다음과 같습니다.
1. % cd /u01/app/oracle/product/7.3.3/lib/
2. % cp libsunmath.so.1 /usr/lib
3. % cd /usr/lib
4. % chown bin libsunmath.so.1
5. % chgrp bin libsunmath.so.1
원인)
oracle 을 설치한 후나 oracle product 에 변경이 일어난 후에 root.sh 를
수행하여 화일들의 owner, group 등을 변경하는 작업을 합니다.
이 작업 도중, library 에 setting 해두었던 link 가 끊어졌을 때에
위와 같은 에러가 발생합니다.Brian Tkatch wrote:
SQL*Plus inside the VM can connect to XE, but not to either remote server. It just hangs for a while and finally returns: ORA-12545: Connect failed because target host or object does not exist
Sounds like hostname resolution failed.
A hostname needs to be resolved into an IP address. So if you are using a hostname in the TNS connection string, you need to make sure that it can be resolved into an IP. Using the ping <hostname> command is an easy way to determine if the hostname is resolved.
Some listeners (such as remote and RAC listeners), accepts a client connection, and in response redirect the client to a different hostname (and even port). For example, a remote listener can service 10 instances (each with a different service name). The client connects, requesting servcice5. The listener redirects the client to hostname ora-server5 on port 1521. The client now attempts to connect to ora-server5, by resolving that hostname into an IP and then initiating the connect call.
So the listener can redirect the client to a new hostname - and the client needs to be able to resolve that hostname. The error you get therefore does not always relate to the initial listener connection. It can also result when the client driver follows the listener's redirect and attempt a new connection to a new host. -
Starting SQL PLUS in Oracle 9i
Hi All,
I have Oracle 9i installed.
I can login to SQL PLUS by User name : scott Password : tiger
It shows me the prompt SQL>
What is Host String? And what value or characters is supposed to be entered there.
Nisarg SutariaGlobal database name is : matrix.neo
so SID : matrix
now if I give Host String : [email protected] (It does not work)
if I give Host String : matrix.neo (It does not work)
If I give Host String : matrix (IT WORKS)
It shows SQL> prompt.
Let me know if I am correct.
Nisarg -
Is it possible to run SQL*Plus with Putty?
Hello everybody,
I've just installed Oracle 11g on Windows Vista. When I click on SQL*Plus it opens the program in the default windows command line. I don't really like the look and feel of cmd. I would like to know whether it is possible to run SQL*Plus in a more advanced/user friendly environment such as Putty terminal client.
Thanks in advance,
DariyooshKamran Agayev A. wrote:
user8747515 wrote:
Windows Command Line is ace! Arrow Up & Down to retrieve commnads... you don't get that (not without a rubbishy workaround) in UNIX!You can solve this issue using rlwrap package. See my vide tutorial
http://kamranagayev.wordpress.com/2009/07/04/using-rlwrap-to-get-command-lines-history-in-sqlplus-video-tutorial/
Dear Kamran,
Thank a lot for this nice presentation, I had also this problem (no command history) under linux. This package is really interesting.
Kind Regards,
Dariyoosh -
Why does SQL*Plus split query result?
My result is:
ENAME DEPTNO SAL RUNNING_TOTAL DEPARTMENT_TOTAL SEQ
CLARK 10 2450 2450 2450 1
KING 10 5000 7450 7450 2
MILLER 10 1300 8750 8750 3
ADAMS 20 1100 9850 1100 1
FORD 20 3000 12850 4100 2
JONES 20 2975 15825 7075 3
SCOTT 20 3000 18825 10075 4
SMITH 20 800 19625 10875 5
ALLEN 30 1600 21225 1600 1
BLAKE 30 2850 24075 4450 2
JAMES 30 950 25025 5400 3
ENAME DEPTNO SAL RUNNING_TOTAL DEPARTMENT_TOTAL SEQ
MARTIN 30 1250 26275 6650 4
TURNER 30 1500 27775 8150 5
WARD 30 1250 29025 9400 6
14 rows selected.
It is very annoying and I wonder if there is a way to tell SQL*Plus not to split this result into 2 sub-results.user8931607 wrote:
It is very annoying and I wonder if there is a way to tell SQL*Plus not to split this result into 2 sub-results.Well, then you should RTFM. Discover SQL*Plus PAGESIZE property:
SQL> select ename from emp
2 /
ENAME
SMITH
ALLEN
WARD
JONES
MARTIN
BLAKE
CLARK
SCOTT
KING
TURNER
ADAMS
ENAME
JAMES
FORD
MILLER
14 rows selected.
SQL> set pagesize 100
SQL> select ename from emp
2 /
ENAME
SMITH
ALLEN
WARD
JONES
MARTIN
BLAKE
CLARK
SCOTT
KING
TURNER
ADAMS
JAMES
FORD
MILLER
14 rows selected.
SQL> SY. -
Cant Start Sql*Plus Session
I just installed Oracle 8.1.6 on Rehhat 6.2 Linux but when I try to start sqlplus after entering username and password, I get the error: ORACLE initialization or shutdown in progress
nullIf you got the SVRMGR> prompt with no errors when you started it you should then enter
connect internal
if it asks for a password try oracle
SHUTDOWN NORMAL
SHUTDOWN IMMEDIATE
will shut down the currently running Database.
and
STARTUP
should get it going. But be sure you have done what you need to set three important system variables.
ORACLE_HOME
ORACLE_SID and
PATH
With out these you won't be able to start sqlplus and svrmgr won't operate. You will see errors in both like
If the SID is wrong you will get that the Service name is incorrectly specified.
If PATH and HOME are incorrect You will get a message that it can't find a message file.
null -
I have installed the oracle Xe in my computer, but when I open the sql shell and begin to input some commands, the shell says to me that I have to connect...
My question is, Where do I have to connect?, besides I want to connect locally..
Thanks..for example ;
SQL> conn sys/<your_passwd> as sysdba
or
SQL> conn hr/<your_passwd>
also documentation may help -> http://download-uk.oracle.com/docs/cd/B25329_01/doc/admin.102/b25107/connecting.htm#sthref73 -
How to Access SQL*Plus with DBA account
Hi All,
I want to know how can I access and query database through DBA account
when I enter sys in Login filed and password in password filed it give me error
ORA- 28009:Connection as sys should be as sysdba or sysoper
when I enter sysdba in Login filed and password in password filed it give me error
ORA- 01017:Invalid username/password; Login denied
Please help me in thisOR
-- SYSTEM is a DBA account
sqlplus SYSTEM/password
--SUPER DBA with OSPER and SYSDBA role
You need the ORA_DBA group membership for using /
sqlplus / as sysdba
or
sqlplus "/ as sysdba"
or
sqlplus "sys as sysdba"
then enter password. HTH
SS -
Learning PL/SQL with SQL plus
I'm looking to teach myself PL/SQL with SQL Plus, it's a works pc so I can not use any other software than SQL plus.
When starting SQL plus I'm asked for a username, password and host string.
I'm taking it the host string is the db I want to connect to and obviously supply the username and password for level of access?
Also what I ideally need is a sample db on my local machine to connect to with SQL plus to learn that way.
Can anyone point me in the right direction please. Any help is greatly appreciated.Use the net8 configuration assistant preferably as it'll get the syntax correct.
Otherwise you copy the sample one up one folder and edit that.
Connection information (SID, Server/IP, port number) you'll have to get off your DBA.
The name at the start of a tnsnames entry is the name that you want to reference the database as, so you can call it FRED if you like.
e.g.
FRED =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS =
(PROTOCOL = TCP)
(HOST = <server name or ip address>)
(PORT = <port>) -- usually 1521 but can differ if more than one instance on the server
(CONNECT_DATA =
(SID = <database SID>) -- the name of the database on the server.
)Once that's set up you can then log onto the database in the following way:
sqlplus <user>/<password>@fred
What happens is that the TNS Listener service (that should be running on your PC) will look up "fred" in the tnsnames.ora file and then use the information from that to make the connection to the server on the correct port and connect you to the actual database on there.
After that.... it's up to you.
:) -
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?
Maybe you are looking for
-
When trying to EMBED a pdf into Office 2010 (Powerpoint, excel, word, etc), i get an error that Acrobat.exe cannot be found. We have Adobe Reader X and Adobe Writer X installed. When I open Adobe Reader X and try to EMBED the pdf, it works fine, but
-
I am trying to activate an original iPhone. I keep running into issues (partially because the rest of the world is activating 4Gs phones). I would appreciate any help that is available. I am working on a MacBook running OSX 10.5.8. My iTunes has
-
How do I make "open link in new tab" go back to the second line after "open"?
I've newly upgraded to FF4.0 but I'm so used to opening new tabs by right-clicking a link and choosing "open link in new tab" instinctively by moving down a notch and clicking it as the second selection. FF4.0 new has it as the first option. Is there
-
Dreamweaver/Contribute/CSS issues
Anyone run into issues when creating a site with Dreamweaver and an external CSS and having information edited in Contribute add in-line styles? It is a pain in the rear to continually go back and edit out the in-line styles when the purpose of using
-
FW 3.0 Photo app not functioning properly
Has anyone elso noted that the 3.0 Photo app is broken? The orientation can no longer be changed. So now landscape photos viewed while holding the iPod in the landscape orientation are displayed on their side. There does not seem anyway to flip the p