Search This Blog

Tuesday, December 16, 2014

Restart Computer rule falied

While installing sql server 2008 you might get error: Restart Computer Failed


Cause : A previous program installation created pending file operations on the installation machine.
Solution: 1. Go Registry path "Open HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager".


2. Double click "PendingFileRenameOperations"


3. Press the key "Delete" on your keyboard.

4. Press OK and close the registry.
5. Try now to run SQL Server 2008 setup

Tuesday, August 19, 2014

List of valid and Invalid special characters for URL.

Character Purpose in URL Encoding
: Separate protocol (http) from address %3A
/ Separate domain and directories %2F
# Separate anchors %23
? Separate query string %3F
& Separate query elements %24
@ Separate username and password from domain %40
% Indicates an encoded character %25
+ Indicates a space %2B
<space> Invalid in URLs %20 or +
; Invalid in URLs %3B
= Invalid in URLs $3D
$ Invalid in URLs %26
, Invalid in URLs %2C
< Invalid in URLs %3C
> Invalid in URLs %3E
~ Invalid in URLs %25
^ Invalid in URLs %5E
` Invalid in URLs %60
\ Invalid in URLs %5C
[ Invalid in URLs %5B
] Invalid in URLs %5D
{ Invalid in URLs %7B
} Invalid in URLs %7D
| Invalid in URLs %7C
" Invalid in URLs %22

Thursday, August 14, 2014

How to remove Cache and Buffers in MS SQL Server

To remove procedure/TSQL cache and buffers execute below queries.

DBCC FREEPROCCACHE
DBCC DROPCLEANBUFFERS

Thursday, January 23, 2014

How to rename a column name or table name in sql

1. You can rename column name as below:
sp_Rename 'tblusers.Name' , 'UserName', 'column'

2. Using below sql statement you can change object name ( table name, stored procedure name..etc)
sp_Rename 'tblusers', 'tblGlobalUsers'

Friday, January 17, 2014

how to delete top n records using sql delete statement?

DELETE top (n) FROM Table1
Note : This statement will work in sql server 2005 and above but for below version use following sql statement

DELETE tbl FROM (Select Top n * FROM Table1 ) tbl