Uniface User Forum

 View Only
  • 1.  Patch 22 / Issue with SQL Server & open statement?

    PARTNER
    Posted 07-09-2019 20:29

    I just installed patch 22 on Windows 32 and now my Open to SQL Server doesn't work?  We open with:

    open  "<ODBC Data Source>:<database>||" - because we use Windows Authentication, "HDB" (which is $DEF)



  • 2.  RE: Patch 22 / Issue with SQL Server & open statement?

    Posted 07-10-2019 05:48

    Hi Joanne

    Please set $ioprint before the open to 1023

    debug
    $ioprint=1023
    open "<ODBC Data Source>:<database>||"
    $ioprint=0

    Then have a look into the message-frame/log-file
    Any hint?

    Ingo




  • 3.  RE: Patch 22 / Issue with SQL Server & open statement?

    ROCKETEER
    Posted 07-10-2019 06:38

    Did a quick test here with patch 022 and it seems to work for me.

    ; ASN-path
    $HDB = MSS:

    Using the MSS U5.0 driver and some basic driver settings (identifiers = quoted, procs = off)

    ; code
    open "MYODBCDS:mydb||", "$HDB"
    ; $status = 0

    It would be interesting to see what kind of error is thrown by the open (by doing what Ingo suggested).

    Thanks,
    Daniel



  • 4.  RE: Patch 22 / Issue with SQL Server & open statement?

    PARTNER
    Posted 07-10-2019 12:57

    Ingo, I ran the $ioprint=1023 on 9.7.05 22 and then I rolled back to 9.7.05 no patches and ran it again.  I'll paste it in here because the email said "no reply" (and I don't see where I can do an attachment?).

    Note: If I put the path information in the ASN file, it works fine; but that is just a work-around.  We store the database connection in a file called "HIS_IN.DAT", which we read and the populate the "$connect_string$".  I tried it both with the file and then hard coded the connect string, with the same result:


    9.7.05 Patch 22

    entry lp_open_db

       ; If the database is already open, the following statement

       ; performs an implicit close.


       ; This only opens the main database.  May need to add ud0, etc.

    debug

    $ioprint=1023

    ;   open "%%$connect_string$%%%|%%$dbms_user$%%%|%%$dbms_pass$%%%","hdb"

       open "HIS2017E:HISTASK||", "hdb"

    "I/O function: L, mode: 0, on driver: MSS; Path: $HDB

    Feature UMSS expires in 3650000 days

    Checkout UMSS: 1

    Loaded 'umss52' from C:\Unifacex86\Uniface9705\common\bin\umss52.dll, version: 9.7.05  022

    Uniface Microsoft SQLServer driver

    Driver Version = U5.2 , Software = Microsoft SQL Server 2017 driver controlled release , Software Version = 5.2

    Connections      :60

    Procedures       :Disabled

    Mapping          :Default

    Logon Timeout    :32

    Open Statements  :128

    Hold Statements  :Enabled

    Entity Names     :Lowercase

    Identifiers      :Quoted

    NLS              :Disabled

    SMP              :Disabled

    StmtCache        :Enabled

    KeysetCursor     :Disabled

    SlctEnhance      :Disabled

    Sql92NPW         :Disabled

    Checks           :Enabled

    RI               :Uniface

    Unicode          :Disabled

    Record Size      :Database default

    Segmented Fields :Enabled

    PRA              :Disabled

    Default Locking  :Optimistic

    Lock Timeout     :10

    MaxLockWait      :10

    Mars             :Enabled

    Upgr. Fetch Procs:Disabled

    Step Size        :10

    Lock Isolation   :Committed Read

    nullDefault      :Not Specified

    Create Database  :Disabled

    Connection string: DSN=HIS2017E;Database=?;UID=******;PWD=******;WSID=JCD-DEVEL;APP="C:\Unifacex86\Uniface9705\common\bin\unifac

    e.exe" /adm=c:\UNIFACEx86\Uniface9705\uniface\adm /ini=c:\hisdev\appl\histask.ini /a

    I/O function: L, mode: 0, on driver: MSS; Path: $HDB

    28000 [Microsoft][SQL Server Native Client 11.0][SQL Server]Login failed for user 'JCDTEST\jroberson'.

    Logon (MSS:HIS2017E:?|******|******) failed with status -1, Error occurred"



    Rolled back to vanilla 9.7.05 (no patches)


    "I/O function: L, mode: 0, on driver: MSS; Path: $HDB

    Feature UMSS expires in 3650000 days

    Checkout UMSS: 1

    Loaded 'umss52' from C:\Unifacex86\Uniface9705\common\bin\umss52.dll, version: 9.7.05 

    Uniface Microsoft SQLServer driver

    Driver Version = U5.2 , Software = Microsoft SQL Server 2017 driver controlled release , Software Version = 5.2


    Connections      :60

    Procedures       :Disabled

    Mapping          :Default

    Logon Timeout    :32

    Open Statements  :128

    Hold Statements  :Enabled

    Entity Names     :Lowercase

    Identifiers      :Quoted

    NLS              :Disabled

    SMP              :Disabled

    StmtCache        :Enabled

    KeysetCursor     :Disabled

    SlctEnhance      :Disabled

    Sql92NPW         :Disabled

    Checks           :Enabled

    RI               :Uniface

    Unicode          :Disabled

    Record Size      :Database default

    Segmented Fields :Enabled

    PRA              :Disabled

    Default Locking  :Optimistic

    Lock Timeout     :10

    MaxLockWait      :10

    Mars             :Enabled

    Upgr. Fetch Procs:Disabled

    Step Size        :10

    Lock Isolation   :Committed Read

    nullDefault      :Not Specified

    Create Database  :Disabled


    Connection string: DSN=HIS2017E;UID=;PWD=;WSID=JCD-DEVEL;APP="C:\Unifacex86\Uniface9705\common\bin\uniface.exe" /adm=c:\UNIFACEx

    86\Uniface9705\uniface\adm /ini=c:\hisdev\appl\histask.ini /a


    SQLServer System Information :

    ------------------------------------------------

        Driver               : sqlncli11.dll 11.00.7462

        Server name          : JCD-DEVEL\HIS2017E

        Data source          : HIS2017E

        ODBC Version         : 03.80.0000

        Driver ODBC Version  : 03.80


    SQLServer2 Database Information :

    ------------------------------------------------

        Database name        : HISTASK

        User name            : dbo

        DBMS name            : Microsoft SQL Server

        DBMS Version         : 14.00.1000


    (Full server version not available, last SQLResult = -1)


    "



  • 5.  RE: Patch 22 / Issue with SQL Server & open statement?

    Posted 07-10-2019 13:27

    BTW:
    I do OPEN and CLOSE in my tools the same way.
    OPEN/CLOSE are done to different SQL-Servers/database x times in a session

    open v_DB_LOGON,v_PATH
     where
       v_DB_LOGON is the same then your information
       v_PATH is "PATH_MDL_A" or "PATH_MDL_B"

    ASN-File

    [PATHS]
     $PATH_MDL_A MSS:||
     $PATH_MDL_B MSS:||

    Environment

      Window 10 and Windows Server
      UnifAce 9.7.04 (871_1)  32 bit
      Databases
        a) SQL-Server 2008
        b) SQL-Server 2012

    Ingo



  • 6.  RE: Patch 22 / Issue with SQL Server & open statement?

    ROCKETEER
    Posted 07-10-2019 14:29

    If I see it correctly then you've defined the $HDB path like this in the ASN:

    $HDB = MSS:HIS2017E:?|?|?

    That's (strictly speaking) not correct. The path should either be defined like this:

    $HDB = MSS:?|?|?

    Or like this:

    $HDB = MSS:

    I've used the second notation and the open statement works correctly with both vanilla 9.7.05 and patch 022.

    Hope this helps.

    Daniel



  • 7.  RE: Patch 22 / Issue with SQL Server & open statement?

    Posted 07-10-2019 13:15

    Hi Joanne

    In you logfile, there is thsi line:
    28000 [Microsoft][SQL Server Native Client 11.0][SQL Server]Login failed for user 'JCDTEST\jroberson'.

    The OPEN does try to connect to the database, this is the good news
    So have a look at the SQL-Server Management Studio
     => SQL-Server-Agent
     => Error Logs
     => Current
    Are there any login attemps which are failed and what is the message?

    Next step: Check ODBC
    Are you using ODBC 32 or ODB64 and macth this your UnifAce installation?
    Open ODBC Source Addministration (client side)
    There you find a tab "tracing"
    Start tracing *) and the have a look into the trace file.
    *) Will not always start at first time, Relogin/reboot windows if necessary.

    Then ... I don't know 🙂

    Ingo



  • 8.  RE: Patch 22 / Issue with SQL Server & open statement?
    Best Answer

    PARTNER
    Posted 07-10-2019 17:29

    I have switched this over to a support call so I can send attachments.



  • 9.  RE: Patch 22 / Issue with SQL Server & open statement?

    ROCKETEER
    Posted 07-23-2019 11:34

    Support call has been answered in the meantime:

    The path specified in the ASN was incorrect, since the DatabaseName parameter included two question marks:

    > $HDB = MSS:?:?|?|?

    The correct notation is:

    > $HDB = MSS:?|?|?