Results 1 to 7 of 7
  1. #1
    Join Date
    Aug 2004
    Posts
    20

    Unanswered: Data integrity problem accessing through Linked Server

    Hi,

    I have defined a Pervasive.SQL 2000i as a Linked Server to a SQL Server 7.0 Database.

    I have used the following Linked Server definition:

    Provider Name: Microsoft OLE DB Provider for ODBC Drivers
    Linked Server: <my linked server, e.g. LINKED_SAMPLE>
    Product name: Pervasive.SQL 2000i
    Data Source: <ODBC DSN, e.g. SAMPLE_DB>
    Location: <server location, e.g. SERVER01>

    Note: I am using Microsoft OLE DB Provider for ODBC Drivers instead of PervasiveOLEDB. Because as advised by Mirtheil, that PervasiveOLEDB (in Pervasive.SQL 2000i) does not work with Linked Server, and he's right . See my other post Pervasive DB as Linked Server to SQL Server

    The above settings is fine because I can see all the tables in SAMPLE_DB. But when I try to do a SELECT through Query Analyzer, e.g.

    Code:
    SELECT * FROM [LINKED_SAMPLE].[CATALOG_NAME]..[Table 01]
    I get the following error code:

    Code:
    Server: Msg 7347, Level 16, State 1, Line 1
    OLE DB provider 'MSDASQL' returned an unexpected data length for the fixed-length column '[LINKED_SAMPLE].[CATALOG_NAME]..[Table 01].Col01'. The expected data length is 4, while the returned data length is 0.
    I think, [Table 01] is corrupted. But, I can perform an Export through SQL Enterprise Manager or Pervasive Control Center with no problem. Is there a way to correct this problem so that I can query the table through Linked Server?

    _msd_

  2. #2
    Join Date
    Dec 2001
    Posts
    1,109
    Provided Answers: 4
    First, does the database pass a Database Consistency check? What is the data type of the Col01?
    Mirtheil Software
    Certified Pervasive Developer
    Certified Pervasive Technician
    Custom Btrieve/VB development
    http://www.mirtheil.com
    I do not answer questions by email. Please post on the forum.

  3. #3
    Join Date
    Aug 2004
    Posts
    20
    Hello Mirtheil,

    Data type of Col01 is char(4) and it is a member of a compound index keys, and it is usually the first column on the index keys.

    Unfortunately, [Table 01] does not pass the Consistency Check. It's a pretty old database and it has been converted a number of times (even before my time), and the data structure had been modified a number of times as well.

    I am not really a newbie in db parlance but I am in Pervasive/Btrieve case. That is, I am more of a microsoft user/developer -- SQL Server, Access, and even the old school Clipper, XBase... So, I may have to ask you how do you fix an inconsistent table (or even database)?

    I have very little control with the DDF's and file definitions. But with your help, I may be able to raise this point to the people who does. And, have them fix it.

    Thanks again for your input.

    _msd_

  4. #4
    Join Date
    Dec 2001
    Posts
    1,109
    Provided Answers: 4
    As far as fixing it, I would need to see the output from the DBCheck to say what's involved.
    Normally, I would first suggest going to the vendor for updated DDFs but that's not always possible.
    Mirtheil Software
    Certified Pervasive Developer
    Certified Pervasive Technician
    Custom Btrieve/VB development
    http://www.mirtheil.com
    I do not answer questions by email. Please post on the forum.

  5. #5
    Join Date
    Aug 2004
    Posts
    20
    Sample error I got is:

    Table 01 Index Length Inconsistency.
    The dictionary index 0 seg 0 indicates 4 (Column = 'Col01')
    The data file index 0 seg 0 indicates 10
    I also have another error when running against another database on the network. Half way through the checking process, an error message/dialog box pops and stops the process with the following error:

    Error while running Wizard.

    Detailed description:
    The server threw an exception.
    (0x80010105)
    Looks like a COM error. But I don't know what it is.

    Any thoughts on those errors?

    _msd_

  6. #6
    Join Date
    Dec 2001
    Posts
    1,109
    Provided Answers: 4
    Only time I've seen that exception was on a NetWare box where MKC.NLM wasn't registered properly. What OS is the Pervasive engine running on? If it's NetWare, is there anything on the console and/or the PVSW.LOG? If it's Windows, is there anything in the PVSW.LOG?
    Mirtheil Software
    Certified Pervasive Developer
    Certified Pervasive Technician
    Custom Btrieve/VB development
    http://www.mirtheil.com
    I do not answer questions by email. Please post on the forum.

  7. #7
    Join Date
    Aug 2004
    Posts
    20
    All environment are running Windows OS.

    Client: Where I run the PCC and Wizard -- XP
    Server1: Contains development data -- NT 4.0 Server
    Server2: Contains (user acceptance) test data -- 2000 Server
    Server3: Contains production data -- 2000 Server

    If I run the Consistency Check wizard against Server01, it seem to run fine. That is it proceeds okey and reports the 'inconsistencies' if it find any like the one I posted.

    However, if I run against Server2 or Server3, the wizard seem to throw an exception. Hence not able to proceed with checking process. I don't really know how to interpret the PVSW.LOG, here is the partial log from the time I started my PC up until I runned a Consistency Check on one of the tables in Server2.

    11-09-2004 09:00:47 W3COMSRV 00000194 NTDBSMGR.EXE W04932-2K05SW E WinSock socket() error=10047.
    11-09-2004 09:00:47 NTMKDE 00000194 NTDBSMGR.EXE W04932-2K05SW I Error initializing the SPX protocol. Error code: 11.
    11-09-2004 11:53:10 NTMKDE 00000194 NTDBSMGR.EXE W04932-2K05SW I Resources allocated
    11-09-2004 11:53:47 W3UPI224 000005D8 SW\Bin\Pcc.exe" W04932-2K05SW I Btrieve server not found. PNSL open session by name returned status = 3105.
    11-09-2004 11:54:13 W3UPI224 000005D8 SW\Bin\Pcc.exe" W04932-2K05SW I Btrieve server not found. PNSL open session by name returned status = 3105.
    11-09-2004 11:54:39 W3UPI224 000005D8 SW\Bin\Pcc.exe" W04932-2K05SW I Btrieve server not found. PNSL open session by name returned status = 3105.
    11-09-2004 11:55:05 W3UPI224 000005D8 SW\Bin\Pcc.exe" W04932-2K05SW I Btrieve server not found. PNSL open session by name returned status = 3105.
    I can see that there is a Winsock error in starting W3COMSRV (NTDBSMGR.EXE) service and another error with NTMKDE (NTDBSMGR.EXE).

    How do you interpret those errors and how to fix them? It seem like there is a configuration problem in my Network protocol setup.

    _msd_

Posting Permissions

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