5 Replies Latest reply on Jul 24, 2013 2:54 PM by user7454516

    Connecting to Sybase without setting DSQUERY.

    kevinb
      I'm having problems connecting to a Sybase instance without setting the DSQUERY environment variable. I've heard that DSQUERY isn't required and the docs seem to say the same thing, but I can't get it to work. Has anyone encountered this before?
      Kevin



      Below I'm illustrating the problem by using DBLOGIN. The problem is the same when trying to start a REPLICAT.
      There is an entry for the server in the interfaces file. isql works, etc.
      -----------------------------------------
      [oracle@hostA gg]$ ggsci

      Oracle GoldenGate Command Interpreter for Sybase
      Version 11.1.1.0.1 Build 004
      Linux, x64, 64bit (optimized), Sybase 15.0 on Aug 31 2010 20:27:53

      Copyright (C) 1995, 2010, Oracle and/or its affiliates. All rights reserved.



      GGSCI (hostA.domain.com) 1> dblogin sourcedb db01, userid myuser@syb000
      Password:
      ERROR: Cannot connect to database db01 at server syb000.
      Client Library error: severity(0) number (44) origin(1) layer(4).
      ct_connect(): protocol specific layer: external error: The attempt to connect to the server failed.

      GGSCI (hostA.domain.com) 2> exit
      [oracle@hostA gg]$ export DSQUERY=syb000
      [oracle@hostA gg]$ ggsci

      Oracle GoldenGate Command Interpreter for Sybase
      Version 11.1.1.0.1 Build 004
      Linux, x64, 64bit (optimized), Sybase 15.0 on Aug 31 2010 20:27:53

      Copyright (C) 1995, 2010, Oracle and/or its affiliates. All rights reserved.



      GGSCI (hostA.domain.com) 1> dblogin sourcedb db01, userid myuser
      Password:
      Successfully logged into database.

      GGSCI (hostA.domain.com) 2>
        • 1. Re: Connecting to Sybase without setting DSQUERY.
          stevencallan
          Where do you see that the docs say the same thing (about not setting the variable)?

          I see on page 5, under Database Configuration, of the Sybase install guide:

          "Set the DSQUERY variable to the server that contains the database that Oracle GoldenGate will be using."
          • 2. Re: Connecting to Sybase without setting DSQUERY.
            kevinb
            Thanks, I did see that, which is why I tried it.

            I was looking at...
            Reference Guide, Page 381-384, USERID, Example 3.
            It doesn't explicitly say which platforms the syntax works for.

            If I must set DSQUERY, how do I write to multiple targets from a single server?
            • 3. Re: Connecting to Sybase without setting DSQUERY.
              stevencallan
              Well, using that example, it assumes the connection knows where to go, either as a result of the connection string, or an environment variable.

              If ORACLE_SID were set, then:

              userid whomever, password whatever

              ...works. If not set, then:

              userid whomever@SID, password whatever

              ...works. What is the corresponding connection string for Sybase?

              isql -U<username> -P<password> -S<server name>

              Does Sybase login in support username@<server name>, password whatever? I don't think so (Sybase isn't my thing), so using DSQUERY is how GoldenGate translates the @whatever part of a connection string. Ergo, DSQUERY is set.

              You could also try using SETENV in the parameter file and then default to userid xxx, password yyy.
              1 person found this helpful
              • 4. Re: Connecting to Sybase without setting DSQUERY.
                kevinb
                DSQUERY refers to an entry in the sql.ini (windows) or interfaces file (nix). It is very much like tnsnames.ora (to the best of my knowledge).
                Your isql syntax is correct. You can either set DSQUERY or use the -S flag. Either way, the server must be in sql.ini (I haven't used an LDAP solution). That's where it resolves the host name and port, etc.

                "Does Sybase login in support username@<server name>, password whatever?"
                That's all very dependent on the application/language, isn't it? Isn't really "How does GoldenGate form Sybase connection strings based on USERID and/or DSQUERY?". But you're right, the question really is how do we properly fill in the connection information.

                Thanks for the tip on SETENV. So far that is working in my current scenario. It doesn't work for DBLOGIN since it needs to be in a parameter file, however that's not a big deal. Getting the replicats connected is!

                Thanks for your help! It's much appreciated.
                • 5. Re: Connecting to Sybase without setting DSQUERY.
                  user7454516

                  https://blogs.oracle.com/dataintegration/entry/ogg_how_to_install_oracle

                  "you can also include the source DB server in the dblogin command shown as follows: 

                  dblogin sourcedb sydatabase@ASE1 userid ogguser password ogguser"

                  in your case it must be

                  dblogin sourcedb db01@syb000, userid myuser