|
|
-
|
|
One common misconception about checkpoints is that they only write out pages with changes from committed transactions. This is not true—a checkpoint always writes out all dirty pages, regardless of whether the transaction that changed a page has committ...
|
|
-
|
|
This short tip is a result of my quick research in attempt to solve this MSDN thread
http://social.msdn.microsoft.com/Forums/en-US/transactsql/thread/f02aefbd-09a5-4336-84d2-d67bdf238221
In order to use case sensitive search with PATINDEX we need to us...
|
|
-
|
|
If a table (temporary or permanent) is created in the same batch with the query, SQL Server has to recompile the query since the query definition is unknown when the batch is compiled the first time. This is not the case for table variables....
|
|
-
|
|
While writing Stored procedures if the comments are not included in the same batch as that of stored procedure they are not attached to stored procedure.
To understand the above scenario let us consider the following example
/*
Author...
|
|
-
|
|
We may came across situation to rebuilding new log file while attaching database to SQL server. By we doing that we know backup chain will be broken. Also, If you notice recovery model database it has been changed to SIMPLE.
So,we need to make it to FU...
|
|
-
|
|
SQL Server 2008 R2 has new feature to Deploy Report parts.
i.e You report has Table, Chart, Image etc then You can Deploy there report Whole and in parts as well.
To do that Go to Menu Report-> Publish Report Parts (Select The part you want to Deploy...
|
|
-
|
|
Synonyms word says all. To hide the actual name or object from the user.
Using this feature you can hide the linked server objects and directly use it in you database.
To do that follow the steps
1. Create link server.
2. Create synonums and provide ...
|
|
-
|
|
The Format is the new function to format string.
i.e. If you wish to format date in you desire format then.
SELECT FORMAT(sysdatetime(),'yyyyMMdd')...
|
|
-
|
|
The trick is to append `.0e0` to the string and if it returns 1, the value is a whole number (no decimal fractions).
DECLARE @val VARCHAR(100)
SELECT @val = 'a'
SELECT ISNUMERIC(@val + '.0e0')
-- Returns 0
SELECT @val = '25'
SELECT ISNUMERIC(@...
|
|
-
|
|
Whenever you have a filtered index you just might find that it's not used when its columns are compared to a variable.
The thing is, SQL Server will always make an Excecution Plan that would work with any values for those variable (including the values ...
|
|