Welcome to the blog site of SQLServer.in

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

Logon failed for login due to trigger execution

Once SQL is started with minimal config, you could connect through management studio & disable the trigger.

Find the number of CPU’s through SQL query

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.

How to find system uptime

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

VAS continued…

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

Get Adobe Flash playerPlugin by wpburn.com wordpress themes
 

About Author

Krishna is a Senior Database Administrator, having handson experience of 6 years. Areas of expertise includes database engine, Business Intelligence & performance tunning. A regular SQL blogger on his own website, msdn forums, sqlteam.com & believe in sharing his experience with other technology enthusiasts.