Monday, December 28, 2009

winupdate86.exe is2010.exe Internet Security 2010 its a fake antivirus and how to remove it

Type gpedit.msc in RUN

Goto=> User Configurations
Goto=> Administrative Templates
Goto=> System
Goto=> Ctrl+Alt+Del Options
Double Click Remove Task Bar Manager
Click on DISABLE
Press OK

Your Task bar will be enables
now look for mentioned below exes and KILL process tree

Thursday, November 26, 2009

Export Microsoft SQL Server data to SQLITE

At time you need to interact with SQLITE and normally there are tools which are not free but i have found a tool which is very useful when you need to export data from Microsoft SQL Server 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

At times you my need to interact with mysql database and the method given below is very easy for Microsoft SQL Server guys to do stuff with mysql database.

1) You need to have a mysql instance configured.
2) Install the MySQL ODBC Driver for Microsoft SQL Server
3) Add MySQL Instance as a linked server to Microsoft SQL Server by issuing the mentioned below command.
4) Access and Import you MySQL Data right from Microsoft SQL Server Management Studio

Tuesday, July 28, 2009

Claim Unused space from table after Deletion of rows of after droppping columns

If you deleted rows and space used is same as previous then first thing you need to do is Rebuild Clustered Index.
It will release most of the unused space.

Secondly if you have dropped any variable length column then you can run the mentioned below command.
DBCC CLEANTABLE (AdventureWorks,"Production.Document", 0)

Wednesday, May 27, 2009

Search Suffix using Full Text Search in SQL Server 2005

A solution to search Suffix is given below as its a limitation in FTS that FTS cannot search suffix.

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

SELECT DISTINCT DB_NAME(Database_ID) [Database]
,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

--Table which will have the Unique IDs
CREATE TABLE dbo.CounterTable
(
Counter int IDENTITY(1,1) NOT NULL
)
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 @String nVARCHAR(MAX)
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

SELECT f.name AS ForeignKey
,OBJECT_NAME(f.parent_object_id) AS TableName
,COL_NAME(fc.parent_object_id
,fc.parent_column_id) AS ColumnName
,OBJECT_NAME (f.referenced_object_id) AS ReferenceTableName
,COL_NAME(fc.referenced_object_id
,fc.referenced_column_id) AS ReferenceColumnName
FROM sys.foreign_keys AS f
INNER JOIN sys.foreign_key_columns AS fc
ON f.OBJECT_ID = fc.constraint_object_id
WHERE OBJECT_NAME (f.referenced_object_id)   = 'TableName'
ORDER BY 2