Sunday, March 25, 2012
cannot drop index....it is being used for Foreign Key Enforcement ??
Message
Server: Msg 3723, Level 16, State 6
An Explicit DROP INDEX is not allowed on index
'dbo.Jobs.nci_Jobs_StartTime'. It is being used for FOREIGN KEY constraint
Enforcement.
Ummm...No It's not...!
I scripted the entire DB and searched for any foreign key referencing this
column and it simply does not exist in the script.
I just wanna drop the index named nci_Jobs_StartTime (is that so wrong?)
Here is the Jobs Table Script:
CREATE TABLE [dbo].[Jobs] (
[JobUID] [uniqueidentifier] NOT NULL ,
[ParentJobUID] [uniqueidentifier] NULL ,
[JobTypeID] [tinyint] NOT NULL ,
[JobStatusID] [tinyint] NOT NULL ,
[CNCSystemID] [tinyint] NULL ,
[JobStep] [tinyint] NULL ,
[HasSubJobs] [bit] NOT NULL ,
[CurrentSubJobStep] [tinyint] NULL ,
[JobStartTime] [datetime] NULL ,
[JobStopTime] [datetime] NULL ,
[JobPickedUpAtTime] [datetime] NULL ,
[JobPickedUpByMachine] [varchar] (50) COLLATE SQL_Latin1_General_CP1
_CI_AS
NULL ,
[JobData] [varbinary] (4096) NULL ,
[JobRawData] [text] COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[Retry] [tinyint] NOT NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
ALTER TABLE [dbo].[Jobs] WITH NOCHECK ADD
CONSTRAINT [PK_Jobs] PRIMARY KEY CLUSTERED
(
[JobUID]
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[Jobs] WITH NOCHECK ADD
CONSTRAINT [DF__Jobs__Retry__4AB81AF0] DEFAULT (0) FOR [Retry]
GO
CREATE INDEX [nci_Jobs_StartTime] ON [dbo].[Jobs]([JobStart
Time]) ON
[PRIMARY]
GO
ALTER TABLE [dbo].[Jobs] ADD
CONSTRAINT [FK_Jobs_CNCSystem] FOREIGN KEY
(
[CNCSystemID]
) REFERENCES [dbo].[CNCSystem] (
[CNCSystemID]
),
CONSTRAINT [FK_Jobs_Jobs] FOREIGN KEY
(
[ParentJobUID]
) REFERENCES [dbo].[Jobs] (
[JobUID]
),
CONSTRAINT [FK_Jobs_JobStatus] FOREIGN KEY
(
[JobStatusID]
) REFERENCES [dbo].[JobStatus] (
[JobStatusID]
),
CONSTRAINT [FK_Jobs_JobType] FOREIGN KEY
(
[JobTypeID]
) REFERENCES [dbo].[JobType] (
[JobTypeID]
)
GOYou have to drop foreign key, below is the syntax:
ALTER TABLE tablename
DROP CONSTRAINT foreign key
Hope this will help you|||there is no foreign key.
that is the problem.
GAJ
"Tony-ICW Group" <tmangahas@.icwgroup.com> wrote in message
news:9FBD7415-0E78-4968-B205-ADD80526B5F2@.microsoft.com...
> You have to drop foreign key, below is the syntax:
> ALTER TABLE tablename
> DROP CONSTRAINT foreign key
> Hope this will help you|||Strange... What does sp_helpconstraint say?
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
"Jaxon" <GregoryAJackson@.hotmail.com> wrote in message
news:O1BKuojBEHA.3748@.tk2msftngp13.phx.gbl...
> there is no foreign key.
> that is the problem.
>
> GAJ
>
> "Tony-ICW Group" <tmangahas@.icwgroup.com> wrote in message
> news:9FBD7415-0E78-4968-B205-ADD80526B5F2@.microsoft.com...
>|||does not list any FKEY on the JobStartTime Column.
I look in SQL
I look in Toad
I look everywhere
no sign of any FKEY on jobs.JobStartTime
The weird thing is, I can "Change" the index definition. I modified the
index to use a different column, etc. No issues.
I just cant drop the stupid thing.
GAJ|||Strange... Can you produce a repro? If not, I'd suspect some type of
corruption somewhere. Try DBCC CHECKDB and DBCC CHECKCATALOG.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
"Jaxon" <GregoryAJackson@.hotmail.com> wrote in message
news:uJ$OTasBEHA.3524@.TK2MSFTNGP10.phx.gbl...
> does not list any FKEY on the JobStartTime Column.
> I look in SQL
> I look in Toad
> I look everywhere
> no sign of any FKEY on jobs.JobStartTime
> The weird thing is, I can "Change" the index definition. I modified the
> index to use a different column, etc. No issues.
> I just cant drop the stupid thing.
>
> GAJ
>|||what's a "Repro"
I ran dbcc checkdb and all seems well.
this is very very weird
GAJ|||"Repro" = Code with which we can reproduce the error.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
"Jaxon" <GregoryAJackson@.hotmail.com> wrote in message
news:uCPqr9sBEHA.3064@.tk2msftngp13.phx.gbl...
> what's a "Repro"
> I ran dbcc checkdb and all seems well.
> this is very very weird
>
> GAJ
>|||the ddl is in my first post.
I wish there was something else I could give you, I'd do it in a heartbeat.
Thanks for the feedback up to now anyway
GAJ|||I'm sorry, but that is not a complete repro. There are tables that you
reference in your FK constraint which are lacking. The point of a repro is
for use to reproduce the same error message. In this case, I didn't find
anything obvious, but sometime you see the problem if you have it in front
of you. Hence the request for a repro. If you can't produce such, it might
be time for opening a case with MS...
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
"Jaxon" <GregoryAJackson@.hotmail.com> wrote in message
news:uSIEoBvBEHA.3344@.tk2msftngp13.phx.gbl...
> the ddl is in my first post.
> I wish there was something else I could give you, I'd do it in a
heartbeat.
> Thanks for the feedback up to now anyway
>
> GAJ
>sql
Cannot Drop Index
drop it.
Command:
drop index Romm_Inv.PK_Room_Inv
Error
Server: Msg 3723, Level 16, State 4, Line 1
An explicit DROP INDEX is not allowed on index 'Room_Inv.PK_Room_Inv'.
It is being used for PRIMARY KEY constraint enforcement.
The help utility refer to ALTER TABLE options to DROP CONSTRAINT but it did
not work.
Gracias. LaEsmeralda
ALTER TABLE is what you are supposed to use. What statement did you use and
what was the error message?
Tom
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
SQL Server MVP
Toronto, ON Canada
..
"LaEsmeralda" <LaEsmeralda@.discussions.microsoft.com> wrote in message
news:F00810B8-62EA-4E19-A1EF-71AA5C8F9AB8@.microsoft.com...
I could not find a way to remove primary key from an index, thus could not
drop it.
Command:
drop index Romm_Inv.PK_Room_Inv
Error
Server: Msg 3723, Level 16, State 4, Line 1
An explicit DROP INDEX is not allowed on index 'Room_Inv.PK_Room_Inv'.
It is being used for PRIMARY KEY constraint enforcement.
The help utility refer to ALTER TABLE options to DROP CONSTRAINT but it did
not work.
Gracias. LaEsmeralda
|||Hola LaEsmeralda
You do need to use ALTER TABLE to remove a primary key constraint, which
will drop the index along with it.
What does 'did not work' mean? Can you show us the statement you were using
and the error message you received.
HTH
Kalen Delaney, SQL Server MVP
http://sqlblog.com
"LaEsmeralda" <LaEsmeralda@.discussions.microsoft.com> wrote in message
news:F00810B8-62EA-4E19-A1EF-71AA5C8F9AB8@.microsoft.com...
>I could not find a way to remove primary key from an index, thus could not
> drop it.
> Command:
> drop index Romm_Inv.PK_Room_Inv
> Error
> Server: Msg 3723, Level 16, State 4, Line 1
> An explicit DROP INDEX is not allowed on index 'Room_Inv.PK_Room_Inv'.
> It is being used for PRIMARY KEY constraint enforcement.
> The help utility refer to ALTER TABLE options to DROP CONSTRAINT but it
> did
> not work.
> Gracias. LaEsmeralda
|||I made it, Tom. Thanks a lot for quick help.
"Tom Moreau" wrote:
> ALTER TABLE is what you are supposed to use. What statement did you use and
> what was the error message?
> --
> Tom
> ----
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
> SQL Server MVP
> Toronto, ON Canada
> ..
> "LaEsmeralda" <LaEsmeralda@.discussions.microsoft.com> wrote in message
> news:F00810B8-62EA-4E19-A1EF-71AA5C8F9AB8@.microsoft.com...
> I could not find a way to remove primary key from an index, thus could not
> drop it.
> Command:
> drop index Romm_Inv.PK_Room_Inv
> Error
> Server: Msg 3723, Level 16, State 4, Line 1
> An explicit DROP INDEX is not allowed on index 'Room_Inv.PK_Room_Inv'.
> It is being used for PRIMARY KEY constraint enforcement.
> The help utility refer to ALTER TABLE options to DROP CONSTRAINT but it did
> not work.
> Gracias. LaEsmeralda
>
Cannot Drop Index
drop it.
Command:
drop index Romm_Inv.PK_Room_Inv
Error
Server: Msg 3723, Level 16, State 4, Line 1
An explicit DROP INDEX is not allowed on index 'Room_Inv.PK_Room_Inv'.
It is being used for PRIMARY KEY constraint enforcement.
The help utility refer to ALTER TABLE options to DROP CONSTRAINT but it did
not work.
Gracias. LaEsmeraldaALTER TABLE is what you are supposed to use. What statement did you use and
what was the error message?
--
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
SQL Server MVP
Toronto, ON Canada
.
"LaEsmeralda" <LaEsmeralda@.discussions.microsoft.com> wrote in message
news:F00810B8-62EA-4E19-A1EF-71AA5C8F9AB8@.microsoft.com...
I could not find a way to remove primary key from an index, thus could not
drop it.
Command:
drop index Romm_Inv.PK_Room_Inv
Error
Server: Msg 3723, Level 16, State 4, Line 1
An explicit DROP INDEX is not allowed on index 'Room_Inv.PK_Room_Inv'.
It is being used for PRIMARY KEY constraint enforcement.
The help utility refer to ALTER TABLE options to DROP CONSTRAINT but it did
not work.
Gracias. LaEsmeralda|||Hola LaEsmeralda
You do need to use ALTER TABLE to remove a primary key constraint, which
will drop the index along with it.
What does 'did not work' mean? Can you show us the statement you were using
and the error message you received.
--
HTH
Kalen Delaney, SQL Server MVP
http://sqlblog.com
"LaEsmeralda" <LaEsmeralda@.discussions.microsoft.com> wrote in message
news:F00810B8-62EA-4E19-A1EF-71AA5C8F9AB8@.microsoft.com...
>I could not find a way to remove primary key from an index, thus could not
> drop it.
> Command:
> drop index Romm_Inv.PK_Room_Inv
> Error
> Server: Msg 3723, Level 16, State 4, Line 1
> An explicit DROP INDEX is not allowed on index 'Room_Inv.PK_Room_Inv'.
> It is being used for PRIMARY KEY constraint enforcement.
> The help utility refer to ALTER TABLE options to DROP CONSTRAINT but it
> did
> not work.
> Gracias. LaEsmeralda|||I made it, Tom. Thanks a lot for quick help.
"Tom Moreau" wrote:
> ALTER TABLE is what you are supposed to use. What statement did you use and
> what was the error message?
> --
> Tom
> ----
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
> SQL Server MVP
> Toronto, ON Canada
> ..
> "LaEsmeralda" <LaEsmeralda@.discussions.microsoft.com> wrote in message
> news:F00810B8-62EA-4E19-A1EF-71AA5C8F9AB8@.microsoft.com...
> I could not find a way to remove primary key from an index, thus could not
> drop it.
> Command:
> drop index Romm_Inv.PK_Room_Inv
> Error
> Server: Msg 3723, Level 16, State 4, Line 1
> An explicit DROP INDEX is not allowed on index 'Room_Inv.PK_Room_Inv'.
> It is being used for PRIMARY KEY constraint enforcement.
> The help utility refer to ALTER TABLE options to DROP CONSTRAINT but it did
> not work.
> Gracias. LaEsmeralda
>
Cannot Drop Index
drop it.
Command:
drop index Romm_Inv.PK_Room_Inv
Error
Server: Msg 3723, Level 16, State 4, Line 1
An explicit DROP INDEX is not allowed on index 'Room_Inv.PK_Room_Inv'.
It is being used for PRIMARY KEY constraint enforcement.
The help utility refer to ALTER TABLE options to DROP CONSTRAINT but it did
not work.
Gracias. LaEsmeraldaALTER TABLE is what you are supposed to use. What statement did you use and
what was the error message?
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
SQL Server MVP
Toronto, ON Canada
.
"LaEsmeralda" <LaEsmeralda@.discussions.microsoft.com> wrote in message
news:F00810B8-62EA-4E19-A1EF-71AA5C8F9AB8@.microsoft.com...
I could not find a way to remove primary key from an index, thus could not
drop it.
Command:
drop index Romm_Inv.PK_Room_Inv
Error
Server: Msg 3723, Level 16, State 4, Line 1
An explicit DROP INDEX is not allowed on index 'Room_Inv.PK_Room_Inv'.
It is being used for PRIMARY KEY constraint enforcement.
The help utility refer to ALTER TABLE options to DROP CONSTRAINT but it did
not work.
Gracias. LaEsmeralda|||Hola LaEsmeralda
You do need to use ALTER TABLE to remove a primary key constraint, which
will drop the index along with it.
What does 'did not work' mean? Can you show us the statement you were using
and the error message you received.
HTH
Kalen Delaney, SQL Server MVP
http://sqlblog.com
"LaEsmeralda" <LaEsmeralda@.discussions.microsoft.com> wrote in message
news:F00810B8-62EA-4E19-A1EF-71AA5C8F9AB8@.microsoft.com...
>I could not find a way to remove primary key from an index, thus could not
> drop it.
> Command:
> drop index Romm_Inv.PK_Room_Inv
> Error
> Server: Msg 3723, Level 16, State 4, Line 1
> An explicit DROP INDEX is not allowed on index 'Room_Inv.PK_Room_Inv'.
> It is being used for PRIMARY KEY constraint enforcement.
> The help utility refer to ALTER TABLE options to DROP CONSTRAINT but it
> did
> not work.
> Gracias. LaEsmeralda|||I made it, Tom. Thanks a lot for quick help.
"Tom Moreau" wrote:
> ALTER TABLE is what you are supposed to use. What statement did you use a
nd
> what was the error message?
> --
> Tom
> ----
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
> SQL Server MVP
> Toronto, ON Canada
> ..
> "LaEsmeralda" <LaEsmeralda@.discussions.microsoft.com> wrote in message
> news:F00810B8-62EA-4E19-A1EF-71AA5C8F9AB8@.microsoft.com...
> I could not find a way to remove primary key from an index, thus could not
> drop it.
> Command:
> drop index Romm_Inv.PK_Room_Inv
> Error
> Server: Msg 3723, Level 16, State 4, Line 1
> An explicit DROP INDEX is not allowed on index 'Room_Inv.PK_Room_Inv'.
> It is being used for PRIMARY KEY constraint enforcement.
> The help utility refer to ALTER TABLE options to DROP CONSTRAINT but it di
d
> not work.
> Gracias. LaEsmeralda
>
cannot drop certificate.
try this:
declare @.thumb varbinary(32)
select @.thumb = thumbprint from sys.certificates where name = 'fcert'
select object_name(major_id) from sys.crypt_properties where thumbprint = @.thumb
go
hth,
-Steven Gott
S/DET
SQL Server
sqlThursday, March 22, 2012
Cannot delete rows that contain same data
duplicated in a table. There is no Primary Key. I get an error message to
the effect that the rows cannot be deleted because it would effect other
rows. If I attempt to change a field in the row I get the same error. In
this application there may be many duplicate rows that will need to deleted
at various times.
Thanks,
Bob HillerNo primary key is often an indication of a data model problem. Even if this
is simply a staging table used as part of an ELT process, you can add a
surrogate key to facilitate set-based processing and use GUI tools.
Do all columns of 'duplicate' rows contain the same values? In SQL 2005,
you can specify a TOP clause on a delete statement to delete only a
specified number of rows like the example below. Similarly, you can use SET
ROWCOUNT in earlier version but need to be careful to execute SET ROWCOUNT 0
afterward.
CREATE TABLE Table1 (Col1 int)
INSERT INTO Table1 VALUES(1)
INSERT INTO Table1 VALUES(1)
INSERT INTO Table1 VALUES(1)
SELECT * FROM Table1
DELETE TOP (2) FROM Table1 WHERE Col1 = 1
SELECT * FROM Table1
Hope this helps.
Dan Guzman
SQL Server MVP
"Bob and Sharon Hiller" <aoklans@.tir.com> wrote in message
news:uLNoND3SGHA.4752@.TK2MSFTNGP10.phx.gbl...
> Using SQL Sever 2005 Management Studio I am trying to delete rows that are
> duplicated in a table. There is no Primary Key. I get an error message to
> the effect that the rows cannot be deleted because it would effect other
> rows. If I attempt to change a field in the row I get the same error. In
> this application there may be many duplicate rows that will need to
> deleted at various times.
> Thanks,
> Bob Hiller
>|||Dan,
Yes, All of the columns contain the same values. Is there any way to delete
these rows by hitting the delete key or right click/delete?
Thanks,
Bob Hiller
"Dan Guzman" <guzmanda@.nospam-online.sbcglobal.net> wrote in message
news:uHlyng3SGHA.5736@.TK2MSFTNGP10.phx.gbl...
> No primary key is often an indication of a data model problem. Even if
> this is simply a staging table used as part of an ELT process, you can add
> a surrogate key to facilitate set-based processing and use GUI tools.
> Do all columns of 'duplicate' rows contain the same values? In SQL 2005,
> you can specify a TOP clause on a delete statement to delete only a
> specified number of rows like the example below. Similarly, you can use
> SET ROWCOUNT in earlier version but need to be careful to execute SET
> ROWCOUNT 0 afterward.
> CREATE TABLE Table1 (Col1 int)
> INSERT INTO Table1 VALUES(1)
> INSERT INTO Table1 VALUES(1)
> INSERT INTO Table1 VALUES(1)
> SELECT * FROM Table1
> DELETE TOP (2) FROM Table1 WHERE Col1 = 1
> SELECT * FROM Table1
> --
> Hope this helps.
> Dan Guzman
> SQL Server MVP
> "Bob and Sharon Hiller" <aoklans@.tir.com> wrote in message
> news:uLNoND3SGHA.4752@.TK2MSFTNGP10.phx.gbl...
>|||AFAIK, you can't delete rows using the GUI when all columns have the same
value. This is because the tools generate a DELETE statement behind the
scenes and the row(s) you want to delete is ambiguous when all columns have
the same value. If you must use a GUI, you'll need to add a column to
uniquely identify a row:
ALTER TABLE Table1
ADD TempID int IDENTITY(1, 1)
Hope this helps.
Dan Guzman
SQL Server MVP
"Bob and Sharon Hiller" <aoklans@.tir.com> wrote in message
news:u$RtNV4SGHA.5156@.TK2MSFTNGP10.phx.gbl...
> Dan,
> Yes, All of the columns contain the same values. Is there any way to
> delete these rows by hitting the delete key or right click/delete?
> Thanks,
> Bob Hiller
>|||Bob,
As Dan has already said, you will probably struggle to delete these rows
using a GUI tool (e.g. Enterprise Manager) because there is no key defined
for the table. You should probably first add a key to the table, then do
your DELETE operations, and then, if you really don't want a key any more
you could remove the key definition (and in doing so, re-introduce the
design flaw).
There are probably ways around this, if you're prepared to write your
own SQL DELETEs rather than use a GUI to perform the delete ops. But that
doesn't change the fact that there is a design problem which needs to be
fixed. A correct RDBMS (database) design will always see a field (or set of
fields) defined as a unique key, even on temporary tables. Perhaps the only
exception would be staging tables used to clean data, but those will,
nevertheless, need a key defined at some point during the migration process.
HTH
Robert
"Bob and Sharon Hiller" <aoklans@.tir.com> wrote in message
news:u$RtNV4SGHA.5156@.TK2MSFTNGP10.phx.gbl...
> Dan,
> Yes, All of the columns contain the same values. Is there any way to
> delete these rows by hitting the delete key or right click/delete?
> Thanks,
> Bob Hiller
> "Dan Guzman" <guzmanda@.nospam-online.sbcglobal.net> wrote in message
> news:uHlyng3SGHA.5736@.TK2MSFTNGP10.phx.gbl...
>|||The Table I am referring to is just being used for testing. I was using a
random number generator in my program that I developed to send the data to
the table. The random number generator at some point started duplicating
numbers. I am now going to implement the table in production mode and there
will of course be a key. It is very important because I am recording
automotive serial numbers which must be unique.
Thanks,
Bob Hiller
"Robert Ellis" <robe_2k5@.n0sp8m.hotmail.co.uk> wrote in message
news:%23wuSOn4SGHA.424@.TK2MSFTNGP12.phx.gbl...
> Bob,
> As Dan has already said, you will probably struggle to delete these
> rows using a GUI tool (e.g. Enterprise Manager) because there is no key
> defined for the table. You should probably first add a key to the table,
> then do your DELETE operations, and then, if you really don't want a key
> any more you could remove the key definition (and in doing so,
> re-introduce the design flaw).
> There are probably ways around this, if you're prepared to write your
> own SQL DELETEs rather than use a GUI to perform the delete ops. But that
> doesn't change the fact that there is a design problem which needs to be
> fixed. A correct RDBMS (database) design will always see a field (or set
> of fields) defined as a unique key, even on temporary tables. Perhaps the
> only exception would be staging tables used to clean data, but those will,
> nevertheless, need a key defined at some point during the migration
> process.
> HTH
> Robert
>
>
> "Bob and Sharon Hiller" <aoklans@.tir.com> wrote in message
> news:u$RtNV4SGHA.5156@.TK2MSFTNGP10.phx.gbl...
>|||Hey Bob,
Since this sounds like it's an issue of data cleansing for development
work, try something like the following:
SELECT DISTINCT *
INTO newTable
FROM oldTable
TRUNCATE TABLE oldTable
INSERT INTO oldTable
SELECT *
FROM newTable
DROP TABLE newTable
HTH,
Stu|||Bob,
Fair enough mate!
Just a small observation, for what it may be worth, (and yes, I'm being
somewhat pedantic here):
If you've got a scenario where you're first building a test system, and
then shifting to production (which is practically always the case with any
form of software development) then you might as well spend the extra time
developing your test DDL as fully as possible, because doing so will aid you
when it comes to evaluating the behaviour and performance of your client
software. The point here is, if a unqiue constraint had been enforced on
your test table, you're client program would never have been able to insert
those "duplicate" rows -- and so, you'd have been a step ahead...
Wishing you well with your project,
Regards,
Robert
"Bob and Sharon Hiller" <aoklans@.tir.com> wrote in message
news:uWN7VS5SGHA.736@.TK2MSFTNGP12.phx.gbl...
> The Table I am referring to is just being used for testing. I was using a
> random number generator in my program that I developed to send the data to
> the table. The random number generator at some point started duplicating
> numbers. I am now going to implement the table in production mode and
> there will of course be a key. It is very important because I am recording
> automotive serial numbers which must be unique.
> Thanks,
> Bob Hiller
>
> "Robert Ellis" <robe_2k5@.n0sp8m.hotmail.co.uk> wrote in message
> news:%23wuSOn4SGHA.424@.TK2MSFTNGP12.phx.gbl...
>
Monday, March 19, 2012
Cannot create index, timeout expires (SQL Server Express 2005)
rows)... on a SQL Server Express 2005 database...
After I make the changes to the table and Save, the operation starts
but times out after about 30 seconds, saying that the timeout has
expired.
I tried looking for a timeout that would govern this but I have not
been able to find one...
My query execution timeout is set to 0 (which is unlimited), though it
should be irrelevant because this is not a query.... (in fact, I have
no problem running quries that take a few mins)...
Any idea where/what I need to change to resolve this?
Thanks in advance.
<sdragolov@.gmail.com> wrote in message
news:1159639554.270613.108730@.c28g2000cwb.googlegr oups.com...
>I am having trouble creating a primary key on a large table (6 mil
> rows)... on a SQL Server Express 2005 database...
> After I make the changes to the table and Save, the operation starts
> but times out after about 30 seconds, saying that the timeout has
> expired.
> I tried looking for a timeout that would govern this but I have not
> been able to find one...
> My query execution timeout is set to 0 (which is unlimited), though it
> should be irrelevant because this is not a query.... (in fact, I have
> no problem running quries that take a few mins)...
> Any idea where/what I need to change to resolve this?
>
What tool are you using to run the query? Can you get a script of the
change and run it in a query window in SQL Server Management Studio?
David
|||Well, in theory it's not a "query", right? It's a DDL...
I am using Management Studio - I right click on the table,and do
Modify, then I select the two fields and right click and do "Primary
Key"... Then I finally do Save and that's where the error comes after
about 30 seconds...
I guess I could get the DDL text of adding these PKs and then try to
run that in a query window... though why would that be any
different...?
David Browne wrote:
> <sdragolov@.gmail.com> wrote in message
> news:1159639554.270613.108730@.c28g2000cwb.googlegr oups.com...
>
> What tool are you using to run the query? Can you get a script of the
> change and run it in a query window in SQL Server Management Studio?
> David
|||<sdragolov@.gmail.com> wrote in message
news:1159647740.250757.210120@.c28g2000cwb.googlegr oups.com...
> Well, in theory it's not a "query", right? It's a DDL...
> I am using Management Studio - I right click on the table,and do
> Modify, then I select the two fields and right click and do "Primary
> Key"... Then I finally do Save and that's where the error comes after
> about 30 seconds...
> I guess I could get the DDL text of adding these PKs and then try to
> run that in a query window... though why would that be any
> different...?
Because it's the client tool that generates the timeout, not the server. If
Management Studio will give you the DDL, just run it in a new query window.
David
|||David - your suggestion did work... Thanks!
David Browne wrote:
> <sdragolov@.gmail.com> wrote in message
> news:1159647740.250757.210120@.c28g2000cwb.googlegr oups.com...
> Because it's the client tool that generates the timeout, not the server. If
> Management Studio will give you the DDL, just run it in a new query window.
> David
Cannot create index, timeout expires (SQL Server Express 2005)
rows)... on a SQL Server Express 2005 database...
After I make the changes to the table and Save, the operation starts
but times out after about 30 seconds, saying that the timeout has
expired.
I tried looking for a timeout that would govern this but I have not
been able to find one...
My query execution timeout is set to 0 (which is unlimited), though it
should be irrelevant because this is not a query.... (in fact, I have
no problem running quries that take a few mins)...
Any idea where/what I need to change to resolve this'
Thanks in advance.<sdragolov@.gmail.com> wrote in message
news:1159639554.270613.108730@.c28g2000cwb.googlegroups.com...
>I am having trouble creating a primary key on a large table (6 mil
> rows)... on a SQL Server Express 2005 database...
> After I make the changes to the table and Save, the operation starts
> but times out after about 30 seconds, saying that the timeout has
> expired.
> I tried looking for a timeout that would govern this but I have not
> been able to find one...
> My query execution timeout is set to 0 (which is unlimited), though it
> should be irrelevant because this is not a query.... (in fact, I have
> no problem running quries that take a few mins)...
> Any idea where/what I need to change to resolve this'
>
What tool are you using to run the query? Can you get a script of the
change and run it in a query window in SQL Server Management Studio?
David|||Well, in theory it's not a "query", right' It's a DDL...
I am using Management Studio - I right click on the table,and do
Modify, then I select the two fields and right click and do "Primary
Key"... Then I finally do Save and that's where the error comes after
about 30 seconds...
I guess I could get the DDL text of adding these PKs and then try to
run that in a query window... though why would that be any
different...'
David Browne wrote:
> <sdragolov@.gmail.com> wrote in message
> news:1159639554.270613.108730@.c28g2000cwb.googlegroups.com...
> >I am having trouble creating a primary key on a large table (6 mil
> > rows)... on a SQL Server Express 2005 database...
> >
> > After I make the changes to the table and Save, the operation starts
> > but times out after about 30 seconds, saying that the timeout has
> > expired.
> >
> > I tried looking for a timeout that would govern this but I have not
> > been able to find one...
> >
> > My query execution timeout is set to 0 (which is unlimited), though it
> > should be irrelevant because this is not a query.... (in fact, I have
> > no problem running quries that take a few mins)...
> >
> > Any idea where/what I need to change to resolve this'
> >
>
> What tool are you using to run the query? Can you get a script of the
> change and run it in a query window in SQL Server Management Studio?
> David|||<sdragolov@.gmail.com> wrote in message
news:1159647740.250757.210120@.c28g2000cwb.googlegroups.com...
> Well, in theory it's not a "query", right' It's a DDL...
> I am using Management Studio - I right click on the table,and do
> Modify, then I select the two fields and right click and do "Primary
> Key"... Then I finally do Save and that's where the error comes after
> about 30 seconds...
> I guess I could get the DDL text of adding these PKs and then try to
> run that in a query window... though why would that be any
> different...'
Because it's the client tool that generates the timeout, not the server. If
Management Studio will give you the DDL, just run it in a new query window.
David|||David - your suggestion did work... Thanks!
David Browne wrote:
> <sdragolov@.gmail.com> wrote in message
> news:1159647740.250757.210120@.c28g2000cwb.googlegroups.com...
> > Well, in theory it's not a "query", right' It's a DDL...
> >
> > I am using Management Studio - I right click on the table,and do
> > Modify, then I select the two fields and right click and do "Primary
> > Key"... Then I finally do Save and that's where the error comes after
> > about 30 seconds...
> >
> > I guess I could get the DDL text of adding these PKs and then try to
> > run that in a query window... though why would that be any
> > different...'
> Because it's the client tool that generates the timeout, not the server. If
> Management Studio will give you the DDL, just run it in a new query window.
> David
Cannot create index, timeout expires (SQL Server Express 2005)
rows)... on a SQL Server Express 2005 database...
After I make the changes to the table and Save, the operation starts
but times out after about 30 seconds, saying that the timeout has
expired.
I tried looking for a timeout that would govern this but I have not
been able to find one...
My query execution timeout is set to 0 (which is unlimited), though it
should be irrelevant because this is not a query.... (in fact, I have
no problem running quries that take a few mins)...
Any idea where/what I need to change to resolve this'
Thanks in advance.<sdragolov@.gmail.com> wrote in message
news:1159639554.270613.108730@.c28g2000cwb.googlegroups.com...
>I am having trouble creating a primary key on a large table (6 mil
> rows)... on a SQL Server Express 2005 database...
> After I make the changes to the table and Save, the operation starts
> but times out after about 30 seconds, saying that the timeout has
> expired.
> I tried looking for a timeout that would govern this but I have not
> been able to find one...
> My query execution timeout is set to 0 (which is unlimited), though it
> should be irrelevant because this is not a query.... (in fact, I have
> no problem running quries that take a few mins)...
> Any idea where/what I need to change to resolve this'
>
What tool are you using to run the query? Can you get a script of the
change and run it in a query window in SQL Server Management Studio?
David|||Well, in theory it's not a "query", right' It's a DDL...
I am using Management Studio - I right click on the table,and do
Modify, then I select the two fields and right click and do "Primary
Key"... Then I finally do Save and that's where the error comes after
about 30 seconds...
I guess I could get the DDL text of adding these PKs and then try to
run that in a query window... though why would that be any
different...'
David Browne wrote:
> <sdragolov@.gmail.com> wrote in message
> news:1159639554.270613.108730@.c28g2000cwb.googlegroups.com...
>
> What tool are you using to run the query? Can you get a script of the
> change and run it in a query window in SQL Server Management Studio?
> David|||<sdragolov@.gmail.com> wrote in message
news:1159647740.250757.210120@.c28g2000cwb.googlegroups.com...
> Well, in theory it's not a "query", right' It's a DDL...
> I am using Management Studio - I right click on the table,and do
> Modify, then I select the two fields and right click and do "Primary
> Key"... Then I finally do Save and that's where the error comes after
> about 30 seconds...
> I guess I could get the DDL text of adding these PKs and then try to
> run that in a query window... though why would that be any
> different...'
Because it's the client tool that generates the timeout, not the server. If
Management Studio will give you the DDL, just run it in a new query window.
David|||David - your suggestion did work... Thanks!
David Browne wrote:
> <sdragolov@.gmail.com> wrote in message
> news:1159647740.250757.210120@.c28g2000cwb.googlegroups.com...
> Because it's the client tool that generates the timeout, not the server.
If
> Management Studio will give you the DDL, just run it in a new query window
.
> David
Sunday, March 11, 2012
cannot create a stable subkey under a volatile parent key
cannot create a stable subkey under a volatile parent key
I click Continue and the get another warning box
Failed to open connection dialog. Unable to cast object of type 'Microsoft.SqlServer.Managemt.UI.ConnectionDlg.Personalization' to type 'Microsoft.SqlServer.Management.UI.ConnectionDlg.Personalization'.(ConnectionDlg)
Since I cannot use the old Enterprise Manger that we had for SQL 2000, I now have no way to manage the SQL via GUI. Anyone have any ideas for a fix for this?
Run setup first try repair option see if it works if not uninstall and reinstall. Another thing copy the contents of the CDs into your hardrive before running setup. Hope this helps.|||I'm getting the same thing. Happened during installation, also while using. bhopkins reported the same thing, said uninstaslling and reinstalling does not help. Has anyone seen any other info on this?|||I was getting the second message on startup. I removed the express version of Management Studio and corrected|||
Apparently there is a problem caused by SQL Books Online mixing up with Management Studio, as I reinstalled Management Studio to no avail.
Removing SQL Books Online was not enough in my specific case. I had to remove Management Studio as well. Ldubois, I noticed you did so as well. Did you have SQL Books Online installed also?
Just to be safe, I rebooted after removing SQL Books Online and Management Studio..
Then I reinstalled Management Studio & it works (the pesky startup exceptions went away).
There is another related problem, and that is choosing 'File -> Open -> File' from the Management Studio's menu bar & receiving a nice AV and app exit.
I have not reinstalled SQL Books Online, as likely that will resurface the problem.
For me, the procedure I just described resolved these seriously easy to find bugs that made it out of Microsoft.
Hope this helps. Happy New Year 2007!:))
-yoshiro (mark) aoki
|||I know this is old. but here is a KB article with the solution.
http://support.microsoft.com/kb/922214