Saturday, February 25, 2012

Missing Keys & Relationships

(Cross posted to the active server pages listserv at 15Seconds.com)
A few weeks ago I posted a message about keys and relationships that
mysteriously disappeared on our production SQL Server 2000 database. I
managed to restore all of the missing attributes with success. But it
happened again this morning
How can all of the keys and relationships in my database be wiped out in one
deft move? Is there anything in the Master database or elsewhere that could
cause everything to disappear at once?
The system administrator is not a DBA, so human-error is definitely a
possibility. They are going to blame the scripts that are used to update
the stored procedures, but the same scripts are tested on our test
deployment server and work flawlessly. The scripts contained no changes to
database tables - they strictly updated stored procedures.
Thanks for your help.
DaveThis is a multi-part message in MIME format.
--=_NextPart_000_02E7_01C36018.E9B80A20
Content-Type: text/plain;
charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable
Is it possible that some sort of scheduled process executes a script to =drop all constraints?
-- Tom
---
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinnaclepublishing.com/sql
"Dave" <dave@.glimmernet.com> wrote in message =news:eskCToDYDHA.2484@.TK2MSFTNGP09.phx.gbl...
(Cross posted to the active server pages listserv at 15Seconds.com)
A few weeks ago I posted a message about keys and relationships that
mysteriously disappeared on our production SQL Server 2000 database. I
managed to restore all of the missing attributes with success. But it
happened again this morning
How can all of the keys and relationships in my database be wiped out in =one
deft move? Is there anything in the Master database or elsewhere that =could
cause everything to disappear at once?
The system administrator is not a DBA, so human-error is definitely a
possibility. They are going to blame the scripts that are used to =update
the stored procedures, but the same scripts are tested on our test
deployment server and work flawlessly. The scripts contained no changes =to
database tables - they strictly updated stored procedures.
Thanks for your help.
Dave
--=_NextPart_000_02E7_01C36018.E9B80A20
Content-Type: text/html;
charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
&

Is it possible that some sort of =scheduled process executes a script to drop all constraints?
-- Tom
---T=homas A. Moreau, BSc, PhD, MCSE, MCDBASQL Server MVPColumnist, SQL =Server ProfessionalToronto, ON Canadahttp://www.pinnaclepublishing.com/sql">www.pinnaclepublishing.com=/sql
"Dave" wrote in message news:eskCToDYDHA.2484=@.TK2MSFTNGP09.phx.gbl...(Cross posted to the active server pages listserv at 15Seconds.com)A =few weeks ago I posted a message about keys and relationships thatmysteriously =disappeared on our production SQL Server 2000 database. =Imanaged to restore all of the missing attributes with success. But ithappened =again this morningHow can all of the keys and relationships in my =database be wiped out in onedeft move? Is there anything in the Master =database or elsewhere that couldcause everything to disappear at =once?The system administrator is not a DBA, so human-error is definitely =apossibility. They are going to blame the scripts that are used to updatethe =stored procedures, but the same scripts are tested on our testdeployment =server and work flawlessly. The scripts contained no changes todatabase =tables - they strictly updated stored procedures.Thanks for your help.Dave

--=_NextPart_000_02E7_01C36018.E9B80A20--|||The data definitions didn't change, so there was no move during this time.
What we did the first time when they all disapeared was to detach the
database (jsut the database, not Master). Then I attached it on the
developmet server, updated the keys, detached it and reattached it to the
production database.
Today we updated some stored procedures, and the script we used was
generated by SQL Server. It's pretty standard: drops the stored procedures
if they exist and then re/create them. Simple stuff, really, so I'm not
convinced it is our script. I haven't totally ruled it out, but I would
guess it's not my script.
Dave
"Allan Mitchell" <allan@.no-spam.sqldts.com> wrote in message
news:u5snHqDYDHA.416@.tk2msftngp13.phx.gbl...
> How are you moving the data/definitions?
> From what to what?
> It certainly should not miss anything out especially if you are using the
exact same script on another server and it works fine.
>
> --
> Allan Mitchell (Microsoft SQL Server MVP)
> MCSE,MCDBA
> www.SQLDTS.com
> I support PASS - the definitive, global community
> for SQL Server professionals - http://www.sqlpass.org|||This is a multi-part message in MIME format.
--=_NextPart_000_030E_01C3601A.4BFC0690
Content-Type: text/plain;
charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable
No. To drop constraints takes a deliberate act and to drop them all =would require some sort of script. I'd be curious if there was a stored =proc in your database that does this. If you want to be absolutely =certain of when this happens, I'd use the profiler.
-- Tom
---
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinnaclepublishing.com/sql
"Dave" <dave@.glimmernet.com> wrote in message =news:OVaposDYDHA.1644@.TK2MSFTNGP10.phx.gbl...
I sure hope not because it's not anything I configured.
Are there any SQL defaults that might mimic this?
Dave
"Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message =news:eRRZfqDYDHA.2256@.TK2MSFTNGP10.phx.gbl...
Is it possible that some sort of scheduled process executes a script =to drop all constraints?
-- Tom
---
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinnaclepublishing.com/sql
"Dave" <dave@.glimmernet.com> wrote in message =news:eskCToDYDHA.2484@.TK2MSFTNGP09.phx.gbl...
(Cross posted to the active server pages listserv at 15Seconds.com)
A few weeks ago I posted a message about keys and relationships that
mysteriously disappeared on our production SQL Server 2000 database. =I
managed to restore all of the missing attributes with success. But it
happened again this morning
How can all of the keys and relationships in my database be wiped out =in one
deft move? Is there anything in the Master database or elsewhere that =could
cause everything to disappear at once?
The system administrator is not a DBA, so human-error is definitely a
possibility. They are going to blame the scripts that are used to =update
the stored procedures, but the same scripts are tested on our test
deployment server and work flawlessly. The scripts contained no =changes to
database tables - they strictly updated stored procedures.
Thanks for your help.
Dave
--=_NextPart_000_030E_01C3601A.4BFC0690
Content-Type: text/html;
charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
&

No. To drop constraints takes a =deliberate act and to drop them all would require some sort of script. I'd be =curious if there was a stored proc in your database that does this. If you =want to be absolutely certain of when this happens, I'd use the =profiler.
-- Tom
---T=homas A. Moreau, BSc, PhD, MCSE, MCDBASQL Server MVPColumnist, SQL =Server ProfessionalToronto, ON Canadahttp://www.pinnaclepublishing.com/sql">www.pinnaclepublishing.com=/sql
"Dave" wrote in message news:OVaposDYDHA.1644=@.TK2MSFTNGP10.phx.gbl...
I sure hope not because it's not =anything I configured.
Are there any SQL defaults that might =mimic this?
Dave
"Tom Moreau" = wrote in message news:eRRZfqDYDHA.2256=@.TK2MSFTNGP10.phx.gbl...
Is it possible that some sort of =scheduled process executes a script to drop all constraints?
-- Tom

=---T=homas A. Moreau, BSc, PhD, MCSE, MCDBASQL Server MVPColumnist, SQL =Server ProfessionalToronto, ON Canadahttp://www.pinnaclepublishing.com/sql">www.pinnaclepublishing.com=/sql


"Dave" wrote =in message news:eskCToDYDHA.2484=@.TK2MSFTNGP09.phx.gbl...(Cross posted to the active server pages listserv at 15Seconds.com)A =few weeks ago I posted a message about keys and relationships =thatmysteriously disappeared on our production SQL Server 2000 database. =Imanaged to restore all of the missing attributes with success. But ithappened =again this morningHow can all of the keys and relationships in my =database be wiped out in onedeft move? Is there anything in the =Master database or elsewhere that couldcause everything to disappear at once?The system administrator is not a DBA, so human-error is definitely apossibility. They are going to blame the scripts =that are used to updatethe stored procedures, but the same scripts are =tested on our testdeployment server and work flawlessly. The =scripts contained no changes todatabase tables - they strictly updated =stored procedures.Thanks for your help.Dave

--=_NextPart_000_030E_01C3601A.4BFC0690--|||This is a multi-part message in MIME format.
--=_NextPart_000_0036_01C3601B.602B9BC0
Content-Type: text/plain;
charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable
That's what I thought - that deleting these constraints is a chore and =can't really happen "accidentally"
Once, our script was accidentally run against the master database and =ended up creating a bunch of unncessary stored procedures. I know that =the system admin went to clean that out, and I was wondering if she =touched some other thing in the process and that something in the master =database is now causing this behavior.
I keep thinking it's accidental, but, if it were intentional, how would =this get done?
Is there any way to retroactively figure out exactly when this happend?
Thanks for all of your help, Tom
Dave
"Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message =news:eNjQZvDYDHA.536@.TK2MSFTNGP10.phx.gbl...
No. To drop constraints takes a deliberate act and to drop them all =would require some sort of script. I'd be curious if there was a stored =proc in your database that does this. If you want to be absolutely =certain of when this happens, I'd use the profiler.
-- Tom
---
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinnaclepublishing.com/sql
"Dave" <dave@.glimmernet.com> wrote in message =news:OVaposDYDHA.1644@.TK2MSFTNGP10.phx.gbl...
I sure hope not because it's not anything I configured.
Are there any SQL defaults that might mimic this?
Dave
"Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message =news:eRRZfqDYDHA.2256@.TK2MSFTNGP10.phx.gbl...
Is it possible that some sort of scheduled process executes a script =to drop all constraints?
-- Tom
---
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinnaclepublishing.com/sql
"Dave" <dave@.glimmernet.com> wrote in message =news:eskCToDYDHA.2484@.TK2MSFTNGP09.phx.gbl...
(Cross posted to the active server pages listserv at 15Seconds.com)
A few weeks ago I posted a message about keys and relationships that
mysteriously disappeared on our production SQL Server 2000 database. = I
managed to restore all of the missing attributes with success. But =it
happened again this morning
How can all of the keys and relationships in my database be wiped =out in one
deft move? Is there anything in the Master database or elsewhere =that could
cause everything to disappear at once?
The system administrator is not a DBA, so human-error is definitely =a
possibility. They are going to blame the scripts that are used to =update
the stored procedures, but the same scripts are tested on our test
deployment server and work flawlessly. The scripts contained no =changes to
database tables - they strictly updated stored procedures.
Thanks for your help.
Dave
--=_NextPart_000_0036_01C3601B.602B9BC0
Content-Type: text/html;
charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =charset=3Dwindows-1252">
<META content=3D"MSHTML 6.00.2800.1170" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#c0c0c0>
<DIV><FONT face=3DArial size=3D2>That's what I thought - that deleting =these constraints is a chore and can't really happen ="accidentally"</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Once, our script was accidentally run =against the master database and ended up creating a bunch of unncessary stored procedures. I know that the system admin went to clean that out, =and I was wondering if she touched some other thing in the process and that =something in the master database is now causing this behavior.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>I keep thinking it's accidental, but, =if it were intentional, how would this get done?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Is there any way to retroactively =figure out exactly when this happend?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Thanks for all of your help, =Tom</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Dave</FONT></DIV>
<BLOCKQUOTE dir=3Dltr style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Tom Moreau" <<A =href=3D"mailto:tom@.dont.spam.me.cips.ca">tom@.dont.spam.me.cips.ca</A>>= wrote in message <A =href=3D"news:eNjQZvDYDHA.536@.TK2MSFTNGP10.phx.gbl">news:eNjQZvDYDHA.536@.T=K2MSFTNGP10.phx.gbl</A>...</DIV>
<DIV><FONT face=3DTahoma size=3D2>No. To drop constraints takes =a deliberate act and to drop them all would require some sort of script. I'd =be curious if there was a stored proc in your database that does =this. If you want to be absolutely certain of when this happens, I'd use the profiler.</FONT></DIV>
<DIV><BR>-- <BR>Tom</DIV>
<DIV> </DIV>
=<DIV>---<BR>T=homas A. Moreau, BSc, PhD, MCSE, MCDBA<BR>SQL Server MVP<BR>Columnist, SQL =Server Professional<BR>Toronto, ON Canada<BR><A =href=3D"www.pinnaclepublishing.com=">http://www.pinnaclepublishing.com/sql">www.pinnaclepublishing.com=
/sql</A></DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV>"Dave" <<A href=3D"mailto:dave@.glimmernet.com">dave@.glimmernet.com</A>> wrote =in message <A =href=3D"news:OVaposDYDHA.1644@.TK2MSFTNGP10.phx.gbl">news:OVaposDYDHA.1644=@.TK2MSFTNGP10.phx.gbl</A>...</DIV>
<DIV><FONT face=3DArial size=3D2>I sure hope not because it's not =anything I configured.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Are there any SQL defaults that might =mimic this?</FONT><FONT face=3DArial size=3D2></FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Dave</FONT></DIV>
<BLOCKQUOTE style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Tom Moreau" <<A =href=3D"mailto:tom@.dont.spam.me.cips.ca">tom@.dont.spam.me.cips.ca</A>>= wrote in message <A =href=3D"news:eRRZfqDYDHA.2256@.TK2MSFTNGP10.phx.gbl">news:eRRZfqDYDHA.2256=@.TK2MSFTNGP10.phx.gbl</A>...</DIV>
<DIV><FONT face=3DTahoma size=3D2>Is it possible that some sort of =scheduled process executes a script to drop all constraints?</FONT></DIV>
<DIV><BR>-- <BR>Tom</DIV>
<DIV> </DIV>
=<DIV>---<BR>T=homas A. Moreau, BSc, PhD, MCSE, MCDBA<BR>SQL Server MVP<BR>Columnist, SQL =Server Professional<BR>Toronto, ON Canada<BR><A =href=3D"www.pinnaclepublishing.com=">http://www.pinnaclepublishing.com/sql">www.pinnaclepublishing.com=
/sql</A></DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV>"Dave" <<A href=3D"mailto:dave@.glimmernet.com">dave@.glimmernet.com</A>> =wrote in message <A =href=3D"news:eskCToDYDHA.2484@.TK2MSFTNGP09.phx.gbl">news:eskCToDYDHA.2484=@.TK2MSFTNGP09.phx.gbl</A>...</DIV>(Cross posted to the active server pages listserv at =15Seconds.com)<BR><BR>A few weeks ago I posted a message about keys and relationships that<BR>mysteriously disappeared on our production SQL Server 2000 database. I<BR>managed to restore all of the missing =attributes with success. But it<BR>happened again this morning<BR><BR>How can all of =the keys and relationships in my database be wiped out in one<BR>deft move? Is there anything in the Master database or elsewhere =that could<BR>cause everything to disappear at once?<BR><BR>The system administrator is not a DBA, so human-error is definitely a<BR>possibility. They are going to blame the scripts that are =used to update<BR>the stored procedures, but the same scripts are tested on =our test<BR>deployment server and work flawlessly. The scripts =contained no changes to<BR>database tables - they strictly updated stored procedures.<BR><BR>Thanks for your =help.<BR><BR>Dave<BR><BR><BR><BR><BR></BLOCKQUOTE></BLOCKQUOTE></BODY></H=TML>
--=_NextPart_000_0036_01C3601B.602B9BC0--|||OK
detaching the DB is sound.
Attach is sound
To this point here there most definitley will not be key losses.
By Updated the keys do you mean ?
EXEC sp_UPDATESTATS
I would profiler the drop procs script or read it very carefully
Allan Mitchell (Microsoft SQL Server MVP)
MCSE,MCDBA
www.SQLDTS.com
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org|||This is a multi-part message in MIME format.
--=_NextPart_000_0346_01C3601D.559545B0
Content-Type: text/plain;
charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable
You may be able to find out by using Lumigent's Log Explorer - =www.lumigent.com - although I don't know if it tracks constraint =removal. To add to Allan's comments, I'd search through your scripts =for the phase 'drop constraint'.
-- Tom
---
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinnaclepublishing.com/sql
"Dave" <dave@.glimmernet.com> wrote in message =news:OTsepzDYDHA.1492@.TK2MSFTNGP12.phx.gbl...
That's what I thought - that deleting these constraints is a chore and =can't really happen "accidentally"
Once, our script was accidentally run against the master database and =ended up creating a bunch of unncessary stored procedures. I know that =the system admin went to clean that out, and I was wondering if she =touched some other thing in the process and that something in the master =database is now causing this behavior.
I keep thinking it's accidental, but, if it were intentional, how would =this get done?
Is there any way to retroactively figure out exactly when this happend?
Thanks for all of your help, Tom
Dave
"Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message =news:eNjQZvDYDHA.536@.TK2MSFTNGP10.phx.gbl...
No. To drop constraints takes a deliberate act and to drop them all =would require some sort of script. I'd be curious if there was a stored =proc in your database that does this. If you want to be absolutely =certain of when this happens, I'd use the profiler.
-- Tom
---
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinnaclepublishing.com/sql
"Dave" <dave@.glimmernet.com> wrote in message =news:OVaposDYDHA.1644@.TK2MSFTNGP10.phx.gbl...
I sure hope not because it's not anything I configured.
Are there any SQL defaults that might mimic this?
Dave
"Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message =news:eRRZfqDYDHA.2256@.TK2MSFTNGP10.phx.gbl...
Is it possible that some sort of scheduled process executes a script =to drop all constraints?
-- Tom
---
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinnaclepublishing.com/sql
"Dave" <dave@.glimmernet.com> wrote in message =news:eskCToDYDHA.2484@.TK2MSFTNGP09.phx.gbl...
(Cross posted to the active server pages listserv at 15Seconds.com)
A few weeks ago I posted a message about keys and relationships that
mysteriously disappeared on our production SQL Server 2000 database. = I
managed to restore all of the missing attributes with success. But =it
happened again this morning
How can all of the keys and relationships in my database be wiped =out in one
deft move? Is there anything in the Master database or elsewhere =that could
cause everything to disappear at once?
The system administrator is not a DBA, so human-error is definitely =a
possibility. They are going to blame the scripts that are used to =update
the stored procedures, but the same scripts are tested on our test
deployment server and work flawlessly. The scripts contained no =changes to
database tables - they strictly updated stored procedures.
Thanks for your help.
Dave
--=_NextPart_000_0346_01C3601D.559545B0
Content-Type: text/html;
charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =charset=3Dwindows-1252">
<META content=3D"MSHTML 5.50.4207.2601" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#c0c0c0>
<DIV><FONT face=3DTahoma size=3D2>You may be able to find out by using =Lumigent's Log Explorer - <A href=3D"www.lumigent.com</A>">http://www.lumigent.com">www.lumigent.com</A> =- although I don't know if it tracks constraint removal. To add to Allan's =comments, I'd search through your scripts for the phase 'drop =constraint'.</FONT></DIV>
<DIV><BR>-- <BR>Tom</DIV>
<DIV> </DIV>
<DIV>---<BR>T=homas A. Moreau, BSc, PhD, MCSE, MCDBA<BR>SQL Server MVP<BR>Columnist, SQL =Server Professional<BR>Toronto, ON Canada<BR><A href=3D"www.pinnaclepublishing.com=">http://www.pinnaclepublishing.com/sql">www.pinnaclepublishing.com=
/sql</A></DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV>"Dave" <<A =href=3D"mailto:dave@.glimmernet.com">dave@.glimmernet.com</A>> wrote in message <A href=3D"news:OTsepzDYDHA.1492@.TK2MSFTNGP12.phx.gbl">news:OTsepzDYDHA.1492=@.TK2MSFTNGP12.phx.gbl</A>...</DIV>
<DIV><FONT face=3DArial size=3D2>That's what I thought - that deleting =these constraints is a chore and can't really happen ="accidentally"</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Once, our script was accidentally run =against the master database and ended up creating a bunch of unncessary stored procedures. I know that the system admin went to clean that out, =and I was wondering if she touched some other thing in the process and that =something in the master database is now causing this behavior.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>I keep thinking it's accidental, but, =if it were intentional, how would this get done?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Is there any way to retroactively =figure out exactly when this happend?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Thanks for all of your help, =Tom</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Dave</FONT></DIV>
<BLOCKQUOTE dir=3Dltr style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Tom Moreau" <<A =href=3D"mailto:tom@.dont.spam.me.cips.ca">tom@.dont.spam.me.cips.ca</A>>= wrote in message <A =href=3D"news:eNjQZvDYDHA.536@.TK2MSFTNGP10.phx.gbl">news:eNjQZvDYDHA.536@.T=K2MSFTNGP10.phx.gbl</A>...</DIV>
<DIV><FONT face=3DTahoma size=3D2>No. To drop constraints takes =a deliberate act and to drop them all would require some sort of script. I'd =be curious if there was a stored proc in your database that does =this. If you want to be absolutely certain of when this happens, I'd use the profiler.</FONT></DIV>
<DIV><BR>-- <BR>Tom</DIV>
<DIV> </DIV>
=<DIV>---<BR>T=homas A. Moreau, BSc, PhD, MCSE, MCDBA<BR>SQL Server MVP<BR>Columnist, SQL =Server Professional<BR>Toronto, ON Canada<BR><A =href=3D"www.pinnaclepublishing.com=">http://www.pinnaclepublishing.com/sql">www.pinnaclepublishing.com=
/sql</A></DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV>"Dave" <<A href=3D"mailto:dave@.glimmernet.com">dave@.glimmernet.com</A>> wrote =in message <A =href=3D"news:OVaposDYDHA.1644@.TK2MSFTNGP10.phx.gbl">news:OVaposDYDHA.1644=@.TK2MSFTNGP10.phx.gbl</A>...</DIV>
<DIV><FONT face=3DArial size=3D2>I sure hope not because it's not =anything I configured.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Are there any SQL defaults that might =mimic this?</FONT><FONT face=3DArial size=3D2></FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Dave</FONT></DIV>
<BLOCKQUOTE style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Tom Moreau" <<A =href=3D"mailto:tom@.dont.spam.me.cips.ca">tom@.dont.spam.me.cips.ca</A>>= wrote in message <A =href=3D"news:eRRZfqDYDHA.2256@.TK2MSFTNGP10.phx.gbl">news:eRRZfqDYDHA.2256=@.TK2MSFTNGP10.phx.gbl</A>...</DIV>
<DIV><FONT face=3DTahoma size=3D2>Is it possible that some sort of =scheduled process executes a script to drop all constraints?</FONT></DIV>
<DIV><BR>-- <BR>Tom</DIV>
<DIV> </DIV>
=<DIV>---<BR>T=homas A. Moreau, BSc, PhD, MCSE, MCDBA<BR>SQL Server MVP<BR>Columnist, SQL =Server Professional<BR>Toronto, ON Canada<BR><A =href=3D"www.pinnaclepublishing.com=">http://www.pinnaclepublishing.com/sql">www.pinnaclepublishing.com=
/sql</A></DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV>"Dave" <<A href=3D"mailto:dave@.glimmernet.com">dave@.glimmernet.com</A>> =wrote in message <A =href=3D"news:eskCToDYDHA.2484@.TK2MSFTNGP09.phx.gbl">news:eskCToDYDHA.2484=@.TK2MSFTNGP09.phx.gbl</A>...</DIV>(Cross posted to the active server pages listserv at =15Seconds.com)<BR><BR>A few weeks ago I posted a message about keys and relationships that<BR>mysteriously disappeared on our production SQL Server 2000 database. I<BR>managed to restore all of the missing =attributes with success. But it<BR>happened again this morning<BR><BR>How can all of =the keys and relationships in my database be wiped out in one<BR>deft move? Is there anything in the Master database or elsewhere =that could<BR>cause everything to disappear at once?<BR><BR>The system administrator is not a DBA, so human-error is definitely a<BR>possibility. They are going to blame the scripts that are =used to update<BR>the stored procedures, but the same scripts are tested on =our test<BR>deployment server and work flawlessly. The scripts =contained no changes to<BR>database tables - they strictly updated stored procedures.<BR><BR>Thanks for your =help.<BR><BR>Dave<BR><BR><BR><BR><BR></BLOCKQUOTE></BLOCKQUOTE></BODY></H=TML>
--=_NextPart_000_0346_01C3601D.559545B0--|||Well, this problem has been resolved.
The one deft move: apparently the system admin detached the database and
reattached an old version...
I can't win.
But thanks to everyone who helped out. I still have no idea what happened
to the constraints the first time, but it's working now so that's all I can
ask for.
Dave
"Dave" <dave@.glimmernet.com> wrote in message
news:eskCToDYDHA.2484@.TK2MSFTNGP09.phx.gbl...
> (Cross posted to the active server pages listserv at 15Seconds.com)
> A few weeks ago I posted a message about keys and relationships that
> mysteriously disappeared on our production SQL Server 2000 database. I
> managed to restore all of the missing attributes with success. But it
> happened again this morning
> How can all of the keys and relationships in my database be wiped out in
one
> deft move? Is there anything in the Master database or elsewhere that
could
> cause everything to disappear at once?
> The system administrator is not a DBA, so human-error is definitely a
> possibility. They are going to blame the scripts that are used to update
> the stored procedures, but the same scripts are tested on our test
> deployment server and work flawlessly. The scripts contained no changes
to
> database tables - they strictly updated stored procedures.
> Thanks for your help.
> Dave
>
>
>|||This is a multi-part message in MIME format.
--=_NextPart_000_038D_01C36020.23BE9B60
Content-Type: text/plain;
charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable
Looks like she owes you lunch. No ... wait ... she owes us lunch. Make =mine medium rare ... with a baked potato. ;-)
-- Tom
---
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinnaclepublishing.com/sql
"Dave" <dave@.glimmernet.com> wrote in message =news:uSYgT8DYDHA.1492@.TK2MSFTNGP12.phx.gbl...
Well, this problem has been resolved.
The one deft move: apparently the system admin detached the database and
reattached an old version...
I can't win.
But thanks to everyone who helped out. I still have no idea what =happened
to the constraints the first time, but it's working now so that's all I =can
ask for.
Dave
"Dave" <dave@.glimmernet.com> wrote in message
news:eskCToDYDHA.2484@.TK2MSFTNGP09.phx.gbl...
> (Cross posted to the active server pages listserv at 15Seconds.com)
> A few weeks ago I posted a message about keys and relationships that
> mysteriously disappeared on our production SQL Server 2000 database. =I
> managed to restore all of the missing attributes with success. But it
> happened again this morning
> How can all of the keys and relationships in my database be wiped out =in
one
> deft move? Is there anything in the Master database or elsewhere that
could
> cause everything to disappear at once?
> The system administrator is not a DBA, so human-error is definitely a
> possibility. They are going to blame the scripts that are used to =update
> the stored procedures, but the same scripts are tested on our test
> deployment server and work flawlessly. The scripts contained no =changes
to
> database tables - they strictly updated stored procedures.
> Thanks for your help.
> Dave
>
>
>
--=_NextPart_000_038D_01C36020.23BE9B60
Content-Type: text/html;
charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
&

Looks like she owes you lunch. =No ... wait ... she owes us lunch. Make mine medium =rare ... with a baked potato. ;-)
-- Tom
---T=homas A. Moreau, BSc, PhD, MCSE, MCDBASQL Server MVPColumnist, SQL =Server ProfessionalToronto, ON Canadahttp://www.pinnaclepublishing.com/sql">www.pinnaclepublishing.com=/sql
"Dave" wrote in message news:uSYgT8DYDHA.1492=@.TK2MSFTNGP12.phx.gbl...Well, this problem has been resolved.The one deft move: apparently the =system admin detached the database andreattached an old =version...I can't win.But thanks to everyone who helped out. I still have no =idea what happenedto the constraints the first time, but it's working now =so that's all I canask for.Dave"Dave" wrote in =messagenews:eskCToDYDHA.2484=@.TK2MSFTNGP09.phx.gbl...> (Cross posted to the active server pages listserv at 15Seconds.com)>> A few weeks ago I posted a message about =keys and relationships that> mysteriously disappeared on our production =SQL Server 2000 database. I> managed to restore all of the missing =attributes with success. But it> happened again this morning>> =How can all of the keys and relationships in my database be wiped out =inone> deft move? Is there anything in the Master database or elsewhere thatcould> cause everything to disappear at =once?>> The system administrator is not a DBA, so human-error is definitely =a> possibility. They are going to blame the scripts that are used to update> the stored procedures, but the same scripts are tested on =our test> deployment server and work flawlessly. The scripts =contained no changesto> database tables - they strictly updated stored procedures.>> Thanks for your help.>> Dave>>>>>

--=_NextPart_000_038D_01C36020.23BE9B60--|||There's no answer to that <grin>
Allan Mitchell (Microsoft SQL Server MVP)
MCSE,MCDBA
www.SQLDTS.com
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org

No comments:

Post a Comment