Tag Info

New answers tagged

3

You're querying two different things here. xp_fixeddrives will show you the amount of free space on the disk. Using sys.dm views will tell you how much free space there is in the tempdb data file. If the data file is 50GB, then you're only using 5GB of it and the rest is empty. Even though it's empty, the file exists and is taking up 50GB of space on your ...


0

You should really consider upgrading to a more recent version, especially if you want to utilize some of the best parts of Full Text Search. To your question, the short answer is yes. From the documentation for 2005, you have two main features to customize in a thesaurus, Expansion Sets and Replacement Sets: An expansion set contains a group of ...


1

Use: A foreign data wrapper like odbc_fdw or tds_fdw (see foreign data wrappers list, foreign data wrapper documentation); or dbi-link - see github repo


4

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 [ ; ...


5

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. ...


0

To shrink your database log: ALTER DATABASE [your db name] SET RECOVERY SIMPLE WITH NO_WAIT DBCC SHRINKFILE(N'file name ', 1) ALTER DATABASE [your db name] SET RECOVERY FULL WITH NO_WAIT


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

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 ...


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 ...


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 ...


0

You can easily do this with a CLR Stored Procedure. [SqlFunction] public static SqlDateTime ToLocalTime(SqlDateTime UtcTime, SqlString TimeZoneId) { if (UtcTime.IsNull) return UtcTime; var timeZone = TimeZoneInfo.FindSystemTimeZoneById(TimeZoneId.Value); var localTime = TimeZoneInfo.ConvertTimeFromUtc(UtcTime.Value, timeZone); ...


0

A bit late for answer, but yact on github uses SQL trigger to store the before and after changes as XML.


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 ...



Top 50 recent answers are included