Sunday, May 22, 2011
Ever wonder what DUMP_LOG_COORDINATOR_QUEUE wait is?
Note that I did not run this in a production server so I have no issues running the undocumented function. Use it at your own risk.
Monday, April 4, 2011
bass_player on Microsoft Talk TechNet
Event ID: 1032483824
Language(s): English.
Product(s): Microsoft SQL Server 2008 R2.
Audience(s): IT Generalist.
For those of you who have missed the event, the recording has been made available for download
Tuesday, February 23, 2010
Connecting to SQL Server via Windows PowerShell with SQL Server authentication
Here's an article I wrote on how to use Windows PowerShell to connect to SQL Server via mixed mode authentication
Wednesday, October 7, 2009
NT AUTHORITY\NETWORK SERVICE account in SharePoint Content Database
I went back to the SharePoint Central Administration after that to switch the configuration of the content database from using a SQL Server login to using Windows authentication. That did the trick.
Note that if you are moving your SharePoint databases from SQL Server 2005 to SQL Server 2008, whether within Windows SBS or a full blown Windows Server system, make sure you check the logins as they need to be moved as well for the SharePoint application to work. You can even use the transfer SQL Server logins script from Microsoft to do this
Tuesday, May 19, 2009
Backup on shared folders running on a local system account?
While I do not advocate such workarounds as it opens up additional security loopholes, it still is a workaround. And as I usuallly say, WARNING: This is not a recommended approach. Use at your own risk
Microsoft has a documented procedure to enable null sessions shares and while the KB article mentions Windows 2000, it does work for Windows Server 2003. This should be done on the Windows machine that hosts the shared folder. A word of caution if you intend to use this approach - document every step that you do and make sure you rollback any changes made after generating your database backup. Tasks like enabling the Guest user account (this is disabled by default), modifying the registry, etc. should be rolled back as soon as you're done, otherwise, you're opening up security vulnerabilities across your network.
Tuesday, March 10, 2009
How to immediately shrink the SQL Server log files
- Backup the transaction log. This will truncate the log
- Shrink the log file
Pretty simple, right? Well, there are times when this might not work because SQL Server does not shrink the log immediately. The DBCC SHRINKFILE operation occurs only at checkpoints or transaction log backups. SQL Server divides each physical log file internally into a number of virtual log files (VLFs), which make up the transaction log. This MSDN article describes virtual log files in SQL Server. SQL Server MVP Tibor Karaszi highlights why you would not want to shrink your log files. This blog by Johnny Hughes has a script that lets you do this task.
USE databaseName
GO
DBCC shrinkfile(<file_id>,NOTRUNCATE)
DBCC shrinkfile(<file_id>TRUNCATEONLY)
CREATE TABLE t1 (CHAR1 CHAR(4000))
GO
DECLARE @i INT
SELECT @i = 0
WHILE (1 = 1)
BEGIN
WHILE (@i < 100)
BEGIN
INSERT INTO t1 VALUES ('a')
SELECT @i = @i +1
END
TRUNCATE TABLE t1
BACKUP LOG databaseName WITH TRUNCATE_ONLY
END