Results 1 to 10 of 10

Thread: Delete failed

  1. #1
    Join Date
    Jan 2003
    Location
    chennai`
    Posts
    9

    Unanswered: Delete failed

    Hi All,

    We are using Sybase 11.9.2.3. The full version string:
    Adaptive Server Enterprise/11.9.2.3/1159/P/SWR 9220 ESD 3/Digital UNIX/OSF1 V4.

    Using ISQL, I am executing a delete statement for a record on a table.
    But the DELETE was failed.

    I would like to know the reason for the DELETE failure.
    Is there any Internal Log OR Sybase Log OR Message Log available in Sybase to know the reason for the failure?

    Any help would be highly appreciated.

    Thank you,
    Dakshin

  2. #2
    Join Date
    Nov 2002
    Posts
    833
    did you check the ase servers' error log ?
    did you commit the transaction?

  3. #3
    Join Date
    Jan 2003
    Location
    chennai`
    Posts
    9
    did you check the ase servers' error log ?

    I do not know where to see the "ase servers' error log".
    It is not available in "/usr/sybase/install" directory.
    What is the name of this "ase servers' error log"?

    did you commit the transaction?
    I committed the tranasction.

    Thank you,
    Murthi

  4. #4
    Join Date
    Nov 2002
    Posts
    833
    Originally posted by murthi
    did you check the ase servers' error log ?

    I do not know where to see the "ase servers' error log".
    It is not available in "/usr/sybase/install" directory.
    What is the name of this "ase servers' error log"?

    did you commit the transaction?
    I committed the tranasction.

    Thank you,
    Murthi
    the errorlog is by default named errorlog and is located in the install directory.
    But by installation it can be named to any other name & another location
    ...

  5. #5
    Join Date
    Feb 2003
    Posts
    6

    Re: Delete failed

    Originally posted by murthi
    Hi All,

    We are using Sybase 11.9.2.3. The full version string:
    Adaptive Server Enterprise/11.9.2.3/1159/P/SWR 9220 ESD 3/Digital UNIX/OSF1 V4.

    Using ISQL, I am executing a delete statement for a record on a table.
    But the DELETE was failed.

    I would like to know the reason for the DELETE failure.
    Is there any Internal Log OR Sybase Log OR Message Log available in Sybase to know the reason for the failure?

    Any help would be highly appreciated.

    Thank you,
    Dakshin


    Did you get an error message in isql, or did the delete just fail to remove the record(s) you expected: (0 rows affected) ?

    Can you post the delete command the fails?


    john

  6. #6
    Join Date
    Jan 2003
    Location
    chennai`
    Posts
    9
    Hi osy45,

    I do not find any errorlog in install directory.

    The output of "ps -ef" command display the sybase process as follows:

    "sybase 525572 0.1 37.1 608M 379M ?? R Dec 11 17:00:30 /usr/sybase/bin/dataserver -sCMMP1 -d/dev/rdisk/dsk9a -e/usr/sybase/install/CMMP1.log -M/usr/sybase"

    From this I found "CMMP1.log" is the Sybase error log file. Am I correct?

    Please confirm.

    Thank you,
    Dakshin

  7. #7
    Join Date
    Nov 2002
    Posts
    833
    Originally posted by murthi
    Hi osy45,

    I do not find any errorlog in install directory.

    The output of "ps -ef" command display the sybase process as follows:

    "sybase 525572 0.1 37.1 608M 379M ?? R Dec 11 17:00:30 /usr/sybase/bin/dataserver -sCMMP1 -d/dev/rdisk/dsk9a -e/usr/sybase/install/CMMP1.log -M/usr/sybase"

    From this I found "CMMP1.log" is the Sybase error log file. Am I correct?

    Please confirm.

    Thank you,
    Dakshin
    look into the file cmmp1.log for any error messages and post them
    for further assistance

    osy45

  8. #8
    Join Date
    Jan 2003
    Location
    chennai`
    Posts
    9
    Hi osy45,

    Thank you and appreciate all your help.


    Dakshin

  9. #9
    Join Date
    Jan 2003
    Location
    chennai`
    Posts
    9
    Hi osy45

    I had looked into the log file cmmp1.log and do not find any error messages related to the DELETE FAILURE problem. In fact I do not find any entry in that particular time window.

    As the severity associated to the delete problem is not greater than 18, not sure if such delete failures log information into this error log.

    So, where do I look for such delete failure.

    Thank you,

  10. #10
    Join Date
    Jun 2002
    Location
    Argentina
    Posts
    78
    Where find the error log?

    The easy way is to look into the startup script that you use to start the server. You must find the "-e" option. For example "-e/sybase/ASE-12_0/install/server.log".

    If you don't see nothing wrong, try this:

    select ...
    go
    delete ....
    go
    commit
    go
    select
    go

    If you still see your row, and the where clause use the primary key (sp_help table_name) then try to insert the row and see what happen.
    May be the table is corrupt and you don't get any message.

    USE base...
    go

    dbcc traceon(3604)
    go
    dbcc traceflags
    go

    dbcc checktable(<object_name>)
    go
    dbcc tablealloc(<object_name>, full, nofix)
    go
    dbcc indexalloc(<object_name>, 1, full, nofix)
    go

    and if you still don't find nothing try to see if the table heap is ok, with this:

    -- dbcc pglinkage (dbid, start_pg_num, number_pages, printopt, search_for, search_order)

    -- number_pages
    -- 0 check all pages
    --
    -- printopt
    -- 0 display only the number of pages checked
    -- 1 display the last 16 pages checked
    -- 2 display all the page numbers checked
    --
    -- search_order
    -- 0 follow previous page pointers
    -- 1 follow next page pointers

    -- dbcc pglinkage(<dbid>,<first page>,0,2,0,1)
    -- dbcc pglinkage(<dbid>,<last page>,0,2,0,0)
    SELECT "dbcc pglinkage ("+RTRIM(convert(varchar(12), db_id()))+", "+RTRIM(convert(varchar(12), sysindexes.first))+",0,2,0,1)"
    FROM sysobjects,
    sysindexes
    WHERE sysobjects.id = sysindexes.id
    AND sysobjects.name like "%<object_name>%"
    go

    I had troble with some tables that broke the link pages and keep ok the index. When I try to delete some row, nothing happen, but then when I try to insert again, I get a duplicate row. The trouble was that table lost a link in some pages. The trouble begin when I make a delete without where clause, and the table was migrate from previous versions, or when the programmers use Powerbuilder to move date with a refresh pipe.
    Bye bye

    Sebastian

Posting Permissions

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