"sqlplus / as sysdba" and "sqlplus /nolog;conn / as sysdba"

Hi,
What is the difference between "sqlplus / as sysdba"
and
"sqlplus /nolog;conn / as sysdba"?
when "sqlplus / as sysdba", it could not "alter user system identified by password;
when "sqlplus /nolog;conn / as sysdba", it could "alter user system identified by password"
why??
Thanks.

What is the difference between "sqlplus / as sysdba"
and
"sqlplus /nolog;conn / as sysdba"?
No difference.
when "sqlplus / as sysdba", it could not "alter user system identified by password;
when "sqlplus /nolog;conn / as sysdba", it could "alter user system identified by password"
why??
Don't know what you mean :
$ sqlplus /nolog
SQL*Plus: Release 11.2.0.3.0 Production on Wed Sep 25 15:31:58 2013
Copyright (c) 1982, 2011, Oracle.  All rights reserved.
SQL> conn / as sysdba
Connected.
SQL> alter user system identified by manager;
User altered.
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.3.0 Production on Wed Sep 25 15:32:20 2013
Copyright (c) 1982, 2011, Oracle.  All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> alter user system identified by manager;
User altered.
SQL>

Similar Messages

  • Error:ora-01031 Insuffiecient Privileges when using "conn / as sysdba"?

    HI all,
    I used oracle to login and used dbca to create a database.
    export ORACLE_SID=db9i
    sqlplus /nolog
    conn / as sysdba
    Error:ora-01031 Insuffiecient Privileges
    Notes: I can use "conn sys/pwd as sysdba" to connect instance.

    Verify your oracle installation as of document available at this URL : http://www.oracle.com/technology/pub/articles/smiley_10gdb_install.html

  • Diffrence between "/ as sysdba" and "sys/pswrd as sysdba"

    hi..
    can anyone plss tell me the difference between...
    sqlplus "/ as sysdba" and "sys/<password>@<SID> as sysdba"
    thanks...

    user12780416 wrote:
    thanks a lot for your answers...
    but what does OS authorization and database authorization means???
    as for example...i dont think we can bounce a database using sys/password@sid.
    for that we have to use / as sysdba...
    (if am not wrong)
    thanks...when you installed Oracle in UNIX for example, you login as Oracle/passwdnix and then did the installation. so Oracle user is the owner of the oracle.
    so when you launched sqlplus / as sysdba, oracle will check whether you logged in to the O/S using Oracle/passwdnix or not.
    if you connect using sqlplus sys/pwdorcl@sid, oracle will authenticate your connection using database user that you created when you create the database after installing oracle. (remember in the OUI, they asked you to put password for SYS, SYSTEM, SYSMAN).
    and @sid need listener to be up, can be done either in the server or client side based on the entry in your tnsnames.ora.
    sqlplus / as sysdba does not require listener to be up but has to be done in the server side.
    Edited by: HGDBA on Mar 21, 2011 10:07 AM

  • Create a new DB and conn / as sysdba ORA-01031

    Im try to create a new DB and:
    ex[oracle@srv-orcl 9.2.0]$ export ORACLE_SID=testerms
    [oracle@srv-orcl 9.2.0]$ sqlplus /nolog
    SQL*Plus: Release 9.2.0.4.0 - Production on Tue Feb 26 15:33:49 2008
    Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
    SQL> conn / as sysdba
    ERROR:
    ORA-01031: insufficient privileges
    SQL>
    Someone can help me?
    Tks,
    Elber

    [oracle@srv-orcl admin]$ ls -l $ORACLE_HOME
    total 176
    drwxr-xr-x 10 oracle oinstall 4096 Nov 27 21:32 Apache
    drwxr-xr-x 5 oracle oinstall 4096 Nov 27 21:32 assistants
    drwxr-xr-x 5 oracle oinstall 4096 Nov 27 21:32 BC4J
    drwxr-xr-x 2 oracle oinstall 4096 Feb 25 13:17 bin
    drwxr-xr-x 10 oracle oinstall 4096 Nov 27 21:33 ctx
    drwxr-xr-x 2 oracle oinstall 4096 Feb 26 15:50 dbs
    drwxr-xr-x 3 oracle oinstall 4096 Nov 27 21:30 demo
    drwxr-xr-x 10 oracle oinstall 4096 Nov 27 21:32 ds
    drwxr-xr-x 3 oracle oinstall 4096 Nov 27 21:37 install
    drwxr-xr-x 8 oracle oinstall 4096 Nov 27 21:38 inventory
    drwxr-xr-x 8 oracle oinstall 4096 Nov 27 21:34 javavm
    drwxr-xr-x 5 oracle oinstall 4096 Nov 27 21:27 jdbc
    drwxr-xr-x 9 oracle oinstall 4096 Nov 27 21:30 jdk
    drwxr-xr-x 2 oracle oinstall 4096 Nov 27 21:34 jlib
    lrwxrwxrwx 1 oracle oinstall 25 Nov 27 21:29 JRE -> /u01/app/oracle/jre/1.4.2
    drwxr-xr-x 6 oracle oinstall 4096 Nov 27 21:31 jsp
    drwxr-xr-x 16 oracle oinstall 4096 Nov 27 21:34 ldap
    drwxr-xr-x 3 oracle oinstall 4096 Feb 25 13:17 lib
    drwxr-xr-x 3 oracle oinstall 4096 Feb 25 13:26 lib32
    drwxr-xr-x 4 oracle oinstall 4096 Nov 27 21:35 md
    drwxrwxrwx 14 oracle oinstall 4096 Nov 27 21:37 network
    drwxr-xr-x 3 oracle oinstall 4096 Nov 27 21:31 oci
    drwxr-xr-x 3 oracle oinstall 4096 Nov 27 21:29 ocommon
    drwxr-xr-x 5 oracle oinstall 4096 Nov 27 21:29 ocs4j
    drwxr-xr-x 3 oracle oinstall 4096 Nov 27 21:27 oracm
    drwxr-xr-x 4 oracle oinstall 4096 Nov 27 21:27 oracore
    drwxr-xr-x 13 oracle oinstall 4096 Nov 27 21:32 ord
    drwxr-xr-x 8 oracle oinstall 4096 Nov 27 21:35 otrace
    drwxr-xr-x 4 oracle oinstall 4096 Nov 27 21:32 owm
    drwxr-xr-x 3 oracle oinstall 4096 Nov 27 21:28 pfs
    drwxr-xr-x 9 oracle oinstall 4096 Nov 27 21:35 plsql
    drwxr-xr-x 9 oracle oinstall 4096 Nov 27 21:30 precomp
    drwxr-xr-x 15 oracle oinstall 4096 Nov 27 21:35 rdbms
    drwxr-xr-x 3 oracle oinstall 4096 Nov 27 21:28 relnotes
    -rwxr-xr-x 1 oracle oinstall 5873 Nov 27 21:37 root.sh
    -rw-r--r-- 1 oracle oinstall 0 Feb 26 2004 root.sh.old
    drwxr-xr-x 3 oracle oinstall 4096 Nov 27 21:30 slax
    drwxr-xr-x 7 oracle oinstall 4096 Nov 27 21:33 soap
    drwxr-xr-x 5 oracle oinstall 4096 Nov 27 21:31 sqlj
    drwxr-xr-x 9 oracle oinstall 4096 Nov 27 21:35 sqlplus
    drwxr-xr-x 4 oracle oinstall 4096 Nov 27 21:27 srvm
    drwxr-xr-x 8 oracle oinstall 4096 Nov 27 21:33 syndication
    drwxr-xr-x 10 oracle oinstall 4096 Nov 27 21:35 ultrasearch
    drwxr-xr-x 3 oracle oinstall 4096 Nov 27 21:32 wwg
    drwxr-xr-x 8 oracle oinstall 4096 Nov 27 21:31 xdk
    [oracle@srv-orcl admin]$
    ############################################################

  • Sqlplus doesn't work using /nolog

    I need startup oracle but when I write sqlplus /nolog in the command line instead of have a message telling that I'm connect to an instance idle I just got a help message telling me how to use the sqlplus command. This is pretty wierd,
    I get the same message even if I try using a command like 'sqlplus /as sysdba'. What's wrong with sqlplus ?. thanks in advance.
    Edited by: Guido-Granobles on 02-jul-2010 15:29

    I write:
    csi2.com:oracle:/home/oracle $ sqlplus /nolog
    and I get:
    SQL*Plus: Release 10.2.0.1.0 - Production
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    Usage 1: sqlplus -H | -V
    -H Displays the SQL*Plus version and the
    usage help.
    -V Displays the SQL*Plus version.
    Usage 2: sqlplus [ [<option>] [<logon>] [<start>] ]
    <option> is: [-C <version>] [-L] [-M "<options>"] [-R <level>] [-S]
    -C <version> Sets the compatibility of affected commands to the
    version specified by <version>. The version has
    the form "x.y[.z]". For example, -C 10.2.0
    -L Attempts to log on just once, instead of
    reprompting on error.
    -M "<options>" Sets automatic HTML markup of output. The options
    have the form:
    HTML ON [HEAD text] [BODY text] [TABLE text]
    [ENTMAP {ON|OFF}] [SPOOL {ON|OFF}] [PRE[FORMAT] ON]
    -R <level> Sets restricted mode to disable SQL*Plus commands
    that interact with the file system. The level can
    be 1, 2 or 3. The most restrictive is -R 3 which
    disables all user commands interacting with the
    file system.
    -S Sets silent mode which suppresses the display of
    the SQL*Plus banner, prompts, and echoing of
    commands.
    <logon> is: (<username>[<password>][@<connect_identifier>] | /)
    [AS SYSDBA | AS SYSOPER] | /NOLOG
    Specifies the database account username, password and connect
    identifier for the database connection. Without a connect
    identifier, SQL*Plus connects to the default database.
    The AS SYSDBA and AS SYSOPER options are database administration
    privileges.
    The /NOLOG option starts SQL*Plus without connecting to a
    database.
    <start> is: @<URL>|<filename>[.<ext>] [<parameter> ...]
    Runs the specified SQL*Plus script from a web server (URL) or the
    local file system (filename.ext) with specified parameters that
    will be assigned to substitution variables in the script.
    When SQL*Plus starts, and after CONNECT commands, the site profile
    (e.g. $ORACLE_HOME/sqlplus/admin/glogin.sql) and the user profile
    (e.g. login.sql in the working directory) are run. The files may
    contain SQL*Plus commands.
    Refer to the SQL*Plus User's Guide and Reference for more information.
    csi2.com:oracle:/home/oracle $

  • Strange problem with SQLPLUS when client and server on the same box

    Hi,
    I have the problem with SQLPLUS when clinet and server on the same machine.
    With client and server on the same machine i am running the command
    sqlplus -l username/password@connect_identifier as SYSDBA.
    With this command, even if you pass in wrong username or wrong password or both as wrong you can able to connect to database and execute queries.
    Once Connect_identifier is correct and trying to log in as SYSDBA ,sqlplus will log in to DB with any username and password.
    How to get rid of this behaviour. Is there any way to do this.
    I am running this command by creating a process in C#
    Edited by: user11000236 on Jun 16, 2009 10:31 AM

    user11000236 wrote:
    Thanks for the info.
    How does Oracle/SQLPLUS allows any username or password to log in to DB with SYSDBA Privillages? What is the concept behind this.?
    This is explainted in the above mentioned link:
    Operating system authentication takes precedence over password file authentication. If you meet the requirements for operating system authentication, then even if you use a password file, you will be authenticated by operating system authentication.

  • Oracle Client and SqlPlus on Mac Os X Leopard Configuration Script

    Hello,
    I have just written 2 bash scripts for the installation and configuration of SqlPlus and the Oracle Client v10.2.
    The first script MacSqlPlus.sh install the client set the environment variables, the second TNSconnectMac.sh help to configure the tnsnames.ora. They can be found here
    http://www.danilovizzarro.it/script/MacSqlPlus.sh
    http://www.danilovizzarro.it/script/TNSconnectMac.sh
    In order to have them working it's required to download the oracle client basic lite and SqlPlus in the /var/root directory.
    A step-by-step tutorial can be found here http://www.danilovizzarro.it/?p=10
    Soon I will try to upload a demonstration video.
    Your comments are always appreciated.
    BR
    DV

    Doug,
    It is possible that there could be data corruption, because this is not a tested, thus not supported, setup. I hope that helps!

  • How to using sqlplus to connect and run command ?

    Hello,i have a small problem please help me
    I want to use sqlplus to connect and run command
    for example : sqlplus test/test@DB select sysdate from dual ;
    and then it will show data (sysdate) to screen
    what should i do ?
    Thanks

    kenshin19xx wrote:
    Hello,i have a small problem please help me
    I want to use sqlplus to connect and run command
    for example : sqlplus test/test@DB select sysdate from dual ;
    and then it will show data (sysdate) to screen
    what should i do ?
    Thanks
    bcm@bcm-laptop:~$ echo "select sysdate from dual ;" > now.sql
    bcm@bcm-laptop:~$ sqlplus user1/user1 @now
    SQL*Plus: Release 11.2.0.1.0 Production on Wed Dec 14 20:41:33 2011
    Copyright (c) 1982, 2009, Oracle.  All rights reserved.
    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    SYSDATE
    2011-12-14 20:41:33

  • Unable to connect to 10g database using Devloper 6i and SQLPLUS 8

    Dear all Developers,
    I have installed 10g with patch 10.2.0.3 and developer 6i, i am not able to access the database with Forms Devloper 6i, Report Devloper 6i and SQLPLUS 8 (installed by default with DS) when i try to initiate connection the sessions crashes. (DB character set AL32UTF8)
    Please note we already have ORACLE RAC 10g version 10.2.0.3 (DB character set AR8MSWIN1256) developer can connect to this db with no errors
    Please suggest how i can solve this problem
    Thanks
    Zeeshan Sheikh

    First of all you need to be on Patch set 18 of Oracle Forms 6i -- but I think you will still have problems with the character set you are using... but you'll need to search out details.

  • Lsnrctl and sqlplus hang status

    Hi,
    DB:10.2
    OS:aix
    The lsnrctl and sqlplus hang status while logging.
    I tried to use sqlplus -prelim.but no use.Sufficient space in server ,tmp also.
    Swap also 100% free,cpu also idle and sufficient physical memory available.
    Only think is some of the hard disks usage is 100%.Tnsping not working.
    Any suggestions?
    Thanks and Regards,
    VN

    Hi,
    Thanks for your reply.
    Thu May 10 12:01:51 2012
    Thread 1 advanced to log sequence 1216 (LGWR switch)
    Current log# 4 seq# 1216 mem# 0: /db/rd01/CM6/redo0401.rdo
    Current log# 4 seq# 1216 mem# 1: /db/rd02/CM6/redo0402.rdo
    Fri May 11 06:00:13 2012
    Thread 1 advanced to log sequence 1217 (LGWR switch)
    Current log# 3 seq# 1217 mem# 0: /db/rd01/CM6/redo0301.rdo
    Current log# 3 seq# 1217 mem# 1: /db/rd02/CM6/redo0302.rdo
    Fri May 11 12:00:58 2012
    Process startup failed, error stack:
    Fri May 11 12:00:58 2012
    Errors in file /u01/app/oracle/product/CM6/bdump/CM6_psp0_790622.trc:
    ORA-27300: OS system dependent operation:fork failed with status: 2
    ORA-27301: OS failure message: No such file or directory
    ORA-27302: failure occurred at: skgpspawn5
    ORA-27303: additional information: skgpspawn5
    Fri May 11 12:00:59 2012
    Process m001 died, see its trace file
    Fri May 11 12:00:59 2012
    ksvcreate: Process(m001) creation failed
    oracle@cmm-ax01:/u01/app/oracle/product/CM6/bdump: date
    Fri May 11 12:47:44 CUT 2012
    oracle@cmm-ax01:/u01/app/oracle/product/CM6/bdump: cat /u01/app/oracle/product/CM6/bdump/CM6_psp0_790622.trc
    -bash: fork: Resource temporarily unavailable
    oracle@cmm-ax01:/u01/app/oracle/product/CM6/bdump:
    oracle@cmmm-ax01:/u01/app/oracle/product/CM6/bdump: cat /u01/app/oracle/product/CM6/bdump/CM6_psp0_790622.trc
    /u01/app/oracle/product/CM6/bdump/CM6_psp0_790622.trc
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    ORACLE_HOME = /u01/app/oracle/product
    System name: AIX
    Node name: cmmm-ax01
    Release: 3
    Version: 5
    Machine: 00C108CA4C00
    Instance name: CM6
    Redo thread mounted by this instance: 1
    Oracle process number: 3
    Unix process pid: 790622, image: oracle@cmmm-ax01 (PSP0)
    *** SERVICE NAME:(SYS$BACKGROUND) 2011-11-09 15:21:39.787
    *** 2011-11-10 09:17:28.226
    *** SESSION ID:(48.1) 2011-11-09 15:21:39.787
    *** 2011-11-09 15:21:39.787
    Dump diagnostics for process J002 pid 1196104 which did not start after 120 seconds:
    (spawn_time:xDEBE0F3E6 now:xDEBE2CB47 diff:x1D761)
    *** 2011-11-10 09:17:28.226
    Dumping diagnostic information for J002:
    OS pid = 1196104
    loadavg : 0.49 0.57 0.59
    swap info: free_mem = 3577.59M rsv = 18.00M
    alloc = 17.02M avail = 4608.00M swap_free = 4590.98M
    F S UID PID PPID C PRI NI ADDR SZ WCHAN STIME TTY TIME CMD
    240001 A oracle 1196104 1 3 61 20 3721510 92484 15:19:39 - 0:00 [oracle]
    ERROR: process 1196104 is not alive
    *** 2011-11-10 09:17:29.714
    *** 2011-11-21 15:21:39.966
    Dump diagnostics for process J001 pid 880892 which did not start after 120 seconds:
    (spawn_time:xE29AD3786 now:xE29AF0FEA diff:x1D864)
    *** 2011-11-21 15:21:39.966
    Dumping diagnostic information for J001:
    OS pid = 880892
    loadavg : 1.73 1.64 1.62
    swap info: free_mem = 2796.55M rsv = 18.00M
    alloc = 16.93M avail = 4608.00M swap_free = 4591.07M
    skgpgpstack: read() for cmd /bin/ps -elf | /bin/egrep 'PID | 880892' | /bin/grep -v grep timed out after 60 seconds
    open: The file access permissions do not allow the specified action.
    skgpgpstack: read() for cmd /bin/sh -c '/usr/bin/procstack 880892 2>&1' timed out after 60 seconds
    *** 2011-11-21 15:24:40.018
    Killing process (ospid 880892): did not start after 120 seconds
    ... and the process is still alive after kill!
    Killed process 880892 is still alive after 183 seconds!
    *** 2011-11-21 15:25:43.019
    Killed process 880892 is still alive after 243 seconds!
    *** 2011-11-21 15:26:43.020
    Killed process 880892 is still alive after 303 seconds!
    *** 2011-11-21 15:27:43.022
    Killed process 880892 is still alive after 363 seconds!
    *** 2011-11-21 15:28:43.023
    Killed process 880892 is still alive after 423 seconds!
    *** 2011-11-21 15:29:43.024
    Killed process 880892 is still alive after 483 seconds!
    *** 2011-11-21 15:30:43.025
    Killed process 880892 is still alive after 543 seconds!
    *** 2011-11-21 15:31:43.026
    Killed process 880892 is still alive after 603 seconds!
    *** 2011-11-21 15:32:43.027
    Killed process 880892 is still alive after 663 seconds!
    *** 2011-11-21 15:33:43.028
    Killed process 880892 is still alive after 723 seconds!
    *** 2011-11-21 15:34:43.029
    Killed process 880892 is still alive after 783 seconds!
    *** 2011-11-21 15:35:43.031
    Killed process 880892 is still alive after 843 seconds!
    *** 2011-11-21 15:36:43.032
    Killed process 880892 is still alive after 903 seconds!
    *** 2011-11-21 15:37:43.033
    Killed process 880892 is still alive after 963 seconds!
    *** 2011-11-21 15:38:43.034
    Killed process 880892 is still alive after 1023 seconds!
    *** 2011-11-21 15:39:43.035
    Killed process 880892 is still alive after 1083 seconds!
    *** 2011-11-21 15:40:43.037
    Killed process 880892 is still alive after 1143 seconds!
    *** 2011-11-21 15:41:43.038
    Killed process 880892 is still alive after 1203 seconds!
    *** 2011-11-21 15:42:43.039
    Killed process 880892 is still alive after 1263 seconds!
    *** 2011-11-21 15:43:46.035
    Killed process 880892 is still alive after 1326 seconds!
    *** 2011-11-21 15:44:46.036
    Killed process 880892 is still alive after 1386 seconds!
    *** 2011-11-21 15:44:46.036
    Dump diagnostics for process J001 pid 1114146 which did not start after 120 seconds:
    (spawn_time:xE29C25B79 now:xE29C43640 diff:x1DAC7)
    *** 2011-11-21 15:44:46.036
    Dumping diagnostic information for J001:
    OS pid = 1114146
    loadavg : 1.90 1.88 1.74
    swap info: free_mem = 2773.38M rsv = 18.00M
    alloc = 17.42M avail = 4608.00M swap_free = 4590.58M
    skgpgpstack: read() for cmd /bin/ps -elf | /bin/egrep 'PID | 1114146' | /bin/grep -v grep timed out after 60 seconds
    open: The file access permissions do not allow the specified action.
    skgpgpstack: read() for cmd /bin/sh -c '/usr/bin/procstack 1114146 2>&1' timed out after 60 seconds
    *** 2011-11-21 15:47:46.091
    Killing process (ospid 1114146): did not start after 120 seconds
    ... and the process is still alive after kill!
    Killed process 880892 is still alive after 1569 seconds!
    Killed process 1114146 is still alive after 183 seconds!
    *** 2011-11-21 15:48:49.092
    Killed process 880892 is still alive after 1629 seconds!
    Killed process 1114146 is still alive after 243 seconds!
    *** 2011-11-21 15:49:49.093
    Killed process 880892 is still alive after 1689 seconds!
    Killed process 1114146 is still alive after 303 seconds!
    *** 2011-11-21 15:50:49.095
    Killed process 880892 is still alive after 1749 seconds!
    Killed process 1114146 is still alive after 363 seconds!
    *** 2011-11-21 15:51:49.096
    Killed process 880892 is still alive after 1809 seconds!
    Killed process 1114146 is still alive after 423 seconds!
    *** 2012-05-11 12:00:58.777
    Process startup failed, error stack:
    ORA-27300: OS system dependent operation:fork failed with status: 2
    ORA-27301: OS failure message: No such file or directory
    ORA-27302: failure occurred at: skgpspawn5
    ORA-27303: additional information: skgpspawn5
    oracle@cmm-ax01:/u01/app/oracle/product/CM6/bdump:
    we didn't changed anything at db level.It is fine till this morning.
    Thanks & Regards,
    VN
    Edited by: user3266490 on May 11, 2012 6:31 PM

  • Q about  SYSDBA and SYSOPER privileges

    Was surprised to see that session_roles for super user sys was empty but of course this user has all the privileges that go into the standart set of roles that are typically created with a new database anyway. But, does anyone know why session_privs dosen't show the privileges SYSDBA or SYSOPER. I am aware that these two privileges cannot be granted to roles since roles are not available before databse startup but don't see why they should not be listed in session_privs for the super user.
    Regds
    Gus

    SYSDBA
    A special database administration role that contains every system privilege with ADMIN OPTION, and SYSOPER system privilege. SYSDBA also permits CREATE DATABASE actions and time-based recovery.
    SYSOPER
    A special database administration role that permits a database administrator to perform STARTUP, SHUTDOWN, ALTER DATABASE OPEN/MOUNT, ALTER DATABASE BACKUP, ARCHIVE LOG, and RECOVER, and includes RESTRICTED SESSION privilege.
    SESSION_PRIVS
    SESSION_PRIVS lists the privileges that are currently available to the user.
    Column Datatype NULL Description
    PRIVILEGE
    VARCHAR2(40)
    NOT NULL
    Name of the privilege
    Oracle hide some information belonged to it. Administrators can not see all to 100%.
    Joel P�rez

  • Sqlplus / and sqlplus /nolog

    Hi,
    What does / means ?
    Is it a special user ? or a shortcut ?
    Thanks

    OPS$ORACLE is an "externally authenticated" user, in your case authenticated by OS. See http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96521/users.htm#17308
    When you connect using sysdba or sysoper, then you are sys or public user, no matter what username/password you provide :
    $ sqlplus / as sysdba
    SQL*Plus: Release 10.1.0.3.0 - Production on Mon Jan 2 18:00:59 2006
    Copyright (c) 1982, 2004, Oracle.  All rights reserved.
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.1.0.3.0 - Production
    With the Partitioning, OLAP and Data Mining options
    SQL> sho user
    USER is "SYS"
    SQL> conn / as sysoper
    Connected.
    SQL> sho user
    USER is "PUBLIC"
    SQL> conn scott/tiger as sysdba
    Connected.
    SQL> sho user
    USER is "SYS"
    SQL> conn test/test as sysoper
    Connected.
    SQL> sho user
    USER is "PUBLIC"
    SQL>                                                

  • DOS command "sqlplus /nolog @file" and "sqlplus  user / password @file

    It's very strange what j've observed:
    J've two files *.sql :
    -- 1:
    file_with_connect.sql which contains 3 lines :
    connect <user>/<password>@tnsname
    select count(*) from <table_name>;
    exit
    -- 2:
    file_without_connect.sql which contains only:
    select count(*) from <table_name>;
    exit
    table <table_name> isn't empty (it contains 1 row)
    -- 1:
    When J execute from DOS (on the client):
    sqlplus /nolog @file_with_connect.sql le result is 0 rows in table <table_name>
    -- 2:
    When J execute from DOS :
    sqlplus <user>/<password>@tnsname @file_without_connect.sql le result is: 1 row in table <table_name>
    I use the same connection, tnsname, table.
    Why the result isn't the same ?
    There is no error in my alertXXXX.log

    Hi Mustafa
    The table <table_name> that j've used exists only in one database.
    It's tnsname is ok on the server, on the client it was defined 2 times ! (but the same) in the file tnsname.ora. J've modify the client tnsname.ora.
    But, j'm not sure it was the reason of our problem: the error isn't regular (sometimes) so j can't verify that it will never appear.
    Any other idea?

  • Query Program ! use this for your query's like SQLPlus , copy-paste and run

    H!
    Like the Subject Title:
    If you have PHP and Oracle then you can use this if you are learning the query's or you don't wanna use SQLPlus.
    BTW this is my first script, but it works fine here.
    //the code
    <?//made by [email protected]
    IF($_SERVER['REQUEST_METHOD'] == 'POST' AND isset($_POST['username']) AND isset($_POST['password'])) {
    //gebruik het juiste dll bestand.
    dl("php_oci8.dll");
    define("USERNAME",$username);
    define("PASSWORD",$password);
    $conn      = OCILogon(USERNAME,PASSWORD);
    $sql      = stripslashes($sql);
    IF($btnRollback){
         ocirollback($conn);
         echo "Rollback done !";
    IF($btnCommit){
    ocicommit($conn);
    echo "Committed !";
    IF($btnVersion){
         echo OCIServerVersion($conn);
    IF($btnSql){
    $stmt      = OCIParse($conn,$sql);
    IF(OCIExecute($stmt) === TRUE){
              $msg = "The Query was oke !";
    if (OCIStatementType($stmt) == "SELECT") {
         $ncols     = OCINumCols($stmt);
         echo "<table width=\"100%\" border=\"1\" cellspacing=\"1\" cellpadding=\"0\" bordercolor=\"#FFFFFF\" bordercolorlight=\"#FFFFFF\" bordercolordark=\"#FFFFFF\">\n";
         echo "<tr>\n";
         for($i=1;$i<=$ncols;$i++){
         $column_name[$i] = OCIColumnName($stmt,$i);     //tabel kopjes
              $column_type[$i] = OCIColumnType($stmt,$i);     //extra info
    $column_size[$i] = OCIColumnSize($stmt,$i);      //extra info
              echo "<td class=\"row\"><b>$column_name[$i]</b></td>\n";
         echo "</tr>\n";
         while(OCIFetch($stmt)){
         echo "<tr>\n";
              for($i=1;$i<=$ncols;$i++){
         $column_value[$i] = OCIResult($stmt,$i);
                   echo "<td class=\"row\">$column_value[$i]</td>\n";               
         echo "</tr>\n";
         //extra info
         echo "<tr>\n";
         for($i=1;$i<=$ncols;$i++){
              echo "<td class=\"row\"><i>$column_type[$i] $column_size[$i]</i></td>\n";
         echo "</tr>\n";
         echo "</table>\n";
         OCIFreeStatement($stmt);
    OCILogoff($conn);
    ?>
    <style type="text/css">
    <!--
    .row { 
         background-color: #EEEEEE;
         border: #000000;
         border-style: solid;
         border-top-width: 1px;
         border-right-width: 1px;
         border-bottom-width: 1px;
         border-left-width: 1px;
         font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 9pt;
    -->
    </style>
    <form method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>" name="submit">
    <hr>
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
    <tr>
    <td width="37%">
    <textarea name="sql" cols="60" rows="10"><?echo $sql;?></textarea>
    </td>
    <td width="63%" valign="top">
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
    <tr>
    <td width="12%">Username:</td>
    <td width="88%">
    <input type="text" name="username" value="<?echo $username;?>">
    </td>
    </tr>
    <tr>
    <td width="12%">Password:</td>
    <td width="88%">
    <input type="password" name="password" value="<?echo $password;?>">
    </td>
    </tr>
    <tr>
    <td width="12%"> </td>
    <td width="88%"> </td>
    </tr>
    <tr>
    <td width="12%">
    <input type="submit" name="btnSql" value="Sql">
    </td>
    <td width="88%">
    <input type="submit" name="btnCommit" value="Commit">
    <input type="submit" name="btnRollback" value="Rollback">
    <input type="submit" name="btnVersion" value="Version">
    </td>
    </tr>
    </table>
    <?echo $msg;?> </td>
    </tr>
    </table>
    <br>
    <font face="Verdana, Arial, Helvetica, sans-serif" size="1">don't use ;</font>
    </form>

    But your script is not outputing the result of the query. So how do we view the returned resultset.

  • 'sqlplus /' v.s. 'sqlplus / as sysdba'

    I have a RAC with two nodes. on one node I can log in as 'sqlplus /'; on the other, it doesn't work. I can only log in as 'sqlplus / as sysdba'. I compared the parameters and they are the same on both nodes. Why is that? Thanks.

    As a minimum you should always include the 4-digit version number and the full O/S name and version, in everyone of your posts, in order to allow people to help you. No one here keeps track of here configuration and will remember what you are running.
    sqlplus / is a legitimate login when you have an externally identified oracle account with the same name as the current O/S user.
    Sybrand Bakker
    Senior Oracle DBA

Maybe you are looking for