If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Sybase > Delete failed

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-01-03, 09:17
murthi murthi is offline
Registered User
 
Join Date: Jan 2003
Location: chennai`
Posts: 9
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
Reply With Quote
  #2 (permalink)  
Old 03-02-03, 07:55
osy45 osy45 is offline
Registered User
 
Join Date: Nov 2002
Posts: 833
did you check the ase servers' error log ?
did you commit the transaction?
Reply With Quote
  #3 (permalink)  
Old 03-02-03, 23:55
murthi murthi is offline
Registered User
 
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
Reply With Quote
  #4 (permalink)  
Old 03-03-03, 01:05
osy45 osy45 is offline
Registered User
 
Join Date: Nov 2002
Posts: 833
Quote:
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
...
Reply With Quote
  #5 (permalink)  
Old 03-03-03, 11:02
jgwilding jgwilding is offline
Registered User
 
Join Date: Feb 2003
Posts: 6
Re: Delete failed

Quote:
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
Reply With Quote
  #6 (permalink)  
Old 03-04-03, 01:33
murthi murthi is offline
Registered User
 
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
Reply With Quote
  #7 (permalink)  
Old 03-04-03, 06:20
osy45 osy45 is offline
Registered User
 
Join Date: Nov 2002
Posts: 833
Quote:
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
Reply With Quote
  #8 (permalink)  
Old 03-05-03, 01:27
murthi murthi is offline
Registered User
 
Join Date: Jan 2003
Location: chennai`
Posts: 9
Hi osy45,

Thank you and appreciate all your help.


Dakshin
Reply With Quote
  #9 (permalink)  
Old 03-05-03, 02:07
murthi murthi is offline
Registered User
 
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,
Reply With Quote
  #10 (permalink)  
Old 03-05-03, 13:26
svelasco svelasco is offline
Registered User
 
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
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On