When I decided to move forward with creating this website, I decided early on that I didn't want to repeat the mistakes of the past by re-inventing the wheel, going through all the trouble of either developing a content management system from something downloaded on SourceForge or some other open source repository, just for the … Continue reading Everything you Need to know about WordPress Hosting
Microsoft Reverses Course on Visual Basic
Just kidding. It's still the redheaded step child. But seriously, every time I roll up my sleeves and dive into a new Microsoft technology, a part of me holds back from getting too excited. I'm struck by the amount of code I've written for software and web applications that used technologies that were effectively killed … Continue reading Microsoft Reverses Course on Visual Basic
Obtain an Exclusive Lock to Rename a SQL Server Database
Tested on: SQL Server 2016 Developer Edition Accurate as of: January, 2018Use this script to rename a database when the SQL Server database could not be exclusively locked to perform the operation. [code language="sql"] -- First, set the database to single user mode ALTER DATABASE CodeSnippets SET SINGLE_USER WITH ROLLBACK IMMEDIATE -- Now we will … Continue reading Obtain an Exclusive Lock to Rename a SQL Server Database
Querying Stored Procedure and System Function Parameter Information
Tested on: SQL Server 2016 Developer Edition Accurate as of: January, 2018The following snippet generates a SQL Server View that displays information about the parameters that need to be passed in to System Objects. The data type information that is returned in this view is human readable (i.e. `nvarchar(200) NULL`), rather than the numeric type … Continue reading Querying Stored Procedure and System Function Parameter Information
Show ROW NUMBERS in T-SQL RESULT set
Tested on: SQL Server 2016 Developer Edition Accurate as of: January, 2018 In this query, I've added a record number column to the result set using OVER and ORDER BY clauses with the ROW_NUMBER function in T-SQL. Note that the ORDER BY clause is required. The OVER() clause tells the SQL Engine to sort data … Continue reading Show ROW NUMBERS in T-SQL RESULT set
SQL Server Admin: Identifying Active Transactions
Tested on: SQL Server 2016 Developer Edition Accurate as of: January, 2018One way to identify active tractions, is using DBCC OPENTRAN. DBCC OPENTRAN helps to identify active transactions that may be preventing log truncation. DBCC OPENTRAN displays information about the oldest active transaction and the oldest distributed and nondistributed replicated transactions, if any, within the … Continue reading SQL Server Admin: Identifying Active Transactions
T-SQL Review: SUBSTRING
The following queries demonstrate the T-SQL SUBSTRING function. I've also included a comparison with the C# function of the same name. Unlike C#, the T-SQL SUBSTRING is 1 based. [code language="sql"] print substring('a,b,c,d', 1, 1); -- RETURNS: a [/code] Unlike C#, SUBSTRING's 3rd parameter is NOT optional. You can't leave it blank if you want … Continue reading T-SQL Review: SUBSTRING