Loading ...
Sorry, an error occurred while loading the content.
 

dbext and sqlplus without tnsnames

Expand Messages
  • Vitor Eiji Justus Sakaguti
    Hi, This is actually a question about a vim plugin, but I guess this is the best place to ask it. Please forgive me if I m wrong. I m trying to setup a dbext
    Message 1 of 4 , Feb 26, 2013
      Hi,

      This is actually a question about a vim plugin, but I guess this is
      the best place to ask it. Please forgive me if I'm wrong.

      I'm trying to setup a dbext environment on a Windows machine to
      connect to a remote Oracle database.
      However, I don't have write access to tnsnames.ora and cannot add the
      proper entry for the database to which I need to connect.

      I tried several different forms of profile setting, according to the
      very examples in the help file, but whatever I did, when I tried to
      execute somthing I saw that a cmd.exe was run with something like
      this:

      cmd.exe /c sqlplus -S "myUser/myPass@myServiceName"
      @C:\Users\More\Path\dbext.sql > C:\You\Get\The\idea\sdkfg.tmp 2>&1

      Those are not really my username, password, service name os
      directories, but they show correctly.
      There is no mention, however, to the host and port, even though I did
      set them in my profile.

      I suppose dbext tries to use the info from tnsnames, but it is not there...

      What am I missing here?

      (it is my first time trying dbext out! I usually connect to oracle
      databases using SQLWorkbench/J with a JDBC connection string and no
      tnsnames...)

      Thank you!

      Vitor

      --
      --
      You received this message from the "vim_use" maillist.
      Do not top-post! Type your reply below the text you are replying to.
      For more information, visit http://www.vim.org/maillist.php

      ---
      You received this message because you are subscribed to the Google Groups "vim_use" group.
      To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
      For more options, visit https://groups.google.com/groups/opt_out.
    • David Fishburn
      On Tue, Feb 26, 2013 at 6:32 PM, Vitor Eiji Justus Sakaguti
      Message 2 of 4 , Feb 26, 2013



        On Tue, Feb 26, 2013 at 6:32 PM, Vitor Eiji Justus Sakaguti <vitoreiji0@...> wrote:
        ...
         
        I'm trying to setup a dbext environment on a Windows machine to
        connect to a remote Oracle database.
        However, I don't have write access to tnsnames.ora and cannot add the
        proper entry for the database to which I need to connect.

        I tried several different forms of profile setting, according to the
        very examples in the help file

        Two suggestions:

        1.  :DBSetOption display_cmd_line=1
        2.  Try each profile setting.
        - Show us the profile string you used.
        - Show us the sqlplus cmd line generated.
        - Show us the error.


         
        but whatever I did, when I tried to
        execute somthing I saw that a cmd.exe was run with something like
        this:

        cmd.exe /c sqlplus -S "myUser/myPass@myServiceName"
        @C:\Users\More\Path\dbext.sql > C:\You\Get\The\idea\sdkfg.tmp 2>&1

        The :DBSetOption above will show you this cmd line in the normal dbext output buffer.

        From the dbext.txt I suspect the example that you want to use for your profile is:
            let g:dbext_default_profile_ORA_Extended = 'type=ORA:user=scott:passwd=tiger:srvname=(description=(address=(protocol=TCP)(host=localhost)(port=1521))(connect_data=(server=dedicated)(service_name=10gR2)))'

        Also, if you continue have problems can you run:
        :DBGetOption

        And post it's contents with your other output from above.

        David

        --
        --
        You received this message from the "vim_use" maillist.
        Do not top-post! Type your reply below the text you are replying to.
        For more information, visit http://www.vim.org/maillist.php
         
        ---
        You received this message because you are subscribed to the Google Groups "vim_use" group.
        To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
        For more options, visit https://groups.google.com/groups/opt_out.
         
         
      • Vitor Eiji Justus Sakaguti
        Hi David, On Tue, Feb 26, 2013 at 10:17 PM, David Fishburn ... Thank you, that really helped me figure out what I was doing wrong! (I won t paste the results
        Message 3 of 4 , Feb 27, 2013
          Hi David,

          On Tue, Feb 26, 2013 at 10:17 PM, David Fishburn
          <dfishburn.vim@...> wrote:
          > Two suggestions:
          >
          > 1. :DBSetOption display_cmd_line=1
          > 2. Try each profile setting.
          > - Show us the profile string you used.
          > - Show us the sqlplus cmd line generated.
          > - Show us the error.

          Thank you, that really helped me figure out what I was doing wrong!
          (I won't paste the results here since what I was doing was really
          stupid, as I suspected)

          > From the dbext.txt I suspect the example that you want to use for your
          > profile is:
          > let g:dbext_default_profile_ORA_Extended =
          > 'type=ORA:user=scott:passwd=tiger:srvname=(description=(address=(protocol=TCP)(host=localhost)(port=1521))(connect_data=(server=dedicated)(service_name=10gR2)))'

          You're right, that is the one I needed. I had tested it before bu
          thought it didn't work because I was sending my queries to sqlplus
          without a semicolon at the end, so it would hang forever!

          By the way, is there any way to do that automatically in dbext? I'm
          really not used to doing it in the graphical DEs I use and it would be
          nice to get the same behavior with dbext.

          Thank you!

          Vitor

          --
          --
          You received this message from the "vim_use" maillist.
          Do not top-post! Type your reply below the text you are replying to.
          For more information, visit http://www.vim.org/maillist.php

          ---
          You received this message because you are subscribed to the Google Groups "vim_use" group.
          To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
          For more options, visit https://groups.google.com/groups/opt_out.
        • David Fishburn
          ... We can take this off list and you can email me directly. In short, dbext is supposed to automatically terminate your command if one is not already present.
          Message 4 of 4 , Feb 27, 2013
            ...
            You're right, that is the one I needed. I had tested it before bu
            thought it didn't work because I was sending my queries to sqlplus
            without a semicolon at the end, so it would hang forever!

            By the way, is there any way to do that automatically in dbext?


            We can take this off list and you can email me directly.
            In short, dbext is supposed to automatically terminate your command if one is not already present.

            After you have connected and sent a request, can you run:
            :DBGetOption

            And send me the output.

            David

            --
            --
            You received this message from the "vim_use" maillist.
            Do not top-post! Type your reply below the text you are replying to.
            For more information, visit http://www.vim.org/maillist.php
             
            ---
            You received this message because you are subscribed to the Google Groups "vim_use" group.
            To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
            For more options, visit https://groups.google.com/groups/opt_out.
             
             
          Your message has been successfully submitted and would be delivered to recipients shortly.