Connect as sys user as sysdba using vbscript

Hi I have to connect to the oracle database using sys user as sysdba using a vbscript.
I have the following part in the script:
Const TARGET_CONN = "DRIVER={Microsoft ODBC for Oracle};SERVER=XYZ;UID=sys;PWD=abc;"
Set conn = CreateObject("ADODB.Connection")
conn.Open TARGET_CONN
When i run the script i get the error: connection as SYS should be as SYSDBA or SYSOPER
Does anybody know how to do resolve this?
Thanks in advance.

Hi,
If you were using Oracle's ODBC driver, you'd add "as sysdba" as part of the password, ie:
"DRIVER={oracle in oradb11g_home1};dbq=XYZ;UID=sys;PWD=abc as sysdba;"
However, you're using Microsoft's driver and I wouldnt be surprised if Microsoft's driver doesnt support it. If it does though, I'm not sure what you need to do.
Greg

Similar Messages

  • Connect DB - SYS user with wrong password

    Hi All,
    A strange thing I have noticed with SYS user since Oracle 9i(never worked on earlier versions) is that I can connect to the SYS user as SYSDBA with wrong password as well! Please guide how to prevent this...
    (I have searched for a solution online but was unable to find any :( )
    SQL> CONN SYS/AAA@TEST AS SYSDBA
    Connected.
    SQL> DISC
    Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    SQL> CONN SYS/BBB@TEST AS SYSDBA
    Connected.
    SQL>
    SQL> DISC
    Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production*009*

    There is nothing wrong and nothing should be, IMO, prevented.
    When you log in to the server as an user in the dba group (Unix) or the ora_dba group (Windows), you are a power user and O/S authentication applies to you, and you don't need a password.
    Logging in as owner of the software (oracle) all the time, what many DBAs do, is a bad idea anyway, as you can remove anyufile on O/S level.
    Strategies to prevent this:
    - make sure your account isn't in the groups I mentioned
    or
    - disable O/S authentication by editiing sqlnet.ora
    Both procedures are documented.
    Finally please note anyone who has root access can get around this easily.
    Sybrand Bakker
    Senior Oracle DBA

  • Unable to connect 11g database as a sysdba using toad 10

    Please i need an urgent help.
    First i will let you know about my environment.
    OS : HP-UX 11.3
    Database : 11g R1
    Toad : 10.6
    I have set the password file with more than 1 entries for sysdba. The below message will shows the entries of user entry in password file.
    SQL> select username,sysdba from v$pwfile_users;
    USERNAME SYSDB
    SYS TRUE
    TPAUSER TRUE
    When i try to connect to the database 11g using the user as sysdba i am getting error ora- 01031 : Insufficient privileges.
    Please help me out.
    Thanks in advance

    / as sysdba means, omit username and passowrd and use OS authentication. For OS authentication to work, the account must be a member of the OSDBA group, which is DBA on a Unix server, or ORA_DBA under Windows. Remote SQL*Net logins cannot use OS authentication, but can use the password file.
    The password stored in your password file may not be the same used for the Oracle Admin account. Please see the following link how to setup the password file:
    http://download.oracle.com/docs/cd/B28359_01/server.111/b28310/dba007.htm

  • Cannot connect with "SYS@MYDB AS SYSDBA"

    Hello,
    I logged in as os user oracle and do:
    sqlplus "SYS@MYDB AS SYSDBA"
    After entering the right password I get this error:
    This returns a ORA-01031: insufficient privileges
    MYDB is a local database.
    sqlplus "SYS AS SYSDBA"
    and
    sqlplus "/ AS SYSDBA"
    both work.
    I don't use password files (and I don't want to).
    Doing the first statement on a remote database (Win2K) works also. If the remote database is a Linux
    machine I receive again a ORA-01031.
    Any ideas whats wrong here?
    Kai

    ensure:
    a. The listener is running.Is running.
    b. there is a definition for MYDB in the local tnsnames file.Is done. There is also oracle names running. sqlplus scott/tiger@MYDB works. So no problem here.
    c. There is an entry like: remote_login_passwordfile=EXCLUSIVE or SHARED in your init file.I don't want to use a password file.
    More ideas?
    Kai

  • Unable to connect using connect string in linus using sys user in Linux

    Hi,
    I am facing problem in using connect string while connecting as sys user in Linux OS
    For example:
    When I am connecting as
    sys/sysoracle as sysdba its getting connected.
    But when I am providing the connect string such as sys/sysoracle@TEST as sysdba its showing with error as:
    ORA-12505: TNS :listener does not currently know of SID in connect descriptor
    Any help will be benefitial for me
    Thanks and Regards

    >
    ORA-12505:
    TNS:listener does not currently know of SID given in connect descriptor
    Cause:     The listener received a request to establish a connection to a database or other service. The connect descriptor received by the listener specified a SID for an instance (usually a database instance) that either has not yet dynamically registered with the listener or has not been statically configured for the listener. This may be a temporary condition such as after the listener has started, but before the database instance has registered with the listener.
    Action:     
    - Wait a moment and try to connect a second time.
    - Check which instances are currently known by the listener by executing: lsnrctl services <listener name>
    - Check that the SID parameter in the connect descriptor specifies an instance known by the listener.
    - Check for an event in the listener.log file.>
    So are you sure that TEST is a right connection string that you are using and is rightly configured?
    HTH
    Aman....

  • New user with sysdba privilege gets connected as user sys

    hi ,
    I am using oracle 10g R2 . I have a user named test . I have provided sysdba privilege to this user . Now , when I login to this user as conn tkcsowner/password
    it gets connected , I created a table in that , the table data is fine . But, when I login as conn tkcsowner/password as sysdba , it connects , if I execute show user it shows "user is sys" , and the table is not here .
    My question is ............
    1. if I login to tkcsowner as sysdba , where do I login actually , to sys account or to tkcsowner ?
    2. I want to execute some stored procedures through tkcsowner , which requires sysdba privilege . But , how can I can execute those from tkcsowner , but not from sys ?
    Any additional info on this would be appreciated . thank you.

    My question is ............
    1. if I login to tkcsowner as sysdba , where do I login actually , to sys account or to tkcsowner ?Yes, teh correct behavior. If you would use the o/s authentication, you would be connected as Sys user since Oralce would bypass the supplied username and password of yours over the prompt.
    2. I want to execute some stored procedures through tkcsowner , which requires sysdba privilege . But , how can I can execute those from tkcsowner , but not from sys ?When you are going to connect with Sysdba role, you would be connected as Sys user. I am not sure what you exactly mean by saying that the procedure requires the Sysdba privilege? Procedure doesn't need any Sysdba privilege( there isn't such thing since its a role not a privilege) but the provilege of Execute on that procedure . So you do want to check it out what you are actually looking for and why?
    HTH
    Aman....

  • Reg: Error while connecting to a remote database as SYS user.

    Hello all,
    When i try to connect to a database as SYS user i'm getting the error as
    ora-01017 invalid username/password logon denied
    But it is logging from the local system where the oracle is installed.
    I created the password file and checked the contents in v$pwfile_users.
    The result is " no rows selected".
    so when i try to grant sysdba to sys user
    grant sysdba to sys;
    i'm getting error as,
    ORA-01994: GRANT failed: password file missing or disabled
    Please help me in resolving this.
    Regards,
    Konda

    I created the passwordfile using the command below,
    orapwd.exe file=E:\app\Administrator\product\11.2.0\dbhome_1\database\PWDfile.ora force=y entries=30 password=<sys_password>
    is this okay...??

  • Getting ORA-01031: Insufficient privileges when connecting as sys as sysdba

    Hi There,
    I am running Linux AS version 4, oracle 102.0.1, and logginging as oracle user which belongs to dba group. I got error "ORA-01031: Insufficient privileges" when trying to connect as sys user to bring up database. I wondered what is causing the error. Here is an example
    oracle-dev>sqlplus /nolog
    SQL>conn as sys/oracle@dev as sysdba
    ERROR:
    ORA-01031: Insufficient privileges
    Any suggestions would be greatly appreciated. Thanks again.
    Rich,

    Did you create a password file ?
    http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b15658/admin_ora.htm#sthref142
    Message was edited by:
    Paul M.
    BTW, the syntax is
    SQL>conn sys/oracle@dev as sysdba

  • CONNECT INTERNAL 시 SYS에 PASSWORD 걸기(SYSDBA, SYSOPER)

    제품 : ORACLE SERVER
    작성날짜 : 1997-03-31
    SYS user 에 passwd 거는 방법
    ===========================
    이를 걸게 되면 connect internal 접속 시 passwd를 물어보게 되며 DBA group이
    아닌 다른 user에서도 sys user와 똑같이 작업할 수 있다.
    1) initSID.ora 화일에
    REMOTE_OS_AUTHENT = TRUE
    REMOTE_LOGIN_PASSWORDFILE=EXCLUSIVE
    2) ?/dbs 에서
    orapwd file=orapwSID password=my_password entries=10
    (이 때의 SID는 실제의 ORACLE_SID 를 적어주어야 함.)
    3) connect internal 후
    grant sysdba to scott
    grant sysoper to scott 를 부여한다.
    이를 부여하면 sys의 passwd를 알지 못해도
    SVRMGR> connect internal;
    SVRMGR> passwd ? :
    만약 passwd 를 모르면
    SVRMGR> connect scott/tiger as sysoper ;
    SVRMGR> startup 이 가능하다.
    참고) 이의 효과를 위해 /etc/group 화일에 oracle os user가 DBA group 이
    아니어야 하며 일반 user에서도 위의 작업을 똑같이 실행하려면 configSID.ora
    화일을 oracle user 아닌 다른 user에도 실행이 가능할 수 있도록 실행 MODE가
    4755 이어야 한다.

    If you want to connect a new user as SYSDBA or SYSOPER, you must first create a repository. Check some document for creating a repository with seperate tablespace.

  • Sys login as sysdba fails in OEM

    System: Oracle Database 10g 10.1.0.2.0 with Oracle Database 10g Patch 10.1.0.4.0 on a SUN Solaris 9 SPARC machine.
    Background:I've made a whole database backup and been trying to recover it back again. First i've tried that with RMAN but i didn't got all my data back in place.
    Now i'm trying to run the recovery via the Enterprise manager. I create a job for it, my databases shuts down and I get the possibility to "perform recovery"
    Problem:When i'm on the login page to continue with the recovery i have to fill in the Host Credentials and the Database Credentials as sysdba.
    I know for sure that what i fill out in those fields is correct. The problem is that i can't login.
    As Database Credentials do i fill in for username: sys and password: the correct paswd. It says that the Role = SYSDBA.
    the error message: Unable to connect to the database.
    ORA-01017: invalid username/password; logon denied
    Neither can i log in with sys, password as sysdba via the Enterprise Manager when the database is up and running.
    Things i've tried:login with sqlplus works fine
    sqlplus "/ as sysdba"SQL> connect sys/<paswd> as sysdba
    Connected.
    SQL> show user
    USER is "SYS"
    Question:How can I solve the problem so i can log with sys users as sysdba with the Enterprise Manager?

    Hi,
    it's not a stupid question, are you really sure your password is correct? In your sqlplus session OS authentification is used, password is irrelevant (OEM does not use OS authentification). Try 'connect sys/abcxyz as sysdba' , it will work. There's a trick to check, if the password is correct.
    Issue 'connect sys/<passwd>' (omit as sysdba). If you enter a correct password you will see ORA-28009 (SYS can only connect as SYSDBA or SYSOPER) , otherwise you see ORA-01017 .
    In the case of ORA-28009 (password IS correct) there seems to be something wrong with the password file or pfile/spfile:
    - REMOTE_LOGIN_PASSWORDFILE is set to NONE
    - The password file does not exist
    - The password supplied does not match the one in the password file
    - The password file been changed since the instance was started
    The password is located in $ORACLE_HOME/dbs, it can be recreated using orapwd utility, REMOTE_LOGIN_PASSWORDFILE should be set to EXCLUSIVE .
    Regards
    Werner

  • Could not connect to DB remotely through Toad using instantclient

    Hi All,
    Please, i am facing urgent issue while trying to connect to DB remotely through Toad.. Already searched a lot and followed all suggested solutions but without any success..
    "instantclient" already downloaded and configured as below :
    dll files like "oci.dll,... etc" are here : C:\Oracle\instantclient\instantclient_11_2
    Created both tnsnames.ora & listener.ora are here : C:\Oracle\instantclient\network\admin
    And did the below in user/system variables :
    User Variables :
    =========
    TNS_ADMIN with value "C:\Oracle\instantclient\network\admin"
    System Variables :
    ===========
    TNS_ADMIN with value "C:\Oracle\instantclient\network\admin"
    ORACLE_HOME with value "C:\Oracle\instantclient"
    Path edited and added this value "C:\Oracle\instantclient\instantclient_11_2"
    But i am still facing the below error :
    ORA-12541: TNS:no listener
    Really, appreciate your help !
    Thanks & regards
    Mohammed

    Mohammed ... wrote:
    Thanks all your help and support..
    I reconfigured the instant client following below link :
    [http://www.dbatoolz.com/t/installing-oracle-instantclient-basic-and-instantclient-sqlplus-on-win32.html]
    and followed your advises as well and i can now connect to database though any user
    But unfortunately, i cannot connect as sys user, it gave me below error :
    C:\Users\mohammed>sqlplus sys as sysdba
    SQL*Plus: Release 11.2.0.3.0 Production on Tue May 7 17:29:56 2013
    Copyright (c) 1982, 2011, Oracle. All rights reserved.
    Enter password:
    ERROR:
    ORA-12560: TNS:protocol adapter error
    C:\Users\mohammed>
    Could you please advise..
    Regards,
    MohammedIf the client is on the same machine as the database, then you don't have ORACLE_SID set.
    More likely the database is on a different server, you have to specify 'sqlplus sys/pswd@dbname'.
    And your db will need to be configured to allow remote sysdba authorization, which is not a good idea from a security perspective.

  • Cannot connect to sys giving the database name

    Hello All,
    I cannot connect to sys user when giving the database name but with no database name I can connect.
    [oracle@ccoshs02xvdbs04 trace]$ sqlplus sys/passwdA123system@mps01dev as sysdba
    SQL*Plus: Release 11.2.0.1.0 Production on Tue Mar 1 10:38:36 2011
    Copyright (c) 1982, 2009, Oracle. All rights reserved.
    ERROR:
    ORA-01017: invalid username/password; logon denied
    Enter user-name:
    ERROR:
    ORA-01017: invalid username/password; logon denied
    Enter user-name:
    ERROR:
    ORA-01017: invalid username/password; logon denied
    SP2-0157: unable to CONNECT to ORACLE after 3 attempts, exiting SQL*Plus
    [oracle@ccoshs02xvdbs04 trace]$ sqlplus sys/passwdA123system as sysdba
    SQL*Plus: Release 11.2.0.1.0 Production on Tue Mar 1 10:40:06 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
    SQL> show parameter instance
    NAME TYPE VALUE
    active_instance_count integer
    cluster_database_instances integer 1
    instance_groups string
    instance_name string mps01dev
    instance_number integer 0
    instance_type string RDBMS
    open_links_per_instance integer 4
    parallel_instance_group string
    parallel_server_instances integer 1

    [oracle@ccoshs02xvdbs04 script]$ sqlplus sys/passwdA123system as sysdba
    SQL*Plus: Release 11.2.0.1.0 Production on Tue Mar 1 11:19:47 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
    SQL> alter user sys identified by passwdA123system
    2 ;
    User altered.
    SQL> connect sys/passwdA123system@mps01dev
    ERROR:
    ORA-28009: connection as SYS should be as SYSDBA or SYSOPER
    Warning: You are no longer connected to ORACLE.
    SQL> exit
    [oracle@ccoshs02xvdbs04 script]$ sqlplus sys/passwdA123system@mps01dev as sysdba
    SQL*Plus: Release 11.2.0.1.0 Production on Tue Mar 1 11:21:15 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
    SQL>
    Many thanks.

  • How to change password of sys user connected as sysdba?

    How to change password of sys user connected as sysdba?
    I have connected with user name sys as sysdba in oracle 9i with password oracle.
    I want to change the password . I typed password and pressed entered. It asks me to type old password, then new password and retype the new password. When I press enter it gives error message "ERROR:
    ORA-28008: invalid old password"
    Password unchanged.
    does anyone know about this...? how to change the password..?

    You may be using operating system authentication to log in as sys with sysdba privileges.
    By using password utility, you can change the password of sys user (which is in database) which is "change_on_install" when you create a database.
    You can change this password.

  • Error ORA-28009: connection as SYS should be as SYSDBA or SYSOPER

    hi,
    i try to connect to oracle in c#2005. I'm using oralce 10.2.0.3.0 in window vista.
    i can connect as user scott , but can't do the same thing with use sys like sysdba. i encouter error :
    "ORA-28009: connection as SYS should be as SYSDBA or SYSOPER"
    this is my code :
    using System;
    using System.Data.SqlClient;
    using System.Data.OleDb;
    namespace ConsoleApplication2
    class Program
    static void Main(string[] args)
    string connectionString = "provider=MSDAORA;data source=ORCL;user id=sys;password=orcl";
    OleDbConnection myOleDbConnection = new OleDbConnection(connectionString);
    try
    myOleDbConnection.Open();
    Console.WriteLine("successfull");
    Console.ReadLine();
    catch (Exception ex)
    Console.WriteLine(ex.Message);
    Console.Read();
    i
    i have google about this error and see that some people use Oracle.DataAccess.Client namespace to solve this error. but i cant find this namespace reference.
    i want to connect to oracle in c# 2005 as user id = sys.
    so , please help me.
    thanks

    it should be there regardless of the version you installed, go into your GAC and give it a look over (C:\Windows\assembly) the Oracle.** should be there after a successful installation. It is actually in your best interest to get the latest and greatest, the versions are backward compatible (I believe they all work to 9i++)
    You can also goto
    %ora_home%\odp.net
    it will have sample c# and vb applications there
    (%ora_home% tends to be c:\oracle\product\#####\Client_1\)
    Have a look over the odp.net demos, that may very well put you on the correct track to getting things working.

  • Sys User cannot connect to DataBase10g through ODBC

    Hi guys ,
    am making ODBC connection of Oracle 10g2 with sys user from xp administrative tools(Data sources ODBC) but it's giving me error.
    ORA-01017:invalid username/password ;login denied.
    with the same user /password i connect many times at sql* plus.
    Please guide me why its all happening.
    Note=ODBC connection with other user HR/Scott have no problem.

    Using sql can very well mislead. See below,
    E:\Documents and Settings\aristadba>sqlplus / as sysdba
    SQL*Plus: Release 11.1.0.6.0 - Production on Wed Jan 13 10:22:00 2010
    Copyright (c) 1982, 2007, Oracle.  All rights reserved.
    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    SQL> sqlplus shakeel/khan as sysdba
    SP2-0734: unknown command beginning "sqlplus sh..." - rest of line ignored.
    SQL> connect shakeel/khan as sysdba
    Connected.
    SQL> connect tom/kyte as sysdba
    Connected.
    SQL> conn aman/sharma as sysdba
    Connected.
    SQL>So would suggest that change the password while being connected as Sys from sqlplus (easiest way) or through recreating the password file and retry the connection.
    HTH
    Aman....

Maybe you are looking for

  • Not able to use the integrated webcam

    I have a HP Pavilion dv6t-6c00. I upgraded to windows 7 ultimate before which I had windows 7 home premium on which I could use the webcam but now it shows an error when I open cyberlink youcam "Warning, No webcam detected. Try plugging in a webcam i

  • Oracle Stored Procedure in Reports

    Hi , How can i call oracle stored procedure in Oracle Reports. The procedure takes an object type variable and as out parameter. Thanks, Ashish Goel

  • Does anyone know how far WVC80N camera can detect motions?

    Like I said in the subject, does anyone knows?

  • Getting "info" button on podcasts

    If you search podcasts through the store there's a convent "i" button that if you hover over or click it gives the description of that particular podcast episode. I'm wondering if there's a way to get that in the columns of your already downloaded po

  • SAP XI Conversion Agent and TIFF

    Hello All, Can anyone let us know whether SAP SCript format can be converted into TIFF extension using Conversion Agent. Thanking you in advance Regards Ajay