mssql
-
Query Sql Version Microsoft MSSQL
References https://support.microsoft.com/kb/321185 http://blogs.msdn.com/b/euanga/archive/2008/01/23/confused-by-sql-server-version-numbers.aspx Continue reading
-
Custom DAL Class SQL ORM ASP .NET
(common.DataObject may be of your choosing or may simply replace with dynamic) Continue reading
-
MSSQL User Defined Functions vs Stored Procedures
I received this question earlier today, and thought it was a valid question often misunderstood, and deserving of a small write-up: “Should a User Defined Function be your first choice instead of a Stored Procedure?” While there are many pros… Continue reading
-
mssql aes function encrypt decrypt in microsoft sql
Simple symmetric encryption in MSSQL. Copied from MS references below: References: http://msdn.microsoft.com/en-us/library/bb669072.aspx http://msdn.microsoft.com/en-us/library/ms179331.aspx Continue reading
-
Cannot login logon failed to SQL Server Windows Auth
Locked out of SQL Server? Accidentally right click on your account in Management Studio and hit delete? Or did Sys Admins force you onto the domain and delete your local superman account that you installed SQL under? Oops! No problem!… Continue reading
-
Arithmetic overflow error converting type to data type numeric
This error usually occurs when the type you are trying to convert to a decimal or numeric is larger than the column or casted type you are converting to. Ex. Since the number specifed is 7 digits long include after… Continue reading
-
DLL in Stored Procedure MSSQL
Extended Stored Procedures (MSDN), http://support.microsoft.com/kb/190987 Thread Local Storage in an extended stored procedure (MSDN), http://support.microsoft.com/kb/163449 Continue reading
-
How to Create secure relational databases in SQL
The first step to a secure DB, is a well structured DB and the application layers that access it. Take the following example of a table containing factories and the robots they produce. FACTORYNAME ROBOTNAME FACTORY1 Ron FACTORY1 John FACTORY2… Continue reading
-
MSSQL Quick Reference
Snippets below have been condensed from their original sources for brevity. See references for original articles. Great reference on joins: http://www.codeproject.com/Articles/33052/Visual-Representation-of-SQL-Joins Show all tables in specific database: (MSSQL equivalent of MySql “show tables”) Insert into: Insert if not exists: Trigger… Continue reading