Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 Cant alter table

Author  Topic 

sandesh_moghe
Constraint Violating Yak Guru

310 Posts

Posted - 2002-01-08 : 06:48:18
Hi,
I have created one table (say tbNew) with sa as user.
I have another user called DBMiner.
Now i have changed the owner of that table from sa to DBMiner (updating sysobjects table)
Here i am facing the proble.:
When i wish to alter this table (tbNew), it thows me error

 
'tbNew' table
- Unable to modify table.
ODBC error: [Microsoft][ODBC SQL Server Driver][SQL Server]'DF_tbNew_isDeleted' is not a constraint.
[Microsoft][ODBC SQL Server Driver][SQL Server]Could not drop constraint. See previous errors.


In this table isDeleted is a boolean field with 0 as default value.

Whats the reason? and what is the solution?

Thanx in advance

---------------------------
Sandesh - The Messanger

izaltsman
A custom title

1139 Posts

Posted - 2002-01-08 : 09:31:40
It is possible that 'DF_tbNew_isDeleted' is not a constraint, but a default object, bound to the table. In that case, in order to remove it, you are going to have to use sp_unbindefault stored procedure (and then if it isn't bound to any other tables/datatypes you can issue a DROP DEFAULT).



Go to Top of Page

sandesh_moghe
Constraint Violating Yak Guru

310 Posts

Posted - 2002-01-09 : 04:57:26
Now , a new error occurs.
See if i want to drop the above table tbNew,Database is not allowing me to do that..
showing me an erro
 
Server: Msg 21, Level 20, State 1, Line 1
Warning: Fatal error 3624 occurred at Jan 9 2002 3:27PM
Location: page.cpp:2777
Expression: rowLength >= offset + deleteLength
SPID: 51
Process ID: 1408

Connection Broken




What to do?
Plzz


---------------------------
Sandesh - The Messanger
Go to Top of Page

pradeepbj
Starting Member

6 Posts

Posted - 2002-01-09 : 05:29:46
Hi,
Could you let us know exact table structure and the permissions of the user id DBMiner.
I tried replicating the problem but could not

pradeep

Go to Top of Page

izaltsman
A custom title

1139 Posts

Posted - 2002-01-09 : 09:06:15
Try running DBCC CHECKDB on that database. Also check if any new errorlog and eventlog entries appear when you get this error.

Go to Top of Page

chadmat
The Chadinator

1974 Posts

Posted - 2002-01-09 : 17:16:46
This is why you should never update the system tables directly. There is an stored procedure for changing object owners, sp_changeobjectowner.

-Chad

Go to Top of Page
   

- Advertisement -