Simulating Database Corruption

Any one have any reliable methods of simulating database corruption? (I know, use SQL Server.) I want to test various methods of monitoring for both physical and logical corruption.
I have used tried using dd but I can't see a way to just corrupt a specific block without truncating the file so I end up overwriting most of the data file which has its uses, but isn't a good test.
Logical corruption is more tricky. Any one know any good tricks that would let end up with a mismatch between index and table rows etc.
Thanks in advance.

There are so many websites/blogs that share similar informations.
Then you don't need mine and you (i.e., one) needn't keep linking to them.
I don't know why its only you who has problems.
I suspect you don't have much of an idea of what is going on in regards to my material and its accessibility. We'll leave it there, then, with me pausing just long enough to point out that it is not my problem if I choose to remove all access to my material. The problem is rather with those who think linking to it is a particularly useful or sensible thing to do.

Similar Messages

  • Trying to install Photo Shop CS3 Extended on Windows 8 and keep getting database corrupted

    Hi, I am trying to install my Adobe Photoshop CS3 Extended on my new Windows 8 OS 64 Bit computer. The CD does not have a scratch on it, it is like new. I get the error database is corrupted. Contact Adobe Support.
    I went to the Adobe website and downloaded the updated installer, same error. I tried running the installer in Windows XP compatibility mode, it looks like it installed, but when I run I get database corrupted.
    I could really use some help.

    Error "...Installer Database is Corrupt..." when you install Adobe Creative Suite 3 products

  • Zenworksd Database Corrupt

    A while back I had a problem with the Zenworks database starting on a NW6
    SP5 server running Zen 6.5 SP2. I was told to copy the database off to a
    PC and then back to the sever. This worked great and I was able to
    restart the database and continue on. Since then I have had this happen
    twice more on the same server. Completing the above process appears to
    fix the problem but it continues to come back. Yesterday I had the same
    problem on another server. I might add that these server are at
    different schools and have no phyicial connection to each other.
    How can I resolve this permanetly?
    Thanks,
    Coy

    All,
    I followed the TID Shaun listed and copied the Zenworks folder off and
    then pasted it back. I when through each database files and right
    clicked and checked do not compress. The error occurred again. This
    time I went in through NRM and set the Don't Compress setting for each
    files including the NAL.DB file. In the 2 days since I did that I
    haven't received a database corruption error.
    I am not sure if I am doing this correctly, is there another place to set
    do not compress?
    Thanks for your help,
    Coy
    > ensure that the database does not get compressed is one option
    > http://www.novell.com/support/search.do?
    cmd=displayKC&docType=kc&externalId=10075966&slice Id=&dialogID=8172969&sta
    teId=0%200%208180432
    >
    > --
    >
    > Shaun Pond
    >
    >

  • Logical names lost after database corruption removal

    Hi,
    I am working on a PXI based project using NI 5663 and NI 5673. The MAX database in system got corrupted recently due to power cut.
    I did a database corruption removal and the only issue I face now is that there are no logical names for the devices. I am following the steps from the site below to create the same –
    http://www.ni.com/white-paper/4594/en
    But after I create a new logical name say for the LO 5652 (associated with 5663), I do not know which driver session to associate with it.
    There are driver sessions for niFGen, ni5450 in the list but no session for 5663 or 5673.
    Could someone please help me out with creating logical names and associating them to the devices?
    Thanks so much,
    Sharmi 

    Hello,
    To configure your 5663, you can refer to the RF Vector Signal Analyizer Getting Started Guide pages 37 - 39.
    You should open Measurement & Automation Explorer and rename the devices such as VSA_LO, VSA_DC, VSA_DIG for the local oscillator, downconverter and digitzer respectively. Next you will need to associate the downconverter with the local oscillator and digitizer by right clicking the downconverter and selecting properties
    To configure the 5673 the steps will be fairly identical, rename the devices if you wish and then associate the upconverter (IQ Vector Modulator) with the arbitrary waveform generator and the local oscillator. You can also refer to the RF Signal Generator Getting Started Guide on pages 23 - 24.
    Which programming language are you using the VSA and VSG with? You normally wouldn't need to configure any IVI sessions the the devices. The only configuration normally is just associating the upconverter or downconverting with the LO or digitizer/AWG module.
    Anthony F.
    Product Marketing Engineer
    National Instruments

  • CS4 Web Premium Installation "Installer Database Corrupt.  Contact Adobe Customer Service."

    I need help. 
    I just purchased a HP Envy 23 running Windows 8.  It came with Adobe Premiere and Elements 11 already installed.
    I own Lightroom 3, which I installed very quickly and easily.
    I own CS4 Web Premium with the serial number at hand.  I insert the disk 1 to install and the error message appears: "Installer Database Corrupt. Contact Adobe Customer Service."  After serveral attempts, I resort to researching on this forum. 
    In the forum, found here: http://forums.adobe.com/thread/1238032 I was asked to go the linked website and download and specifically follow the instructions to install CS4 from the internet.  I did what I was told as closely as possible. 
    I received the same error message: "Installer Database Corrupt."
    I asked if I needed to uninstall Elements 11 before trying to install CS4 but haven't received a response.  Actually, now Adobe won't let me sign on with my password and when I request for a new one it doesn't send me a confirmation email so I have resorted to making a new username.
    I called Adobe about the issue with the error and was directed back here to the forum because they do not have phone service support for CS2, CS3, CS4, or CS5 because it is "old" technology.  I am loosing lots of work time because I can't seem to get a quick response to my questions here on the forum.
    I found another forum saying that I need to rename the file "caps.db." to "xcaps.db" and it will install just fine.  I did what it said, looking for any and every folder in both premiere and elements to rename anything that began with "caps"  After doing so, I still got the error message.
    What I need to know is:
    1. How can I install CS4 Web Premium either by disk or internet without getting an error.
    2. Must I totally uninstall Elements and Premiere to get CS4 installed?  I really don't want to do that since I paid for them with the purchase of my computer. 
    I'd really like some answers.  Thanks.

    You're going to need to be more specific about what I am supposed to do because I'm very unfamiliar with computer lingo.  I don't know what an OEM is and I am unsure about these backup disks you are referring to.  The expertise on this forum is the only lifeline I have to fixing this Adobe issue so I really want to try my best here to get things resolved.  I've not heard of deleting caps.db and haven't heard of anything to do with medai.db files before.  I'm supposed to delete these instead of renaming caps?

  • Moved to Server 2012 getting Access Database Corruption

    We moved our company file shares to a new Windows 2012 server and are now having issues with Access databases becoming corrupted when accessed by multiple clients at the same time.  Does anyone have any ideas on what could be causing this?  We
    were not having any issues with this on the 2008 or 2003 servers these were on previously.

    We migrated from a Windows 2008 file server cluster with four nodes to a Windows 2012 R2 file cluster with two nodes. 
    After the migration to the new file server cluster our customers running Windows 7 SP1 started reporting Access Database corruption and slow file access. 
    However, if the SAME Access Database file was hosted on a Windows 2012 R2 file server NOT in a cluster there was no corruption. 
    I will not bore you with all the tests we ran while trying to determine the cause but here is what we did to fix the issue.
     The solution was provided via an open case with Microsoft.
    1. Create the following registry entries on all Windows 2012 R2 Servers in the new file server CLUSTER and reboot.
    Key:  HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\lanmanserver\parameters
    Value:  DisableLeasing
    Type:  DWORD
    Data:  0x1

  • Foolproofing database corruption

    Hi All,
    How do we fool proof database corruption from happening. Does Essbase have any real time hot backups that can be implemented? What can be done here to get some real time backups?
    I am more interested in prevention as well as immediate restore features.
    I am aware that database corruption could be due to many reasons a few common ones are Memory read error, Disk space Shortage, out of memory and crash, locked file interference, broken sectors on the disk, last but not least software defects and we cannot be ascertained to one entity.
    Thanks

    Hot backups - not natively (see below).
    Backups in general - although a level 0 backup will do for many people, I much prefer to do a full image backup on any relatively small databases (less than 10 Gigs). The reasons are several and vary, here are two of the more prominent ones (there are a few more subtle ones):
    1) It's not about the disk/tape space, it's about the recovery time in an emergency. A full image database restores in minutes for whatever reason.
    2) Some times, a level 0 export is not enough (think of: restated history issues where the totals are not to be recalculated after the reporting period).
    Prevention - Here are a few guidelines, which may each trigger others:
    - Separate your OS, Backup, and Essbase drives
    - Don't let the tape backup software anywhere near your essbase app directory (goes with above)
    - Insist on dedicated I/O (don't let IS/IT sell you on a shared NAS solution)
    - Don't give calculate rights to the users blindly
    - If your server uses a dual/redundant power supply, hook ONE of them into a good UPS (the other to a different/independent UPS or to grid power)
    - (Windows specific): Run essbase as a service instead of using a user account
    If you want to set up a fairly decent disk recovery process, consider the use of a VM/VHD for the essbase data, they can be configured to generate real time disk images fairly easy without extreme expense. If you want to go about this the "correct" way, ensure you use a good RAID configuration -- the more spindles in use, the more efficient it will be over all for a specific RAID configuration (i.e. RAID 5 beats RAID 1 for performance on more than 6 drives or so, with "realistic" redundancy/reliability).

  • E63 Media Database corruption

    On opening Media->Gallery, I always get a annoying message that "Database corrupted: Some data might have been lost".
    I don't store any songs/video there. Only once used camera.
    Will camera corrupts media database while storing images ? 
    I use latest firmware 200.21.012. I have installed following applications Nokia maps, Google Search and Google maps. When those applications where installed in memory card, I used to get error like "Memory card corrupted". Now, I reinstalled them into phone memory.
    Anyone knows solution for this ? I am planning to try soft reset after backing data.

    Just don't install programs or applications on the memorycard. Insert the card IN the phone and NOT on a PC or Mac to format. Remove the card by pressing the red button and choose remove card from the dialog option. If you insert the card later you should hear a short bleep.
    ‡Thank you for hitting the Blue/Green Star button‡
    N8-00 RM 596 V:111.030.0609; E71-1(05) RM 346 V: 500.21.009

  • Installer Database Corrupt Error

    I'm trying to install CS4 Design Premium on my Windows 8 desktop.  I keep getting a "Installer Database is corrupt" error.  Help!

    http://helpx.adobe.com/creative-suite/kb/error-installer-database-corrupt-install.html

  • Directory Server 6.2 - Possible Database Corruption

    We have become aware of a bug in Directory Server 6.2 only that could cause database corruption. We have a hotfix for this issue, and if you are running Directory Server 6.2 and run into this problem then you should contact Sun Support and ask for the fix for the following bug
    6642430: DB corruption (zero’d pages) when performing db2ldif against large 20GB ldif file.
    The sunsolve record for this bug can be found at [http://sunsolve.sun.com/search/document.do?assetkey=1-1-6642430-1].
    NOTE: This issue does not affect Directory Server 6.0 or 6.1 release so you only need this fix if you are running Directory Server 6.2.
    After you have the hotfix for this issue on Directory Server 6.2 and have applied the hotfix, then you will have to re-initialize the database from an LDIF backup to fully correct the corruption issue. Simply applying the hotfix will not fix the database if the database is already corrupted. Database corruption can be present though not detected with data in binary formats. You must therefore rebuild the database by importing an LDIF backup.
    Directory Server Enterprise Edition 6.2 is no longer available for download and Directory Server Enterprise Edition 6.3, which includes a fix for this issue, will be available for download early April. When upgrading to Directory Server 6.3 from 6.2 (not needed if you are on 6.0 or 6.1), make sure you export the database (db2ldif) prior to the upgrade and then re-import the database after the upgrade to fully re-initialize the database and to ensure that no corruption issues remain.
    Recommended patch or upgrade procedures:
    <ol><li>     Shut down each directory server instance, as described in [Starting, Stopping, and Restarting a Directory Server Instance|http://docs.sun.com/app/docs/doc/820-2491/6ne3dhd8u?a=view#bcaan].
    </li>
    <li>     Perform an LDIF export of the database, as described in [Backing Up to LDIF|http://docs.sun.com/app/docs/doc/820-2491/6ne3dhdio?a=view#ganwh].
    </li>
    <li>     Install the [hotfix for bug 6642430|http://sunsolve.sun.com/search/document.do?assetkey=1-1-6642430-1] on Directory Server 6.2, or upgrade your Directory Server 6.2 instance to Directory Server 6.3 once Directory Server 6.3 is available for download (early April). You will need to login to Sunsolve in order to
         see this bug description.
    </li>
    <li>     Re-initialize the database from the LDIF exported in step 2, as described in [Importing Data From an LDIF File|http://docs.sun.com/app/docs/doc/820-2491/6ne3dhdj4?a=view#ganwc].
         If you are running replicated instances of Directory Server, make sure you read [Restoring Replicated Suffixes|http://docs.sun.com/app/docs/doc/820-2491/6ne3dhdjc?a=view#bcajf] as well.
    </li>
    </ol>
    Edited by: KevinLeMay on Mar 28, 2008 4:48 AM

    The entry was not imported most likely because it's parent isn't in the database yet. Are entries above this in another backend ? If so try importing that backend first. Also, that dn is so long, that it exhausted the buffer which is used to write messages in the access log. This is why, there's nothing after "which".
    What is the exact reason why a export and import is necessary? Or is it only necessary if
    the database is already corrupt? Is there a way to check that?The database corruption could be silent. So a binary backup/restore when going from 6.2 to 6.3 is not recommended and the LDIF route must be used.

  • Indesign CS3 Installer Database Corrupt? (Now what w/Win 8.1)

    I have tried to install CS3 from my CD and from a direct download off Adobe and get this same message: Installer database corrupt.
    Does CS3 not run on Windows 8.1? Any ideas on how I can make this work?
    Thanks for your time.

    If Bob says so, I'm sure he's right. I know we had a problem running the installer for the downloaded files and needed specific directions for that. Additionally, I believe that Acrobat 8 was not supported by Win 7 and we did get that working properly too.

  • Database Corrupted / File Corruption

    EDIT: I just realized that this may be in the wrong forum section, sorry if it is. Hmm, I wouldn't actually know which section it was supposed to go under anyway, lol
    I have a problem with my Nokia N95 8GB. Yesterday, I noticed that the image & video browser was saying that there was "no images or videos" available to display. In addition, Y-Browser was refusing to load, saying "unable to execute file for security reasons". I didn't know what was wrong and restarted the phone. After it started up I loaded the image/video browser again and was given a message about a corrupted database and told I may have lost some data. (if the exact error message is important, I'll look it up)
    Last night, I taken a backup of my phone with PC Suite and synchronized contacts, which seemed to go smoothly. I assume that this will have backed up all of the phone required settings including message centre numbers and any other settings that would have been customized by my network (o2) via a setup sms when I first bought it. (Basically, I have no idea what is backed up within the "Phone model specific" section of the backup.) If there is anything that wouldn't ahve been backed up then could someone let me know so I can do so before formatting etc?
    Q: I couldn't find any information about backing up the calendar events - are they excluded?
    Today, I have noticed that MobiTubia has disappeared from the Applications menu. I haven't checked all custom software I have installed to see if it is still available/working, but at least two applications are having trouble, so I don't feel that I need to in order to prove something is wrong. hehe
    The phone itself still "works" - it boots up ok, seems to have all contacts (the sync I performed didn't say that any contacts had been removed from the phone, just added new ones into windows address book), the calendar events still show and the alarm still works (phew - used it for work this morning), but I still can't get anything to show up in the image/video browser and I suspect that there may be some storage device and/or FAT corruption.
    My plan at the moment is to make sure that there's nothing else I need to back up or write down, check the storage medium for errors, do a factory reset (holding call/green, * and 3 to restore the software/firmware from backup) and then restor the backup(s). I'm assuming that Windows scandisk/checkdisk would be okay for this purpose - for the E drive, at least. (Although now I'm thinking about it, the nokia software may have a utility for this, I'll look that up later)
    So, I'm wondering;
    1. Would there be anything further that I sould back up or write down?
    2. Am I right in thinking that scandisk/checkdisk is okay for scanning the E drive?
    3. How can I scan the phone's C drive for errors?
    I may possibly answer #3 myself when searching for options in the Nokia software
    Thanks in advance for any help/replies.
    Message Edited by sim99 on 16-Jul-2009 12:02 PM

    Hi,
    Run an rman backup on file 4 and it should clean itself up.
    Cheers,
    Rich

  • InfoStore is missing Indexes, database corrupt

    Recently, we added two new Crystal users to our AD domain. Following the usual procedure, we went into the Crystal Management Console to add them to Crystal. (We go to Authentication, then the "Windows AD" tab and click the "update" button.)
    We were prompted with the Error:
    Error updating Windows AD authentication properties: The object already exists in the collection
    After opening a case with SAP, we discovered our Information Store (CMS_InfoObjects5) is missing all of the Indexes, including the one that constrains the "ObjectID' to a unique field. After inspecting the database, we determined there are many duplicate "ObjectIDs". It looks like we have duplicate users (Administrator, Guest and some others) and some other duplicate objects (I think these may be reports, it is impossible to tell since the columns contain binary data). (This explains the error message above!)
    We have about 200 reports configured in this Information Store/DB with various permissions assigned to each report. It would be a huge undertaking to rebuild the DB manually.
    Can anyone recommend a way to recover from this? I have tried the following scenario:
    Created a new/empty Information Store and copied all the records from the corrupt database to this new store. For the records that were duplicated I copied over all the "older" (based on the modifieddate field) duplicates and left out the "newer" ones. We then pointed our CMS to this databse and after going into Authentication then "Windows AD" tab, we were still unable to do an "Update". (It wasn't the same error, it was a new one but I forgot what the exact error was).
    Next, I did the exact same thing, but this time I copied all of the "newer" records from the existing/corrupt database to this new/empty database. This time, I can't even login. I get an error message about not being able to load the authentication plug in. I get this message if I try to log using "Windows AD" or "Enterprise".
    I am not sure what to do next. I decided to try using the SDK to pull out a list of all of the reports and permissions from our current DB and from our backup DB (from a few months ago, before all of the indexes disappeared). I decided we could go back to that version of the database (the backup) if I had a list of all the new reports and permissions. (We could update those manually to get the backup DB in sync with our current data). Although, I am unable to get the SDK or any of the sample code to work. I ran into various problems such as: The sample code seems to be written for Visual Studio 2003 and .Net 2.0 and I can't get it to compile. So, I inspected the code and pulled out some of the SQL commands and tried running the queries directly, but realized the table names are different. The sample code expects a table name of "CI_INFOOBJECTS", but that table doesn't exist in our database. We do have "CMS_InfoObjects5", but it has a different schema from the "CI_INFOOBJECTS". This is so frustrating!!!
    Even though the existing DB/InfoStore is corrupt (well, not really corrupt, but it is missing all of the indexes and therefore the proper constraints and therefore we can't add new users), the server still "works". All permissions/reports/users are in tact, we just can't add any new users. (We can add reports and assign permissions properly though.)
    I suppose I need to open our case back up with SAP, but first I wanted to get some opinions from folks here on the forum.
    Any ideas? How would you approach this problem?

    No, I haven;t but I did consider it.
    I wonder if it will stop when it comes across the duplicate entries, or if it will just skip them? Anyone?

  • I've got an iMac with database corruption found in the DB.. What happens if I rebuild the DB, an option the Database Utility is giving me? Will it wipe out my files or will they be protected?

    Hi all,
    I've been having issues with my iMac, particularly with the Office:Mac Suite.  I took it to the Genius Bar and they confirmed there was some corruption and decided the best thing would be to transfer all my files to the external hard drive I had brought with me.  After the transfer, they completely wiped all apps off the computer, then reloaded them.  They then reloaded my data from the external hard drive back to the computer hard drive. I reloaded the Office mac 2008 Suite when I got home.  Since then I have hooked up the external hard drive back to the computer (it's my time machine) and all is well, except, when I open any of the programs on the Office: Mac suite, I get the following message:
    There is a problem with the Office database
    Office might be unable to access the database or the database files might be damaged.  Without the database, you might beunable to use the Address Book, Scrapbook. and other features that store your personal information
    To rebuild the database, open Microsoft Office 2008/Office, and then open the Microsoft Databse Utility.  For more information, open the Database Utility application, and on the Help menu, click Database Utility Help.
    I did this and it gives me the option of rebuilding the DB but it gives no indication if there is danger of losing all my files.  Does anybody else know what will happen?  Is there another solution?  Should I simply reload the Office: Mac suite again?
    Help!
    Tami

    Copy your DB to the internal hard drive and then run the rebuilder.
    It might be the in the process of reinstalling Office the copy protection file was removed and thus you need to revalidate or something also.
    https://discussions.apple.com/community/notebooks/macbook_pro?view=documents

  • Binary Values unreadable - Database corrupt?

    Hi,
    I'm experiencing a really weird problem here, I have a table with some varchar columns and two binary columns. What I do now, is to select data from it via Python with the following select statement:
    select * from torder where customerid=1624 order by torderid desc
    What happens is, that only for this customerid some binary data is missing, they contain an empty string. If I do the select like this:
    select * from torder where customerid=1624 order by torderid
    It does work, the data is there. With this, it works too:
    select * from torder order by torderid desc
    So it seems, the combination of "customerid=1624" and "desc" somehow corrupts the results.
    What's furthermore interesting is, that when I delete the last inserted row of the result, it works, and if I add a new one, it's broken again.
    I could not check if the error is Python-related or not, as I found no way to retrieve/display the binary data in sqlcli, as it displays only something like 0x8002637A6F70652E6931 , but I doubt that this has something to do with Python.
    Any clues of how to fix this?
    My database version is Kernel    7.6.06   Build 003-121-202-135 | X32/LINUX 7.6.06   Build 003-121-20
    2-135
    Previously, I had 7.6.03 and updated it to the above version, hoping that this would fix the problem, but it did not.
    Best Regards,
    Hermann Himmelbauer

    Ok, first many thanks for your quick reply. I did not answer at first as the problem magically went away. But unfortunately the problem is back today.
    <p/>
    The DDL statements look the following, there are no indexes on the table:
    <p/>
    <pre>
    CREATE TABLE torder (
            torderid INTEGER NOT NULL DEFAULT SERIAL,
            creation_date TIMESTAMP,
            transfer_date TIMESTAMP,
            signed_date TIMESTAMP,
            signed_with VARCHAR(3) CHECK (signed_with in ('TAN', 'BKU', 'MAN') OR signed_with IS NULL),
            revocation_date TIMESTAMP,
            done_date TIMESTAMP,
            formdata LONG BYTE NOT NULL,
            trans_function VARCHAR(30) NOT NULL CHECK (trans_function in ('do_bank_transfer', 'do_bank_collection',
                                    'do_cheque_transfer', 'do_cash', 'do_cashdraw')),
            trans_type VARCHAR(30) NOT NULL CHECK (trans_type in ('national','sepa','international')),
            applet_location VARCHAR(35),
            errors_text VARCHAR(100),
            errors LONG BYTE,
            customerid INTEGER,
            dbuserid INTEGER,
            torder_periodicid INTEGER,
            PRIMARY KEY (torderid),
             FOREIGN KEY(customerid) REFERENCES kunde (kundeid),
             FOREIGN KEY(dbuserid) REFERENCES dbuser (dbuserid),
             FOREIGN KEY(torder_periodicid) REFERENCES torder_periodic (torder_periodicid)
    </pre>
    <p/>
    The insert statements look the following (They are copied out of the SQLAlchemy SQL log), one can see that the binary values are inserted here:
    <p/>
    <pre>
    INFO:sqlalchemy.engine.base.Engine.0x...d110:INSERT INTO torder (creation_date, transfer_date, signed_date, si
    gned_with, revocation_date, done_date, formdata, trans_function, trans_type, applet_location, errors_text, err
    ors, customerid, dbuserid, torder_periodicid) VALUES (now(), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
    INFO:sqlalchemy.engine.base.Engine.0x...d110:['20091027113506345604', None, None, None, None, '\x80\x02}q\x01(
    U\x0bcharges_forq\x02U\x04bothq\x03U\x05dcodeq\x04U\x0588888q\x05U\x0ccurrency_isoq\x06U\x03EURq\x07U\x06valut
    aq\x08K\x00U\x11foreign_acc_name1q\tU\x11Foreign Account 2q\nU\x0cacc_payer_noq\x0bX\t\x00\x00\x00999111110q\x
    0cU\ttextlinesq\r]q\x0e(U\x0c1st transferq\x0fU\tMultilineq\x10U\x0bFor testingq\x11eU\x06amountq\x12cdecimal\
    nDecimal\nq\x13U\x071000.00\x85Rq\x14U\x0cacc_benef_noq\x15X\t\x00\x00\x00888111110q\x16U\x11foreign_acc_name2
    q\x17U\x0bfor Testingq\x18u.', 'do_bank_transfer', 'national', 'url:test_transfer', None, None, None, None, No
    ne]
    </pre>
    <p/>
    All rows are inserted with binary data, so it's never NULL and it's also never set to an empty string ('').
    <p/>
    But when reading back the rows, some binary values are an empty string.
    <p/>
    The following Python code illustrates the problem:
    <pre>
    import sapdb.dbapi
    def true_false_result(result):
        if result:
            return 'Bug begins'
        else:
            return 'Bug ends'
    def check_bincols(bdb, sqlcmd):
        print "----
        print "QUERY: %s" % sqlcmd
        print "----
        bdbc = bdb.cursor()
        bdbe = bdbc.execute(sqlcmd)
        bug_occured = False
        stored_bin_result = False
        while 1:
            row = bdbe.fetchone()
            if row is None:
                break
    Now check if the binary data results to an empty string,
    This should never happen (= the database bug)
            bin_result = (row[7]() == '')
            if bin_result != stored_bin_result:
                bug_occured = True
                print "Toggle to %s at torderid %s" % (
                    true_false_result(bin_result),
                    row[0])
                stored_bin_result = bin_result
        if not bug_occured:
            print "No Bug for this query"
        bdbe.close()
        bdbc.close()
    #bdb.close()
    if __name__ == '__main__':
        bdb = sapdb.dbapi.connect('USER', 'PASS', 'DBNAME', 'LOCALHOST')
    First try the original query, which results in a bug
        sqlcmd = 'select * from torder where customerid=1624 order by torderid desc'
        check_bincols(bdb, sqlcmd)
    This query normally is bugfree
        sqlcmd = 'select * from torder where customerid=1624 order by torderid'
        check_bincols(bdb, sqlcmd)
    This query has a bug, too
        sqlcmd = 'select * from torder order by torderid desc'
        check_bincols(bdb, sqlcmd)
    But this one not
        sqlcmd = 'select * from torder order by torderid'
        check_bincols(bdb, sqlcmd)
    This triggers the bug, too, which is curious as there's practically no ordering
        sqlcmd = 'select * from torder where customerid=1624 order by customerid desc'
        check_bincols(bdb, sqlcmd)
    So, it seems that the bug occurs only when using "DESC" for descending
    ordering.
    </pre>
    <p/>
    The output of this program is:
    <p/>
    <pre>
    QUERY: select * from torder where customerid=1624 order by torderid desc
    Toggle to Bug begins at torderid 1355
    Toggle to Bug ends at torderid 582
    QUERY: select * from torder where customerid=1624 order by torderid
    No Bug for this query
    QUERY: select * from torder order by torderid desc
    No Bug for this query
    QUERY: select * from torder order by torderid
    No Bug for this query
    QUERY: select * from torder where customerid=1624 order by customerid desc
    Toggle to Bug begins at torderid 1355
    Toggle to Bug ends at torderid 582
    </pre>
    <p/>
    So, it can be seen that the problem occurs ONLY when using descending ordering. Moreover it's interesting that the result for "select * from torder order by torderid desc" is sometimes buggy, sometimes not, which seems to be related if someone inserted some more rows or not. What's furthermore interesting is the last query, as there the order is applied to "customerid", which is the very same for every row, so there is no ordering and the bug occurs here, too.
    <p/>
    All this happens on my production instance. I have a testing environment, where I imported the very same data set (same database version etc.) and there is no such problem (for now), so it's quite complicated to nail down the problem further as I cannot easily disrupt the availability of the production instance.
    <p/>
    All I could do for now is not to use the "DESC" command and reorder the data in my application, but that is really suboptimal as I have to keep all results in memory.
    <p/>
    Any help is really appreciated!
    <p/>
    Best Regards,<BR>
    Hermann Himmelbauer
    <p>
    Update: I tried the same query with the following code with C++ / SQLDBC (I modified one of the SQLDBC examples):
    <p>
    <pre>
    First you have to include SQLDBC.h
    #include "SQLDBC.h"
    #include <stdio.h>
    typedef struct ConnectArgsT {
        char * username;
        char * password;
        char * dbname;
        char * host;
    } ConnectArgsT;
    static void parseArgs (ConnectArgsT * connectArgs, int argc, char **argv);
    using namespace SQLDBC;
    Let start your program with a main function
    int main(int argc, char *argv[])
       ConnectArgsT connectArgs;
       parseArgs (&connectArgs, argc, argv);
       char errorText[200];
    Every application has to initialize the SQLDBC library by getting a
    reference to the ClientRuntime and calling the SQLDBC_Environment constructor.
       SQLDBC_IRuntime *runtime;
       runtime = SQLDBC::GetClientRuntime(errorText, sizeof(errorText));
       if (!runtime) {
         fprintf(stderr, "Getting instance of the ClientRuntime failed %s", errorText);
         return (1);
       SQLDBC_Environment env(runtime);
    Create a new connection object and open a session to the database.
       SQLDBC_Connection *conn = env.createConnection();
       SQLDBC_Retcode rc;
       rc = conn->connect(connectArgs.host, connectArgs.dbname,
                          connectArgs.username, connectArgs.password);
       if(SQLDBC_OK != rc) {
         fprintf(stderr, "Connecting to the database failed %s", conn->error().getErrorText());
         return (1);
       printf("Sucessfull connected to %s as user %s\n",
              connectArgs.dbname, connectArgs.username);
    Create a new statment object and execute it.
       SQLDBC_Statement *stmt = conn->createStatement();
       rc = stmt->execute("select * from torder where customerid=1624 order by torderid desc");
       if(SQLDBC_OK != rc) {
         fprintf(stderr, "Execution failed %s", stmt->error().getErrorText());
         return (1);
    Check if the SQL command return a resultset and get a result set object.
       SQLDBC_ResultSet *result;
       result = stmt->getResultSet();
       if(!result) {
         fprintf(stderr, "SQL command doesn't return a result set %s", stmt->error().getErrorText());
         return (1);
    Position the curors within the resultset by doing a fetch next call.
       while (1) {
         rc = result->next();
         if(SQLDBC_OK != rc) {
           break;
           //fprintf(stderr, "Error fetching data %s", stmt->error().getErrorText());
           //return (1);
         char szString[30];
         char szString1[3000];
         SQLDBC_Length ind;
    Get a string value from the column.
         rc = result->getObject(1, SQLDBC_HOSTTYPE_ASCII, szString, &ind, sizeof(szString));
         if(SQLDBC_OK != rc) {
           fprintf(stderr, "Error getObject %s", stmt->error().getErrorText());
           return (1);
         rc = result->getObject(8, SQLDBC_HOSTTYPE_ASCII, szString1, &ind, sizeof(szString1));
         if(SQLDBC_OK != rc) {
           fprintf(stderr, "Error getObject %s", stmt->error().getErrorText());
           return (1);
         printf("%s %s\n", szString, szString1);
    Finish your program with a returncode.
       return 0;
    static void parseArgs (ConnectArgsT * connectArgs, int argc, char **argv)
    setting defaults for demo database
        connectArgs->username = (char*)"USER";
        connectArgs->password = (char*)"PASS";
        connectArgs->dbname = (char*)"MYDB";
        connectArgs->host = (char*)"localhost";
    use values from command line
        if (argc > 4) {
            connectArgs->host = argv [4];
        if (argc > 3) {
            connectArgs->dbname = argv [3];
        if (argc > 2) {
            connectArgs->password = argv [2];
        if (argc > 1) {
            connectArgs->username = argv [1];
    </pre>
    <p/>
    This works!! So it seems, that the problem is related to the Python module, which is interesting, as adding "DESC" should not be any difference to it. I personally suspect that there are some memory leaks in the code, which result in this strange behavior.
    <p/>
    Any suggestions?<p/>
    Best Regards<br>
    Hermann Himmelbauer
    Edited by: Hermann Himmelbauer on Oct 28, 2009 12:51 PM
    Edited by: Hermann Himmelbauer on Oct 28, 2009 12:55 PM

Maybe you are looking for

  • Why such an ordeal to replace a modem? Why is the ...

    Have been browsing this forum the past couple of days and whilst my story is quite as horrific as some of the others that I've seen here, it's caused me no end of stress and inconvenience over the past week. Last Thursday (12/06/14) my BT Open Reach

  • Sql Devloper 4.0.0.13 - problems with displaying user data types

    Hi, I have installed new version of sqldeveloper and have discovered some problems with displaying user data types. The data that is described as VARCHAR2 are displayed with ‘???’. The problem persist in table view, script output and exported files.

  • Solaris 10 NFS performance on Linux running ws3 update 3

    Hope someone can help me sort out this problem. Dear Support. We are having a Solaris/Sparc file server running Solaris 10. The Solaris machine act as a NFS file server. We encounter very poor NFS performance when copying files to and from a filesyst

  • Counting how many times file is downloaded

    Hi, In my web application I need to set the limit say 10 times, a file can be downloaded by the user. After downloading 10 times I need to disable the download link. I am using javascript, ajax and spring framework and mysql . Problem is when the fil

  • PXI 4461 simultaneously read and generate

    I am using PXI 4461 card, which has 2 inputs and 2 outputs. I have a sequence, which will be loaded for multi UUT testing at the same time. I am trying to use AI0, AI1 to read the signals, which are generated by UUTs at the same time. One UUT can mea