Tag Info

Hot answers tagged

7

It's signifying a unique constraint. In SQL Server, a unique constraint is actually implemented as an index under the covers; this is why it appears under the Indexes node as well (I can't give you a good explanation of why it is not at least listed under the Constraints node, nor why they chose an upside down key instead of just a different color). You ...


3

John is right that the updated syntax error message you get: Msg 1034, Level 15, State 1, Procedure trigger Syntax error: Duplicate specification of the action "UPDATE" in the trigger declaration. This is absolutely because the trigger is specified as FOR UPDATE, UPDATE. This syntax was allowed in older compatibility levels but not in modern ones. ...


2

You can use a CHECK constraint with a CASE expression. If check2 is enabled, make sure check1 is enabled too, otherwise you can default to a no-op ("checking" that check1 = check1). For simplicity I'm assuming these columns are not NULLable. CREATE TABLE dbo.foo ( check1 BIT NOT NULL DEFAULT 0, check2 BIT NOT NULL DEFAULT 0, CONSTRAINT ck_both CHECK ...


2

You have a odd system. Your database size is 350+ G and you have 32 bit system I would say this is a system which I would never like to have in my environment. Its very difficult to manage 350 G database on 32 bit SQL Server which has VAS limit(by default) of 2 G. You are bound to face memory pressure going ahead. AWE in 32 bit system only allows SQL ...


2

If the database is in full recovery mode and you are doing periodic log backups then you can find the login that deleted the data, and the exact moment the data was deleted. Read How to read and interpret the SQL Server log. Also, with a proper backup strategy in place, it will be trivial to recover the deleted data as well. On the other hand, if you do not ...


1

The actual syntax for the command shows that there is no such thing as FOR UPDATE, UPDATE - or rather that it just doesn't make any sense: CREATE TRIGGER [ schema_name . ]trigger_name ON { table | view } [ WITH <dml_trigger_option> [ ,...n ] ] { FOR | AFTER | INSTEAD OF } { [ INSERT ] [ , ] [ UPDATE ] [ , ] [ DELETE ] } AS { sql_statement [ ; ...


1

One option would be if you had a server side trace running while that incident happened or you have to dig into the transaction logs using fn_dblog (this is undocumented and unsupported). Below query might help if the data is still persistent in DMV: --- who did what ?? SELECT cr.DatabaseName ,s.session_id ,s.host_name ,s.program_name ...


1

As per logs you posted Products Detected Language Level Patch Level Platform Edition Database Services (ALCSQLMFG) ENU SP1 2005.090.2047.00 x64 STANDARD Database Services (MSSQLSERVER) ENU SP4 2005.090.5069.00 x86 STANDARD Reporting Services (MSSQLSERVER) ENU ...



Only top voted, non community-wiki answers of a minimum length are eligible