Posted on 2011 under Errors & Solution |
22
May
This error could be due to the logon trigger in sql server 2005, like the one mentioned in the below link
http://www.mssqltips.com/tip.asp?tip=1830.
Solution
There are only two ways to connect to sql server in this scenario.
1. Connect using DAC.(using -A)
sqlcmd -S LocalHost -d master -A
go
drop trigger trigger_name on all server
go
2. Connect using sqlservr.exe from the binn folder
Execute the sqlservr.exe from the command prompt, specifying the location of the binn, using -m & -f to start sql in single user mode with minimal configuration.

Logon failed for login due to trigger execution
Once SQL is started with minimal config, you could connect through management studio & disable the trigger.
Posted on 2010 under Administration Queries |
20
Apr
Here are the three ways to find the number of CPU’s through SQL query.
Method 1
Exec xp_cmdshell ‘set NUMBER_OF_PROCESSORS’
This method read the processor count from command prompt.
Method 2
Exec xp_msver ‘processorcount’
This method read the processor count through xp_msver system procedure.
Method 3
Declare @key varchar(1000)
Declare @value varchar(1000)
EXEC master..xp_regread @rootkey=’HKEY_LOCAL_MACHINE’,@key=’SYSTEM\CurrentControlSet\Control\Session Manager\Environment\’,@value=’NUMBER_OF_PROCESSORS
This method read the processor count from the system registry entry.
Posted on 2010 under Administration Queries |
20
Apr
We are often in need for dos cmds to find the system uptime. Here are the different methods, test it out…
1. systeminfo
2. net statistics workstation/server
3. uptime
Posted on 2010 under Memory |
20
Apr
VAS continued…
Each process allocate VAS in the starting. As required, the VAS regions will be bind to the physical memory. This will be done by means of committing(using VirtualAlloc API), AWE mechanism, file mapping API’s etc.
Physical pages can be shared or private. If the same physical pages are shared accross different VAS, its called shared physical pages, else if only mapped to a single VAS, they are called private physical pages. The physical pages could be either in disk or ram. If its only from RAM, its referenced as working set or memory usage in windows task manager.
Working set shown in the perfrmon & task manger includes non private pages.
Working Set in Perfmon counter = Mem Usage in Task manager
Private Bytes in perfmon counter = Virtual Memory Size in Task Manager