Showing posts with label indexes. Show all posts
Showing posts with label indexes. Show all posts

Tuesday, March 27, 2012

Error when shrinking data file in SQL 2005

Hi,
I got the same error,
When i moved all of user tables and indexes out of primary FG and to a new
FG, my Primary is left with around 17GB of which less than a 1GB is actually
used, and when I ran shrink file on the only file on that FG, it took ages.
then I stoped it (in 2000 it would have taken max 2-3 hours, our SAN is not
that bad :-) ). when I ran it again I get the error described.
when I back up the db and restore it, then I can shrink the file.
this is a db in simle mode, dev environment. worried what happens when we go
to production with this.
error:
File ID 1 of database ID X cannot be shrunk as it is either being shrunk by
another process or is empty.
Msg 0, Level 11, State 0, Line 0
A severe error occurred on the current command. The results, if any, should
be discarded.
CTS DBA
"XNMB" wrote:

> i came accross this problem too. what did was to restart the service
> and executed dbcc shrinkfile again. that time it succeeded.
>
I tried detach and re-attach the database fie and run DBCC SHRINKFILE
But I wouldn't recommend shrinking. Here's an article by the great Tibor
Karaszi on database shrinking
http://www.karaszi.com/SQLServer/info_dont_shrink.asp
"CTS_DBA" <CTSDBA@.discussions.microsoft.com> wrote in message
news:630320F3-22A4-4D33-A245-54D14D4784FD@.microsoft.com...[vbcol=seagreen]
> Hi,
> I got the same error,
> When i moved all of user tables and indexes out of primary FG and to a new
> FG, my Primary is left with around 17GB of which less than a 1GB is
> actually
> used, and when I ran shrink file on the only file on that FG, it took
> ages.
> then I stoped it (in 2000 it would have taken max 2-3 hours, our SAN is
> not
> that bad :-) ). when I ran it again I get the error described.
> when I back up the db and restore it, then I can shrink the file.
> this is a db in simle mode, dev environment. worried what happens when we
> go
> to production with this.
> error:
> File ID 1 of database ID X cannot be shrunk as it is either being shrunk
> by
> another process or is empty.
> Msg 0, Level 11, State 0, Line 0
> A severe error occurred on the current command. The results, if any,
> should
> be discarded.
> --
> CTS DBA
>
> "XNMB" wrote:
|||hi,
thanks for the reply.
I know what you mean, but what I don't understand is why shrinkfile wouldn't
work when there's so much free space in the file.
over 8GB
if the original database shrunk in SQL 2000 it works perfectly.
Thanks
CTS DBA
"bass_player [SBS-MVP]" wrote:

> I tried detach and re-attach the database fie and run DBCC SHRINKFILE
> But I wouldn't recommend shrinking. Here's an article by the great Tibor
> Karaszi on database shrinking
> http://www.karaszi.com/SQLServer/info_dont_shrink.asp
> "CTS_DBA" <CTSDBA@.discussions.microsoft.com> wrote in message
> news:630320F3-22A4-4D33-A245-54D14D4784FD@.microsoft.com...
>
>

Monday, March 26, 2012

Error when rebuilding indexes

Hi
I have created a database maintenance plan which includes rebuilding indexes
and checkdb. For one of the databases I get the following error:
[Microsoft SQL-DMO (ODBC SQLState: 42000)] Error 1934: [Microsoft][ODBC SQL
Server Driver][SQL Server]DBCC failed because the following SET options have
incorrect settings: 'QUOTED_IDENTIFIER'.
Does anyone know how I can resolve this?
TIA!
Hi
Have a look at the following:
http://support.microsoft.com/default...b;en-us;301292
http://support.microsoft.com/default...b;en-us;902388
Regards
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"N" wrote:

> Hi
> I have created a database maintenance plan which includes rebuilding indexes
> and checkdb. For one of the databases I get the following error:
> [Microsoft SQL-DMO (ODBC SQLState: 42000)] Error 1934: [Microsoft][ODBC SQL
> Server Driver][SQL Server]DBCC failed because the following SET options have
> incorrect settings: 'QUOTED_IDENTIFIER'.
> Does anyone know how I can resolve this?
> TIA!
>
sql

Error when rebuilding indexes

Hi
I have created a database maintenance plan which includes rebuilding indexes
and checkdb. For one of the databases I get the following error:
[Microsoft SQL-DMO (ODBC SQLState: 42000)] Error 1934: [Microsoft]&#
91;ODBC SQL
Server Driver][SQL Server]DBCC failed because the following SET options
have
incorrect settings: 'QUOTED_IDENTIFIER'.
Does anyone know how I can resolve this?
TIA!Hi
Have a look at the following:
http://support.microsoft.com/defaul...kb;en-us;301292
http://support.microsoft.com/defaul...kb;en-us;902388
Regards
--
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"N" wrote:

> Hi
> I have created a database maintenance plan which includes rebuilding index
es
> and checkdb. For one of the databases I get the following error:
> [Microsoft SQL-DMO (ODBC SQLState: 42000)] Error 1934: [Microsoft]
[ODBC SQL
> Server Driver][SQL Server]DBCC failed because the following SET option
s have
> incorrect settings: 'QUOTED_IDENTIFIER'.
> Does anyone know how I can resolve this?
> TIA!
>

Error when rebuilding indexes

Hi
I have created a database maintenance plan which includes rebuilding indexes
and checkdb. For one of the databases I get the following error:
[Microsoft SQL-DMO (ODBC SQLState: 42000)] Error 1934: [Microsoft][ODBC SQL
Server Driver][SQL Server]DBCC failed because the following SET options have
incorrect settings: 'QUOTED_IDENTIFIER'.
Does anyone know how I can resolve this?
TIA!Hi
Have a look at the following:
http://support.microsoft.com/default.aspx?scid=kb;en-us;301292
http://support.microsoft.com/default.aspx?scid=kb;en-us;902388
Regards
--
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"N" wrote:
> Hi
> I have created a database maintenance plan which includes rebuilding indexes
> and checkdb. For one of the databases I get the following error:
> [Microsoft SQL-DMO (ODBC SQLState: 42000)] Error 1934: [Microsoft][ODBC SQL
> Server Driver][SQL Server]DBCC failed because the following SET options have
> incorrect settings: 'QUOTED_IDENTIFIER'.
> Does anyone know how I can resolve this?
> TIA!
>

Sunday, March 11, 2012

Error when attempting to delete rows

I have a log table with no indexes, triggers, or keys. During the course of development, I will clean out the entries by selecting all the rows (in Database Explorer) and hitting the delete key.

Occassionally, I will end up with couple rows (out of many) that won't delete. I get the following error when I attempt to delete the "affected" rows:

A problem occurred attempting to delete row 1.
Error Source: Microosft.VisualStudio.DataTools.
Error Message: The row value(s) updated or deleted either do not make the
unique or they alter multiple rows (2 rows).

I'm also not able to modify any of the data of the affected rows. There don't seem to be anything really special or unique about these affected rows (compared to the ones I'm able to delete). I've tried rebooting the machine and that did resolve the issue.

This is the second time I've encountered this issue. By any chance, is this a known bug with the beta (it's SQL Server 2005 June CTP)? Or is it some else I'm not aware of?

I've also tried deleting the rows using SQL Server Management, same results.

RichardCan you run SQL Profiler to check the different events executing while you delete these records? There must be something happening in the background that is causing all these.|||

Did you ever get the problem resolved? I am having the same problem.

Thanks, Bob

|||

Does the table have a primary key or unique constraint?

|||I just saw this. I'm sure it was resolved since the post was awhile ago, but that error message can occur if there is a constraint which the deletion violates. A common one might be that a field is set to "NOT NULL".

Error when attempting to delete rows

I have a log table with no indexes, triggers, or keys. During the course of development, I will clean out the entries by selecting all the rows (in Database Explorer) and hitting the delete key.

Occassionally, I will end up with couple rows (out of many) that won't delete. I get the following error when I attempt to delete the "affected" rows:

A problem occurred attempting to delete row 1.
Error Source: Microosft.VisualStudio.DataTools.
Error Message: The row value(s) updated or deleted either do not make the
unique or they alter multiple rows (2 rows).

I'm also not able to modify any of the data of the affected rows. There don't seem to be anything really special or unique about these affected rows (compared to the ones I'm able to delete). I've tried rebooting the machine and that did resolve the issue.

This is the second time I've encountered this issue. By any chance, is this a known bug with the beta (it's SQL Server 2005 June CTP)? Or is it some else I'm not aware of?

I've also tried deleting the rows using SQL Server Management, same results.

Richard
Can you run SQL Profiler to check the different events executing while you delete these records? There must be something happening in the background that is causing all these.|||

Did you ever get the problem resolved? I am having the same problem.

Thanks, Bob

|||

Does the table have a primary key or unique constraint?

|||I just saw this. I'm sure it was resolved since the post was awhile ago, but that error message can occur if there is a constraint which the deletion violates. A common one might be that a field is set to "NOT NULL".

Error when attempting to delete rows

I have a log table with no indexes, triggers, or keys. During the course of development, I will clean out the entries by selecting all the rows (in Database Explorer) and hitting the delete key.

Occassionally, I will end up with couple rows (out of many) that won't delete. I get the following error when I attempt to delete the "affected" rows:

A problem occurred attempting to delete row 1.
Error Source: Microosft.VisualStudio.DataTools.
Error Message: The row value(s) updated or deleted either do not make the
unique or they alter multiple rows (2 rows).

I'm also not able to modify any of the data of the affected rows. There don't seem to be anything really special or unique about these affected rows (compared to the ones I'm able to delete). I've tried rebooting the machine and that did resolve the issue.

This is the second time I've encountered this issue. By any chance, is this a known bug with the beta (it's SQL Server 2005 June CTP)? Or is it some else I'm not aware of?

I've also tried deleting the rows using SQL Server Management, same results.

Richard
Can you run SQL Profiler to check the different events executing while you delete these records? There must be something happening in the background that is causing all these.|||

Did you ever get the problem resolved? I am having the same problem.

Thanks, Bob

|||

Does the table have a primary key or unique constraint?

|||I just saw this. I'm sure it was resolved since the post was awhile ago, but that error message can occur if there is a constraint which the deletion violates. A common one might be that a field is set to "NOT NULL".