Redgate SQL Source Control is a SSMS plug-in which allows you to source control your database schema. Assuming you or your users have limited access, some permissions are required to use this application. At a database scope the VIEW DEFINITION permission is required to view code changes which have not been committed. ALTER is also
Continue reading Permissions required for Redgate SQL Source Control
I noticed the following message in the SQL Server ErrorLog for one of the database servers which is in a database mirroring setup (currently the mirror). Error: 1438, Severity: 16, State: 2 The server instance Witness rejected configure request; read its error log file for more information. The reason 1427, and state 31, can be
Continue reading The server instance Witness rejected configure request
Today I was working on some PowerShell scripts where I ran into the following error message: Invoke-Sqlcmd : Object reference not set to an instance of an object. Below is the PowerShell code which was throwing the error. I discovered the culprit was the $Query parameter. The $Query parameter contents contained a TSQL query to
Continue reading Invoke-Sqlcmd : Object reference not set to an instance of an object.
Before installing SQL Server 2008 R2 on Windows Server 2008 R2 SP1, the .NET Framework Feature must be added. To do this via PowerShell run the following: The Out-Null is optional but by piping the output means nothing will get returned to the PowerShell window.
Update: Instead of a script arsenal page, I have decided to create a What I Use page. This will not only hold scripts but other tools I find useful. I’ve also included a link to download the sp_Blitz stored procedure. Every DBA should have their own script arsenal, a set of TSQL scripts you use
Continue reading Script Arsenal
While trying to execute the below TSQL query I got the following error message: SERVERNAME(User): Msg 8115, Level 16, State 2, Line 1 Arithmetic overflow error converting expression to data type int. I gathered that I was receiving this error message because the SUM of the SQL Server database files was larger than the maximum
Continue reading Arithmetic overflow error converting expression to data type int.
Earlier this week I ran into an issue while executing a DROP LOGIN statement. This would result in the following error message. Msg 15141, Level 16, State 1, Line 2 The server principal owns one or more event notification(s) and cannot be dropped. In order for me to drop the login, I also needed to
Continue reading The server principal owns one or more event notification(s) and cannot be dropped
So before I stumpled upon SQLjobvis, I used to use Microsoft Excel to create charts and graphical views of SQL Server Agent job schedules. All this time I’ve wasted! With this tool, I can view all agent jobs on a particular SQL Server, I can see the run duration, I can see when they were
Continue reading Graphic view of SQL Server Agent job schedules
Permissions To view the Activity Monitor in SQL Server 2005 and SQL Server 2008, a user must have VIEW SERVER STATE permission. (source: http://msdn.microsoft.com/en-us/library/ms175518(v=sql.105).aspx) Script