Showing posts with label MSSQL. Show all posts
Showing posts with label MSSQL. Show all posts

Monday, November 10, 2014

How To Enable CLR on a Microsoft SQL 2005 Server

A while back I worked for a small hosting firm that focused on Microsoft products. As part of my responsibilities I wrote a great deal of documentation for them for a variety of tasks - some basic, some more advanced and problematic.

Anyway I was pleased to see today that these tutorials are still published on their site. Follow this link, for instance, to read an instructional guide on how to enable CLR with MSSQL 2005.

Saturday, December 29, 2012

Query to Set MSSQL Database Owner

This resolves an error encountered disabling the ability to view database properties via SQL Management Studio: "Property Owner is not available for Database '[DB_name]'. This property may not exist for this object, or may not be retrievable due to insufficient access rights. (Microsoft.SqlServer.Smo)" And a related error: "The database owner SID recorded in the master database differs from the database owner SID recorded in database 'XYZ'. You should correct this situation by resetting the owner of database 'XYZ' using the ALTER AUTHORIZATION statement."

Where !DBNAME= database name, and the default System Administrator remains 'sa': 

EXEC dbo.sp_changedbowner @loginame = N'sa', @map = false

Saturday, September 29, 2012

Error 0x84B30002 When Uninstalling MSSQL 2008 R2

Have you encountered error 0x84B30002 when uninstalling MSSQL 2008 R2, preventing the uninstall from proceeding? I have. So far I have only encountered the issue with Express Edition, although rumor has it that the error can occur with other editions as well. The error message will be displayed in a pop-up as well as the summary.txt log file in the installation directory.

Here is how to fix it:

Launch the registry editor by typing regedit in the Run bar in the start menu. Navigate to the following registry key:


After expanding uninstall, you will need to locate each key related to the SQL instance you are attempting to remove - if there is only one instance on the server, locate each key with the word SQL in the DisplayName field. 

Within each key, locate the GUID. It will look something like this: 234A1B2C-12AB-1AB2-B1C2-A12B345678C1 and be typically contained in either the ModifyPath or UninstallString fields. 

Take each GUID, and use msiexec to manually force the uninstall from the command line like so: 

msiexec /x "{234A1B2C-12AB-1AB2-B1C2-A12B345678C1}"

Replace that string with the relevant GUID, and run the command for each GUID you have. You can automate the process a bit by dumping the list into a .bat file. When running the command, a window prompt may appear asking if you wish to proceed with uninstallation - just go ahead and authorize the uninstall where it appears. 

Once completed, you can double check the registry key where we initially found the GUID's to ensure everything has been removed. I have been forced to do this a few times now and have yet to encounter any further issues, though. After you have run these commands, you should be all set to install a new instance of MSSQL.

NSA Leak Bust Points to State Surveillance Deal with Printing Firms

Earlier this week a young government contractor named Reality Winner was accused by police of leaking an internal NSA document to news outle...