We have a SQL Server 2000 database with a table we cannot delete. We first
try from Enterprise Manager, and then tried through VB code, and a stored
procedure, but nothing is able to delete the table. Is there anything else
to try?
Thank you.DROP TABLE <table name>.
But what is the error you get?
--
Jacco Schalkwijk
SQL Server MVP
"Dean J Garrett" <info@.amuletc.com> wrote in message
news:%23kZjFGgQFHA.1236@.TK2MSFTNGP14.phx.gbl...
> We have a SQL Server 2000 database with a table we cannot delete. We first
> try from Enterprise Manager, and then tried through VB code, and a stored
> procedure, but nothing is able to delete the table. Is there anything else
> to try?
> Thank you.
>|||Have you tried running DBCC CHECKTABLE?
--
Andrew J. Kelly SQL MVP
"Dean J Garrett" <info@.amuletc.com> wrote in message
news:%23kZjFGgQFHA.1236@.TK2MSFTNGP14.phx.gbl...
> We have a SQL Server 2000 database with a table we cannot delete. We first
> try from Enterprise Manager, and then tried through VB code, and a stored
> procedure, but nothing is able to delete the table. Is there anything else
> to try?
> Thank you.
>|||Hi,
First Execute DBCC CHECKTABLE(TABLENAME), If it gives error then try with
REPAIR OPTIONS. See DBCC CHECKTABLE command in books online.
Take a backup of Database prior to execute DBCC with Repair options.
Thanks
Hari
SQL Server MVP
"Dean J Garrett" <info@.amuletc.com> wrote in message
news:%23kZjFGgQFHA.1236@.TK2MSFTNGP14.phx.gbl...
> We have a SQL Server 2000 database with a table we cannot delete. We first
> try from Enterprise Manager, and then tried through VB code, and a stored
> procedure, but nothing is able to delete the table. Is there anything else
> to try?
> Thank you.
>|||Actually, there is no error. Enterprise Manager just freezes, and we have to
stop the task. Query Analyzer, doing the DROP TABLE reacts the same way. We
give it several minutes to come back. It shouldnt' take more than 10 minutes
to drop a table.Maybe we can let it run ...'
"Jacco Schalkwijk" <jacco.please.reply@.to.newsgroups.mvps.org.invalid> wrote
in message news:eYQLnegQFHA.2132@.TK2MSFTNGP09.phx.gbl...
> DROP TABLE <table name>.
> But what is the error you get?
> --
> Jacco Schalkwijk
> SQL Server MVP
>
> "Dean J Garrett" <info@.amuletc.com> wrote in message
> news:%23kZjFGgQFHA.1236@.TK2MSFTNGP14.phx.gbl...
> > We have a SQL Server 2000 database with a table we cannot delete. We
first
> > try from Enterprise Manager, and then tried through VB code, and a
stored
> > procedure, but nothing is able to delete the table. Is there anything
else
> > to try?
> >
> > Thank you.
> >
> >
>|||That is not what MS recommends. You should not repair without first
determining root cause of the errors and then you should use a backup as the
best way to recover from the error (unless the only repair needed is to
rebuild indexes). Primairly though, you need to work out why the error
happened in the first place.
Regards
--
Paul Randal
Dev Lead, Microsoft SQL Server Storage Engine
This posting is provided "AS IS" with no warranties, and confers no rights.
"Hari Prasad" <hari_prasad_k@.hotmail.com> wrote in message
news:#rmRpFkQFHA.2876@.TK2MSFTNGP09.phx.gbl...
> Hi,
> First Execute DBCC CHECKTABLE(TABLENAME), If it gives error then try with
> REPAIR OPTIONS. See DBCC CHECKTABLE command in books online.
> Take a backup of Database prior to execute DBCC with Repair options.
> Thanks
> Hari
> SQL Server MVP
> "Dean J Garrett" <info@.amuletc.com> wrote in message
> news:%23kZjFGgQFHA.1236@.TK2MSFTNGP14.phx.gbl...
> > We have a SQL Server 2000 database with a table we cannot delete. We
first
> > try from Enterprise Manager, and then tried through VB code, and a
stored
> > procedure, but nothing is able to delete the table. Is there anything
else
> > to try?
> >
> > Thank you.
> >
> >
>|||There is no error, we just can't drop the table. We've tried to delete the
table inside Enterprise Manager, from a VB program, and from Query Analyzer.
Each time when the command executes to drop the table, the program freezes,
and we have to stop the task. Maybe we should wait longer (10 minutes) to
see if an error eventually occurs, but after about 10 mins. there is no
error and the program stops responding to the request to drop the table.
I ran DBCC checkTable and there are no reported errors.
ANy ideas? Thanks!
"Paul S Randal [MS]" <prandal@.online.microsoft.com> wrote in message
news:uTAONbERFHA.1392@.TK2MSFTNGP10.phx.gbl...
> That is not what MS recommends. You should not repair without first
> determining root cause of the errors and then you should use a backup as
the
> best way to recover from the error (unless the only repair needed is to
> rebuild indexes). Primairly though, you need to work out why the error
> happened in the first place.
> Regards
> --
> Paul Randal
> Dev Lead, Microsoft SQL Server Storage Engine
> This posting is provided "AS IS" with no warranties, and confers no
rights.
> "Hari Prasad" <hari_prasad_k@.hotmail.com> wrote in message
> news:#rmRpFkQFHA.2876@.TK2MSFTNGP09.phx.gbl...
> > Hi,
> >
> > First Execute DBCC CHECKTABLE(TABLENAME), If it gives error then try
with
> > REPAIR OPTIONS. See DBCC CHECKTABLE command in books online.
> >
> > Take a backup of Database prior to execute DBCC with Repair options.
> >
> > Thanks
> > Hari
> > SQL Server MVP
> >
> > "Dean J Garrett" <info@.amuletc.com> wrote in message
> > news:%23kZjFGgQFHA.1236@.TK2MSFTNGP14.phx.gbl...
> > > We have a SQL Server 2000 database with a table we cannot delete. We
> first
> > > try from Enterprise Manager, and then tried through VB code, and a
> stored
> > > procedure, but nothing is able to delete the table. Is there anything
> else
> > > to try?
> > >
> > > Thank you.
> > >
> > >
> >
> >
>|||Blocking? Did you check using sp_who, sp_who2 etc?
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Dean J Garrett" <info@.amuletc.com> wrote in message news:epK3ZkFRFHA.1236@.TK2MSFTNGP14.phx.gbl...
> There is no error, we just can't drop the table. We've tried to delete the
> table inside Enterprise Manager, from a VB program, and from Query Analyzer.
> Each time when the command executes to drop the table, the program freezes,
> and we have to stop the task. Maybe we should wait longer (10 minutes) to
> see if an error eventually occurs, but after about 10 mins. there is no
> error and the program stops responding to the request to drop the table.
> I ran DBCC checkTable and there are no reported errors.
> ANy ideas? Thanks!
>
> "Paul S Randal [MS]" <prandal@.online.microsoft.com> wrote in message
> news:uTAONbERFHA.1392@.TK2MSFTNGP10.phx.gbl...
>> That is not what MS recommends. You should not repair without first
>> determining root cause of the errors and then you should use a backup as
> the
>> best way to recover from the error (unless the only repair needed is to
>> rebuild indexes). Primairly though, you need to work out why the error
>> happened in the first place.
>> Regards
>> --
>> Paul Randal
>> Dev Lead, Microsoft SQL Server Storage Engine
>> This posting is provided "AS IS" with no warranties, and confers no
> rights.
>> "Hari Prasad" <hari_prasad_k@.hotmail.com> wrote in message
>> news:#rmRpFkQFHA.2876@.TK2MSFTNGP09.phx.gbl...
>> > Hi,
>> >
>> > First Execute DBCC CHECKTABLE(TABLENAME), If it gives error then try
> with
>> > REPAIR OPTIONS. See DBCC CHECKTABLE command in books online.
>> >
>> > Take a backup of Database prior to execute DBCC with Repair options.
>> >
>> > Thanks
>> > Hari
>> > SQL Server MVP
>> >
>> > "Dean J Garrett" <info@.amuletc.com> wrote in message
>> > news:%23kZjFGgQFHA.1236@.TK2MSFTNGP14.phx.gbl...
>> > > We have a SQL Server 2000 database with a table we cannot delete. We
>> first
>> > > try from Enterprise Manager, and then tried through VB code, and a
>> stored
>> > > procedure, but nothing is able to delete the table. Is there anything
>> else
>> > > to try?
>> > >
>> > > Thank you.
>> > >
>> > >
>> >
>> >
>>
>
No comments:
Post a Comment