Results 1 to 6 of 6

Thread: Oracle conexion problem

  1. #1

    Thread Starter
    Fanatic Member mutley's Avatar
    Join Date
    Apr 2000
    Location
    Sao Paulo - Brazil
    Posts
    709

    Oracle conexion problem

    Hi

    I must to connect in database oracle ,different database are in same Server (same IP) , but with different SID(Data source) , see tnsname below


    , I tried to connect using in VB

    See my connectstring

    Code:
    Provider=MSDAORA.1;Password="mypass";User ID=user1;Data Source=islq;Persist Security Info=True

    work fine , but when use

    Code:
    Provider=MSDAORA.1;Password="mypass";User ID=user1;Data Source=lbpiq;Persist Security Info=True

    Not work

    my tnsnames.ora



    PHP Code:
    islq =
      (
    DESCRIPTION =
        (
    ADDRESS_LIST =
          (
    ADDRESS = (PROTOCOL TCP)(HOST 10.176.13.25)(PORT 1548))
        )
        (
    CONNECT_DATA =
          (
    SID islq)
          (
    SERVER DEDICATED)
        )
      )
    islp.WORLD 
      (
    DESCRIPTION 
        (
    ADDRESS_LIST 
          (
    ADDRESS = (PROTOCOL TCP)(HOST 10.176.13.31)(PORT 1558)) 
        ) 
        (
    CONNECT_DATA 
          (
    SID islp
          (
    SERVER DEDICATED
        ) 
      ) 

    lbpiq.WORLD 
      (
    DESCRIPTION 
        (
    ADDRESS_LIST 
          (
    ADDRESS = (PROTOCOL TCP)(HOST 10.176.13.25)(PORT 1545)) 
        ) 
        (
    CONNECT_DATA 
          (
    SID lbpiq
          (
    SERVER DEDICATED
        ) 
      ) 

    lbpiq 
      (
    DESCRIPTION 
        (
    ADDRESS_LIST 
          (
    ADDRESS = (PROTOCOL TCP)(HOST 10.176.13.25)(PORT 1545)) 
        ) 
        (
    CONNECT_DATA 
          (
    SID lbpiq
          (
    SERVER DEDICATED
        ) 
      ) 

    Using external tools (PLSQL DEVELOPER, TOAD ...ETC ) work fine boths connections using same user and password ( user1 and mypass)


    Is there some other way to connect , using IP and PORT ?

    Tia

  2. #2
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: Oracle conexion problem

    Thread moved to 'Database Development' forum (the 'VB6' forum is only meant for questions which don't fit in more specific forums)

  3. #3
    VB Addict Pradeep1210's Avatar
    Join Date
    Apr 2004
    Location
    Inside the CPU...
    Posts
    6,614

    Re: Oracle conexion problem

    Quote Originally Posted by mutley View Post
    See my connectstring
    Code:
    Provider=MSDAORA.1;Password="mypass";User ID=user1;Data Source=islq;Persist Security Info=True
    work fine , but when use
    Code:
    Provider=MSDAORA.1;Password="mypass";User ID=user1;Data Source=lbpiq;Persist Security Info=True
    Not work
    Ummm.. what's the difference between those two connection strings? I don't see any difference.
    Pradeep, Microsoft MVP (Visual Basic)
    Please appreciate posts that have helped you by clicking icon on the left of the post.
    "A problem well stated is a problem half solved." — Charles F. Kettering

    Read articles on My Blog101 LINQ SamplesJSON ValidatorXML Schema Validator"How Do I" videos on MSDNVB.NET and C# ComparisonGood Coding PracticesVBForums Reputation SaverString EnumSuper Simple Tetris Game


    (2010-2013)
    NB: I do not answer coding questions via PM. If you want my help, then make a post and PM me it's link. If I can help, trust me I will...

  4. #4
    VB Addict Pradeep1210's Avatar
    Join Date
    Apr 2004
    Location
    Inside the CPU...
    Posts
    6,614

    Re: Oracle conexion problem

    okk.. So data source is changed. So have you checked that those two data sources are correct?
    Pradeep, Microsoft MVP (Visual Basic)
    Please appreciate posts that have helped you by clicking icon on the left of the post.
    "A problem well stated is a problem half solved." — Charles F. Kettering

    Read articles on My Blog101 LINQ SamplesJSON ValidatorXML Schema Validator"How Do I" videos on MSDNVB.NET and C# ComparisonGood Coding PracticesVBForums Reputation SaverString EnumSuper Simple Tetris Game


    (2010-2013)
    NB: I do not answer coding questions via PM. If you want my help, then make a post and PM me it's link. If I can help, trust me I will...

  5. #5
    VB Addict Pradeep1210's Avatar
    Join Date
    Apr 2004
    Location
    Inside the CPU...
    Posts
    6,614

    Re: Oracle conexion problem

    Have a look here:
    http://www.connectionstrings.com/oracle

    Maybe this helps.
    Pradeep, Microsoft MVP (Visual Basic)
    Please appreciate posts that have helped you by clicking icon on the left of the post.
    "A problem well stated is a problem half solved." — Charles F. Kettering

    Read articles on My Blog101 LINQ SamplesJSON ValidatorXML Schema Validator"How Do I" videos on MSDNVB.NET and C# ComparisonGood Coding PracticesVBForums Reputation SaverString EnumSuper Simple Tetris Game


    (2010-2013)
    NB: I do not answer coding questions via PM. If you want my help, then make a post and PM me it's link. If I can help, trust me I will...

  6. #6

    Thread Starter
    Fanatic Member mutley's Avatar
    Join Date
    Apr 2000
    Location
    Sao Paulo - Brazil
    Posts
    709

    Re: Oracle conexion problem

    Thank you I put in my Datasource

    Code:
    Source="(DESCRIPTION=(ADDRESS_LIST =(ADDRESS = (PROTOCOL = TCP)(HOST =IPSERVER)(PORT = 1545)))(CONNECT_DATA=(SID = lbpiq)(SERVER = DEDICATED)))"
    AND work , but is there other way ?, Because the DataSoruce is in INI file, and size max section in inifile is 20, then I musto change de code VB

    I want to connect in same SERVER , but in different PORT
    Last edited by mutley; Feb 25th, 2010 at 08:03 AM.

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