Jun 1, 2015

Lost all SQL Admin logins -- this command comes to my rescue.

PsExec -s -i "C:\Program Files (x86)\100\Tools\Binn\VSShell\Common7\IDE\Ssms.exe"

This will use Network Service to Login and you can add new login one you logged in through,


​Note: SSMS.exe path may differ, please check on your drive for SQL Installed Binn.​

May 15, 2015

Deleting performance Category via Power shell.

​Its worked perfectly fine for me.
[Diagnostics.PerformanceCounterCategory]::Delete( "Perf Category Name" )

Jan 11, 2014

I am back now :)

After a long time, I am thinking to write again.. Hope I can continue writing :)

Dec 7, 2011

Best Practice for deleting large records from a table

Request Timed out for Large Table records delaetion.
Even sometime it sayes Transaction Logs Full, or sometime Memory Issues...
So here i get the Best Practice for deleting large records from a table...

WHILE (SELECT COUNT(*) FROM <table name> WHERE [Filter Condition] > 0
BEGIN
DELETE TOP 10 FROM <table name> WHERE [Filter Condition]
END


Oct 12, 2011

Debug (F5) Global.asax.cs Application_Start() Method

Many Times we need to debug the Application_Start on server where we can not debug with Visual Studio IDE, instead we use CLR Debugger. So debugging on Global.asax.cs is deifficult as you need to attach the W3WP process, but it starts only when your application get a first hit, and so Application_Start code already executed. So how we can debug ??
So I was reading few discussion over mail thread when I came across this wonderful ideas.
(Hey Guys accept my thanks and from others as well [who read this ] for your good debugging tricks.)
So here we goes -
  1. Put delay in Application_Start Methods first Line as approx. you need to attach the debugger.
  2. #if DEBUG
                       if(ApplicationSetting("DebugStartup"))
               System.Diagnostics.Debugger.Break();
            #end if

Aug 5, 2011

Iftaar Timing Noida Delhi 2011


Noida & Delhi

Date

Day

Sehar

Iftar

Date

Day

Sehar

Iftar

2-Aug

Tue

4:16

7:12

17-Aug

Wed

4:28

7:00

3-Aug

Wed

4:17

7:12

18-Aug

Thu

4:29

6:59

4-Aug

Thu

4:18

7:11

19-Aug

Fri

4:30

6:58

5-Aug

Fri

4:19

7:10

20-Aug

Sat

4:30

6:57

6-Aug

Sat

4:19

7:09

21-Aug

Sun

4:31

6:56

7-Aug

Sun

4:20

7:09

22-Aug

Mon

4:32

6:55

8-Aug

Mon

4:21

7:08

23-Aug

Tue

4:32

6:54

9-Aug

Tue

4:22

7:07

24-Aug

Wed

4:33

6:53

10-Aug

Wed

4:23

7:06

25-Aug

Thu

4:34

6:52

11-Aug

Thu

4:23

7:05

26-Aug

Fri

4:35

6:50

12-Aug

Fri

4:24

7:04

27-Aug

Sat

4:35

6:49

13-Aug

Sat

4:25

7:03

28-Aug

Sun

4:36

6:48

14-Aug

Sun

4:26

7:03

29-Aug

Mon

4:37

6:47

15-Aug

Mon

4:26

7:02

30-Aug

Tue

4:37

6:46

16-Aug

Tue

4:27

7:01

31-Aug

Wed

4:38

6:45


SQL - Difference between CAST,CONVERT and PARSE

TODO---