Viewing 15 posts - 1 through 15 (of 69 total)
Hi All,
The script is updated to get the integer value of the major version number; instead of comparing the varchar values. also, this script will work for all the...
November 1, 2013 at 7:39 am
Hi MMcPherson,
This will work more so becasue this statement will truncate the 10 and 11 to 1 (due to varchar(1)) and compare that against 1.
More accurate statement would be:
IF LEFT(CAST(Serverproperty('ProductVersion')...
October 29, 2013 at 1:20 pm
Hi gshouse,
Actually, this script will work for 2000, 2005, 2008 and hopefully 2012. I dont know if this will work for 6.5 though.
The reason is sys tables that have...
October 29, 2013 at 1:13 pm
I have updated the script to get data for SQL Server 2008(tested) and SQL Server 2012(not tested). Once it gets published, you can get the script from the webpage. But...
October 29, 2013 at 10:51 am
David, Thank you for the kind words!!
July 16, 2013 at 9:38 am
I originally wrote this function, to be used in another function that searches for a keyword in the stored procedures. I was getting false hits for the words in the...
July 5, 2012 at 9:28 am
You can handle all the nested comments by using the following code:
DECLARE
@comment VARCHAR(100),
@endPosition INT,
@startPosition INT,
@commentLen INT,
@substrlen INT,
@len INT
WHILE (CHARINDEX('/*',@def)<>0)
BEGIN
SET @endPosition = charindex('*/',@def)
SET @substrlen=len(substring(@def,1,@endPosition-1))
SET @startPosition...
June 28, 2012 at 4:32 pm
Hi Rajesh
SELECT * FROM dbo.Ufn_RemoveComments2 (' HELLO /* WORLD */ ')
This code doesn't seem to yield any results using your function. It does work nicely with nested comments.
June 25, 2012 at 2:38 pm
FreeHansje (7/8/2009)
July 9, 2009 at 8:20 am
adam (4/6/2009)
Can someone post the modified script for 2008?
Hi Adam,
I made changes to the code so that it would work on 2008 as well. Post back if you see...
April 6, 2009 at 10:37 am
Hi Krishna, I was talking about shrinking log file with TruncateOnly option. I thought it was apparent in the script I posted, perhaps not. For the record, we both are...
April 2, 2009 at 8:54 pm
Shivaram Challa (3/26/2009)One should monitor log file regularly and should be taking regular transaction log backups.
Now, if taking log backups isn't needed, then you can do a "dbcc Shrinkfile"...
April 2, 2009 at 12:25 pm
Krishna Potlakayala (3/26/2009) You would not be able to shrink the log file unless you truncate it. When the sys.databases "log_reuse_wait_dec" coulmn status is "LOG_BACKUP", then you should first take...
April 2, 2009 at 10:09 am
Hi Rubinasd,
SID is a security identifier for the login, you can get the loginname from sys.syslogins table.
Name is the UserName in the corresponding database, for the corresponding login.
My take at...
March 26, 2009 at 9:29 pm
One should monitor log file regularly and should be taking regular transaction log backups.
Now, if taking log backups isn't needed, then you can do a "dbcc Shrinkfile" on...
March 26, 2009 at 2:21 pm
Viewing 15 posts - 1 through 15 (of 69 total)