In my role as a Microsoft SQL Server Consultant, I specialize in conducting SQL Server Consolidations aimed at improving SQL Server performance, lowering licensing and electricity expenses, and thereby making a significant contribution to reducing carbon emissions.
Thursday, July 05, 2012
Execute a command for a batch in Windows 2008 Server
Monday, June 11, 2012
Atlantis Schema Inspector - by "Atlantis Interactive"
SQL Load Generator by CodePlex
Wednesday, November 23, 2011
Calculate difference of Time only between two dates while discarding difference of dates in SQL Server/ extract time and calculate difference between two dates in SQL Server
DECLARE @DateTimeOne DATETIME
DECLARE @DateTimeTwo DATETIME
SET @DateTimeOne = '1900-01-01 10:41:09.250'
SET @DateTimeTwo = GETDATE()
--hour = hh
--minute = mi, n
--second = ss, s
--millisecond = ms
SELECT DATEDIFF(mi,SUBSTRING(CONVERT(VARCHAR,@DateTimeOne, 121), 12, 12)
,SUBSTRING(CONVERT(VARCHAR,@DateTimeTwo, 121), 12, 12) ) MinuteDifferenceinDate
Friday, June 24, 2011
Working with Email Address in SQL Server ( Validate Email Address )
here is a UDF you can use to validate the email address
It will validate mentioned below list
No Spaces are allowed
email cant start with '@'
email cant end at '.'
@must be in email and only once
domain name should be at the end and must be at least two characters
email cant habe patterns like '..' or '.@'
CREATE FUNCTION [dbo].[validateEmailAddress]
(
@EmailAddress nVARCHAR(4000)
)
RETURNS TINYINT AS
BEGIN
DECLARE @Result TINYINT
SELECT @Result =
CASE WHEN
CHARINDEX(' ',LTRIM(RTRIM(@EmailAddress))) = 0
AND LEFT(LTRIM(@EmailAddress),1) <> '@'
AND RIGHT(RTRIM(@EmailAddress),1) <> '.'
AND CHARINDEX('.',@EmailAddress,CHARINDEX('@',@EmailAddress)) - CHARINDEX('@',@EmailAddress) > 1
AND LEN(LTRIM(RTRIM(@EmailAddress))) - LEN(REPLACE(LTRIM(RTRIM(@EmailAddress)),'@','')) = 1
AND CHARINDEX('.',REVERSE(LTRIM(RTRIM(@EmailAddress)))) >= 3
AND (CHARINDEX('.@',@EmailAddress) = 0 AND CHARINDEX('..',@EmailAddress) = 0)
THEN 1 ELSE 0 END
RETURN @Result
END
Tuesday, January 11, 2011
Best Practices for using DATETIME column in sql server 2005 and 2008
- One Persisted Computed Column (BIGINT) which will store DATETIME in integer format by removing special symbols from DATETIME
- This computed column will be added in the covering index
- Query will use this column instead of DATETIME column
Wednesday, November 03, 2010
SQL Server to MySQL Conversion using MySQL Migration Toolkit.
A simple and powerful tool for migrating data from SQL Server to MySQL.
It can import/export your data directly to database server and you can also generate Create and Insert scripts.
A useful tool by MySQL team.
You can download the tool by signing up on mentioned below site and download this tool
Sunday, December 27, 2009
winupdate86.exe is2010.exe Internet Security 2010 its a fake antivirus and how to remove it
Thursday, November 26, 2009
Export Microsoft SQL Server data to SQLITE
You need to have a login for the mentioned below site, signup and download the utility.
This tool was made by Liron Levi.
Thursday, September 10, 2009
Import MYSQL Data to Microsoft SQL Server 2005
Tuesday, July 28, 2009
Claim Unused space from table after Deletion of rows of after droppping columns
Wednesday, May 27, 2009
Search Suffix using Full Text Search in SQL Server 2005
Its not recommended and not efficient as it requires another column but its a solution which can help you out in some cases.
1. Add a column in your table which stores the reverse of the string
like
SET NewColumnName = REVERSE(ColumnName)
Tuesday, May 05, 2009
Identify missing indexes in sql server 2005
,OBJECT_NAME(Object_ID) [Table]
,Equality_Columns
,Included_Columns
FROM sys.dm_db_missing_index_details mid
WHERE Database_ID = DB_ID()
ORDER BY 2
Monday, April 06, 2009
Computed Columns in SQL Server 2005
A computed column is computed from an expression that can use other columns in the same table. The expression can be a noncomputed column name, constant, function, variable, and any combination of these connected by one or more operators. The expression cannot be a subquery.
For example, in the AdventureWorks sample database, the TotalDue column of the Sales.SalesOrderHeader table has the definition: TotalDue AS Subtotal + TaxAmt + Freight.
Friday, March 27, 2009
Users get blocked when access same table while getting Unique IDs
GO
--Procedure which Inserts unique IDs in table and returns the New ID
Wednesday, March 18, 2009
Simple cursor Example in Microsoft SQL Server
DECLARE @getInputBuffer CURSOR
SET @getInputBuffer = CURSOR FOR
SELECT Text FROM Table
OPEN @getInputBuffer
FETCH NEXT
FROM @getInputBuffer INTO @String
WHILE @@FETCH_STATUS = 0
Get foreign keys of a table in SQL Server
Find /Remove New Line or Carriage Return Character in String or Text in SQL Server
Delete Duplicate Records Using Common Tabel Expression
Tuesday, January 13, 2009
Solution for Large volume of backup storage on tape with high performance and security
http://h10010.www1.hp.com/wwpc/us/en/en/WF05a/12169-304612-3446236-3446236-3446236-3454484.html
http://en.wikipedia.org/wiki/Linear_Tape-Open