Connecting SQL*PLUS to Micrsoft SQL Server

I want to setup a connection to My MS Sql Server using SQL*PLUS. I've looked at the Documents but have not been able to get it to work I have download the Connector.
Thank you for any help you can provide..

Hi,
If you want to connect to SQL*Server from SQLPLUS then you need to use either the Database Gateway for SQL*Server (DG4ODBC) or the Database Gateway for ODBC (DG4ODBC).
You cannot do it using the connector supplied with SQL*Developer.
See this note in My Oracle Support for further information -
Note.233876.1 Options for Connecting to Foreign Data Stores and Non-Oracle Databases
or this website -
http://www.oracle.com/technology/products/gateways/index.html
Regards,
Mike

Similar Messages

  • How to invoke multiple sessions of sql*plus thru pl/sql program

    Hi
    How to invoke multiple sessions of sql*plus thru pl/sql program.
    Thanks

    How to invoke sql*plus in a procedure?????
    I have to invoke more pl/sql sessions?????No you don't "have to".
    Look at what you are trying to do.
    You have a program running inside the PL/SQL engine. This is running nicely inside the Oracle database and is perfectly capable of issuing other SQL statements, PL/SQL programs etc. inside it's nice cosy Oracle environment.
    You are asking for this PL/SQL to shell out to the operating system, run an external application, for which it will have to supply a username and password (are you planning on hard coding those into your PL/SQL?), and then that external application is supposed to run more SQL or PL/SQL against the database.
    a) Why hold all this code external to the database when it can quite happily reside on the database itself and be executed through jobs or whatever.
    b) Consider what would happen if someone were to replace the external application with their own program of the same file name... they'd be able to capture the username and password for connecting to the database, therefore a major security flaw.
    The whole idea of doing what you want through external calls to SQL*Plus is ridiculous.

  • Unable to use SQL Plus (Windows 2003 x64 Server)

    Hi all
    I have some trouble with tnsname.ora ...
    I have installed Oracle Client 10.2.0.1.0 with the ODBC Driver and SQLplus etc.
    Now I have configured in the "Net Manager" some "Service Naming" as I did
    on other servers before. Then I Test the connection in the "Net Manager" it
    seams to work fine.
    When I now try to connect in SQL Plus the following error comes up:
    ORA-12154: TNS:could not resolve the connect identifier specified
    I did already do this:
    - Add "...\NETWORK\ADMIN" to the Path Variable of the server
    - sqlnet.ora looks like:
    SQLNET.AUTHENTICATION_SERVICES= (NTS)
    NAMES.DIRECTORY_PATH= (TNSNAMES)
    - tnsnames.ora looks like:
    MyName.WORLD =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = myDomain.net)(PORT = 1521))
    (CONNECT_DATA =
    (SID = DBSIDxx)
    I am accessing like MyName.WORLD ...
    What do I have to do to get this working ???
    Thanks for any comments!
    Best regards
    Frank Uray

    1) Please verify that there is only one tnsnames.ora file on your system.
    If there are several (other than in 'samples' directories), please make them all look the same and try again.
    2) If not, please post the contents of your tnsnames.ora AND sqlnet.ora files.
    Message was edited by:
    forbrich
    Re-read your original message and noteiced you posted the tnsnames.ora stuff.
    Your alias is 'MyName.world', therefore you want to access using the connect string such as
    SQLPLUS system/[email protected]
    If you want to use SQLPLUS system/password@myname (no .world) then either remove it from the alias or add the default_domain info in sqlnet.ora

  • Username password works in SQL Plus not in SQL Developer

    I have SQL Dev 1.2.1. It works fine with some databases, but with two databases with logons managed by Oracle Enterprise User it does not work. I receive an Ora 01017 error invalid username password. The user name and password work fine from SQL Plus and from a third party tool. I have a local developer client environment installed, so am using TNS. SQL Developer was installed before the client environment. I was not trying to access this database before the client environment install. I was using the basic connection before the client install. Neither basic or TNS connection works for this particular database.
    Any ideas?

    We have changed the password and it still does not work. There are no special characters in the password.
    I am tempted to think the problem is the jdbc driver versions. The logon for Enterprise user controlled databases stopped working after I installed the thick client Oracle developer. I have tried to find the threads with information on disabling the thick client jdbc but have not found them. I also have tried to enter a URL for the thin client without success. One of our DBAs is saying that the 11g clients are broken and he is in communication with Oracle about it. He says 10g works but 11g does not.
    Any further help would be appreciated.
    Gerry

  • SQL*PLUS and PL/SQL

    HI !
    There is any way to run a command SQL*PLUS through a block pl/sql. For example to run the "copy from" command in a block pl/sql.
    Thanks for you time.

    APC wrote:
    No.
    SQL*Plus is an interactive, client-side tool. PL/SQL is a batch-oriented server side tool.I would make more distinction ...
    SQL*Plus is an interactive, client-side tool - a specialized command processor. PL/SQL is a batch-oriented server side programming language.
    >
    There are ways of doing the same sort of things in both languages, but they are different commands.
    Cheers, APC

  • Oracle 9.0.1 SQL*Plus and PL/SQL

    Having just upgraded from Oracle 8.0.1 to the above, can anyone suggest a good book for learning the above languages as I believe there is quite a lot of difference in the codes, which also contains some good exercises for trying them out.
    Phil.

    I would take a look at this for PL/SQL:
    Oracle PL/SQL Programming, 3rd Edition
    If you want to learn SQL, you can try this book, which some people I know have liked: Mastering Oracle SQL
    For the extra features of SQL*Plus, the Oracle manual is very complete and should be sufficient.

  • Different behaviour in SQL*Plus and PL/SQL

    Does anyone know why the following SQL works from the command line in SQL*Plus but results in a syntax error when included within a cursor in a PL/SQL procedure?
    SELECT (SELECT 'dummy' FROM dual)
    FROM dual;
    null

    Is this what you require? This works...
    declare
    cursor cur_dummy is
    SELECT d.dum
    FROM (
    SELECT 'dummy' dum
    FROM dual
    ) d
    v_dummy varchar2(30);
    begin
    open cur_dummy;
    fetch cur_dummy into v_dummy;
    close cur_dummy;
    dbms_output.put_line(v_dummy);
    end;
    Cheers
    BigB
    =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by Aqueel ([email protected]):
    In PL/SQL, every SELECT Statement must have a INTO clause. But still It's not working. Anyother know the answer?
    <HR></BLOCKQUOTE>
    null

  • 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
    thanks

    Hi 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

  • How to connect as different user in SQL Plus Worksheet in SQL Developer

    This is driving me nuts! I have a script with different "CONNECT" commands to different schemas. What is the right synatx when using SQL Worksheet in SQL Developer when connecting to a different user? Greatly appreciate help on this. Thanks!

    Which version of SQL Developer are you using? What syntax are you using?
    Using SQL Developer 2.1.0.63.73, running selected statements as a script, I could get connect to work fine with the following examples:
    connect
    select user, global_name from global_name;
    connect;
    select user, global_name from global_name;
    connect user/password@tnsalias
    select user, global_name from global_name;
    connect user/password@tnsalias;
    select user, global_name from global_name;Unfortunately, even though the connect on it's own prompts for user, password and tns alias (and says a blank tns alias is the current connection), the following don't work:
    connect user/password
    select user, global_name from global_name;
    connect user/password;
    select user, global_name from global_name;Also note that the connection performed by this only exists while the script is being executed - only the script stops/ends the connection is disconnected.
    theFurryOne

  • SQL Plus Worksheet OR SQL Worksheet

    Hello Everybody,
    i have a problem. I need the SQL Worksheet, can anybody tell me, where can i find the SQL Worksheet as freeware version. Do anybody know the URL?
    Pls help me!
    Send me the URL to: [email protected]
    Kind Regards
    Ilyas

    Hello Krystian,
    thanks for the quick answer!
    What do you mean with database clients download?
    I dont found the SQL Worksheet....

  • How to pass ksh $1 to sql plus and pl/sql

    Hi,
    How do I pass a ksh $1 to pl/sql code? Is it through sqlplus bind variables? Please give examples. Thank you.

    in your shell script you can do:
    sqlplus user/password@connect_str @myscript $1And in the sql script, for example:
    Select '&1' from dual;Max
    [My Italian Oracle blog|http://oracleitalia.wordpress.com]

  • Select from in SQL Developer fails - SQL*Plus works

    Hello All,
    I've got the HS connection to MySLQ working correctly and most of the requirements I have with respect to the data is working.
    However, i"m only able to test my procedures and functions in SQL*PLus. IN SQL Developer 4.0.0.12 there is always a problem and query results are never displayed.
    Thanks in advance for any advice.
    Sincerely
    JS

    Actually Mike,
    The white spaces are appended to the end of the resulting string. I've included the NLS setting for bother Oracle adn MySQL as well as my odbc.ini file
    select '"'|| "User" ||'"' as Username from "user"@MYODBC5;
    Results (there is white spaces added right after the username, as the result shoudl have been "intm","root" as opposed to "intm                                "
    ===============================================================================================================
    USERNAME
    "intm
    USERNAME
    "root
    NLS _SETTINGS  ORACLE
    ==============================================================
    Oracle:
    ======
    NAME                      
    VALUE$
    NLS_LANGUAGE              
    AMERICAN
    NLS_TERRITORY             
    AMERICA
    NLS_CURRENCY              
    $
    NLS_ISO_CURRENCY          
    AMERICA
    NLS_NUMERIC_CHARACTERS    
    NLS_CHARACTERSET          
    AL32UTF8
    NLS_CALENDAR              
    GREGORIAN
    NLS_DATE_FORMAT           
    DD-MON-RR
    NLS_DATE_LANGUAGE         
    AMERICAN
    NLS_SORT                  
    BINARY
    NLS_TIME_FORMAT           
    HH.MI.SSXFF AM
    NAME                      
    VALUE$
    NLS_TIMESTAMP_FORMAT      
    DD-MON-RR HH.MI.SSXF
    F AM
    NLS_TIME_TZ_FORMAT        
    HH.MI.SSXFF AM TZR
    NLS_TIMESTAMP_TZ_FORMAT   
    DD-MON-RR HH.MI.SSXF
    F AM TZR
    NLS_DUAL_CURRENCY         
    $
    NLS_COMP                  
    BINARY
    NLS_LENGTH_SEMANTICS      
    BYTE
    NLS_NCHAR_CONV_EXCP       
    FALSE
    NAME                      
    VALUE$
    NLS_NCHAR_CHARACTERSET    
    AL16UTF16
    NLS_RDBMS_VERSION         
    11.2.0.2.0
    NLS _SETTINGS  MYSQL
    ==============================================================
    Oracle:
    ======
    NAME :
    +--------------------------+----------------------------+
    | Variable_name            | Value                      |
    +--------------------------+----------------------------+
    | character_set_client     | utf8                       |
    | character_set_connection | utf8                       |
    | character_set_database   | latin1                     |
    | character_set_filesystem | binary                     |
    | character_set_results    | utf8                       |
    | character_set_server     | latin1                     |
    | character_set_system     | utf8                       |
    | character_sets_dir       | /usr/share/mysql/charsets/ |
    +--------------------------+----------------------------+
    ===========================================================ODBC INI
    [myodbc5]
    Driver = /usr/lib64/libmyodbc5a.so
    Description = Connector/ODBC 5.3.4 Driver DSN
    SERVER = 127.0.0.1
    PORT = 3306
    USER = intm
    PASSWORD = *********
    DATABASE = mysql
    OPTION = 0
    TRACE = OFF

  • SQL*Plus/iSQL*Plus login as DBA

    I just installed 10g Enterprise on a Windows platform and am a bit confused to why I cannot log into SQL*Plus/iSQL as a DBA. I can login as one of the user accounts then use 'connect' to login as dba in SQL*Plus or at the Windows command prompt. I cannot do this, however, in iSQL*Plus. One of the threads on this forum pointed me to using JAZN after installing OC4J. I am in the process of doing this, but I need to understand something apparently fundamental: why should I have to perform another install when the Universal Installer installed iSQL and all the features that came with it? Didn't the 10g download give me the tools necessary to administer its application's accounts? The OC4J download page states that this tool should not be used to replace an existing 10g installation.
    Moreover, why iSQL knows about the 'users' authorization level, but not 'system?' I can see the users and groups in the Enterprise Manager, but no features to set WebDBA users as iSQL*Plus requests.
    Your comments would be much appreciated.

    Hi,
    in order to use iSQL*Plus as DBA, you have to perform additional configuration. See
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14357/ch2.htm#BCEIHEJF
    By the way: Get used to a different tool like SQL*Plus linemode or SQL Developer, because iSQL*Plus disappears in future versions.
    Kind regards
    Uwe

  • PL/SQL cursors vs. SQL*plus Select statement

    Hi folks, hope you're doing well,
    Here is a question that kept me wondering:
    Why would I use cursors when i can achieve the same thing with a SQL+ Select statement which is much easier to formulate than a cursor (e.g. you need no declaration, loops etc)?.
    Thanks so much,
    -a

    There is no such thing as a SQL*Plus SELECT statement. The SELECT command is part of the SQL Language - not part of the SQL*Plus (very limited small vocabulary) macro language.
    All SQL SELECTs (from client languages) winds up in the SQL Engine as SQL cursors. A SQL Cursor is basically the:
    - SQL source code
    - SQL "compiled" code (instructions on how to fetch the rows)
    On the client side, client cursors (not to be confused with SQL cursors) are used. A client cursor is created in the client language when it makes SQL calls via the database client driver (called the OCI/Oracle Call Interface for Oracle clients).
    Typically this is what a client does. It makes a connection to the database and gets a database handler in return. The database handler is the "communication channel" from the client to the db. In Oracle, the database handler in the client refers to the Oracle session (for that client) on db server.
    A SQL statement (source code) is used by the client. This can be a SELECT statement you type in at the SQL*Plus command line. It can be a SELECT statement for the PL/SQL cursor command in a stored procedure.
    The client creates a SQL handle for this SQL statement, by calling the Oracle client driver. Note that this SQL handle is a client handle - a client cursor for that SQL statement.
    E.g.
    a) sqlHandle = CreateSQL( databaseHandle, 'SELECT ... FROM ...')
    b) sqlHandle.Parse
    c) sqlHandle.Execute
    After the SQL handle (client cursor) has been executed, the client can fetch rows from it.
    This is what SQL*Plus does automatically for you, without you having to write the code to do it. SQL*Plus CONNECT command create a database connection handle. You enter a SELECT statement and SQL*Plus creates a SQL handle (client cursor), executes it, fetches from it, displays the rows, and closes the SQL handle when done.
    The same applies to PL/SQL. You can use a SELECT statement just like that in PL/SQL. E.g.
    declare
      i integer;
    begin
      select count(*) into i from emp where deptid = 123;
    end;This is called an implicit cursor. PL/SQL creates (just like SQL*Plus) an implicit client cursor. It creates and disposes of that client SQL handle for you - you do not need to do it.
    Or, you can create an explicit cursor. E.g. declare
      cursor c is select count(*) from emp where deptid = 123;
      i integer;
    begin
      open c;
      fetch c into i;
      close c;
    end;The question as to when to use implicit (client) cursors versus explicit (client) cursors depends on your requirements. Do you need to cycle through the results of the SQL? Etc.
    And keep in mind that in either case, the SQL Engine creates a SQL cursor anyway on its side.

  • Sql plus password typing problem

    Hello there
    I'm trying to access sql plus 11g on windows 7, i correctly write the username but when i try to type the password, nothing is typed at all, not letters nor asteresks!!
    plz help meee

    C:\Users\lord>sqlplus / as sysdba SELECT * V$VERSION;
    SQL*Plus: Release 11.2.0.3.0 Production
    Copyright (c) 1982, 2011, Oracle. All rights reserved.
    Use SQL*Plus to execute SQL, PL/SQL and SQL*Plus statements.
    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 | /nolog}] [<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 | SYSOPER | SYSASM}] [EDITION=value]
    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, AS SYSOPER and AS SYSASM options are database
    administration privileges.
    <connect_identifier> can be in the form of Net Service Name
    or Easy Connect.
    @[<net_service_name> | [/]Host[:Port]/<service_name>]
    <net_service_name> is a simple name for a service that resolves
    to a connect descriptor.
    Example: Connect to database using Net Service Name and the
    database net service name is ORCL.
    sqlplus myusername/mypassword@ORCL
    Host specifies the host name or IP address of the database
    server computer.
    Port specifies the listening port on the database server.
    <service_name> specifies the service name of the database you
    want to access.
    Example: Connect to database using Easy Connect and the
    Service name is ORCL.
    sqlplus myusername/mypassword@Host/ORCL
    The /NOLOG option starts SQL*Plus without connecting to a
    database.
    The EDITION specifies the value for Session Edition.
    <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.
    C:\Users\lord>

Maybe you are looking for

  • Logic Pro 9 version 9.1.8 Crashes immediately when any project is opened

    I used Logic all morning today. I closed my project, put my machine to sleep, and walked away from it for a while.  When I returned, Logic was trying to open in 32 bit mode for an unknown reason, and would crash every time I opened a project (I have

  • Business Partner Migration

    Hello Group:       I continue with LSMW+IDOC for Business Partner Migration in SAP Banking.       I am using the Idoc Message BUPA_INBOUND_MAIN_SAVE_M.       I get the error:            “Specify at least one number for the business partner”.       Bu

  • How do you reset your password if you dont know the current password

    Does anyone know how to reset your password if you do not know the current password

  • Custom Report - Show Deployed, But Not Installed, Security Updates

    I'm trying to create a custom report that will show all patches that have been deployed, but have not been installed for a particular collection. Any ideas?

  • Inbound Idoc error

    Hi , I am getting error in Inbound idoc as follows "CC. .EX.593 does not exist" when i go to BD 87 and process it says "order is not valid for making status changes ". can some one please guide how to solve this  error "CC. .EX.593 does not exist"? T