DBAsupport.com Forums - Powered by vBulletin
Results 1 to 6 of 6

Thread: Connect to Remote database through stored procedure i am getting following error

  1. #1
    Join Date
    Nov 2007
    Posts
    2

    Thumbs up Connect to Remote database through stored procedure i am getting following error

    Hi,

    Please find the code which i written to connect remote database :

    create or replace PROCEDURE REMOTE_CONNECT( :idb IN VARCHAR2(14) :='PROD',
    :dbname IN VARCHAR2(14) :='PROD',
    :uid IN VARCHAR2(14) :='user',
    wd IN VARCHAR2(14) :='password',
    SQLCODE)
    IS


    BEGIN


    connect to :dbid AS :dbname USER :uid USING wd;


    dbms_output.put_line('connected to database');
    END;

    I am getting following error :

    ORA-SQL-PLSQL S1982

    (S1982) Expecting Identifier

    The alert message which i get at the time of compilation is :

    NO CREATE[OR REPLACE] statement found to execute.


    Please know why i am getting the following error message. Is the above cod e to be modified ? Please guide me
    Last edited by prakashchakra; 11-17-2007 at 10:41 AM. Reason: Change in text

  2. #2
    Join Date
    Mar 2007
    Location
    Ft. Lauderdale, FL
    Posts
    3,555
    What are you trying to do?
    Pablo (Paul) Berzukov

    Author of Understanding Database Administration available at amazon and other bookstores.

    Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.

  3. #3
    Join Date
    Sep 2002
    Location
    England
    Posts
    7,334
    every single line you have written is a load of rubbish, do you not know anyone who knows about oracle to help you?

  4. #4
    Join Date
    Nov 2007
    Posts
    2
    Can i have connect statement to remote database in a stored procedure ?

  5. #5
    Join Date
    Mar 2007
    Location
    Ft. Lauderdale, FL
    Posts
    3,555
    Quote Originally Posted by prakashchakra
    Can i have connect statement to remote database in a stored procedure ?
    Huh?
    Pablo (Paul) Berzukov

    Author of Understanding Database Administration available at amazon and other bookstores.

    Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.

  6. #6
    Join Date
    Sep 2002
    Location
    England
    Posts
    7,334
    Quote Originally Posted by prakashchakra
    Can i have connect statement to remote database in a stored procedure ?
    do you know anything about oracle? what are you trying to do here

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width