Tuesday, August 18, 2009

Who is Logged on at that Computer?

A quite useful script:

' WhoLogon.vbs
' Sample VBScript to discover which user is logged on
' Author Guy Thomas http://computerperformance.co.uk/
' Version 1.2 - December 2005
' --------------------------------------------------------------'
Option Explicit
Dim objWMIService, objComputer, colComputer, strComputer

strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" _
& strComputer & "\root\cimv2")
Set colComputer = objWMIService.ExecQuery _
("Select * from Win32_ComputerSystem")

For Each objComputer in colComputer
Wscript.Echo objComputer.UserName & " is logged on"
Next

' End of Sample Script. Who is logged on?

Thursday, August 13, 2009

publish SQL Reporting service to internet

1. we have to use NTLM for authentication in our environment which can be done by executing 'cscript adsutil.vbs set w3svc/1/root/NTAuthenticationProviders "NTLM"
2. modify RSWebApplication.config and comment out the line
< ReportServerUrl>< /ReportServerUrl >

Tuesday, August 11, 2009

network performance issue

we had a significant network performance slowdown back to 1 week ago which initially we thought was caused by server performance.
After tuning up a few servers, the situation seems to be improved but the system response is still notably slow.
Eventually we got to look at the firewall (Cisco ASA which replaced the pix firewall a week ago, the CRC error seems to be introduced at that time).
I did a ping from the Cisco ASA firewall and observed packet loss, the network guy later discovered CRC errors using show interface command (I did same thing but didn't notice the CRC error!) which apparantly is the root caused of the problem.
I have to admit though, by looking at the server side of things, we did discover a few performance bottleneck and improved the application performance. I guess this can also be noticed when the netowrk is back to normal.

Good lesson.

Tuesday, July 28, 2009

Change SQL Server Collation in a clustered environment

start /wait D:\Servers\setup.exe /qn VS=[VIRTUALSERVER] INSTANCENAME=[MSSQLSERVER] REINSTALL=SQL_Engine REBUILDDATABASE=1 ADMINPASSWORD=[CURRENT USERPASS] SAPWD=[sapassword] SQLCOLLATION=[NewCollation] SQLACCOUNT=[domain acct] SQLPASSWORD=[domainpass] AGTACCOUNT=[domainacct] AGTPASSWORD=[domainpss]

Make sure that ADMINPASSWORD is the current user's password and this user should have admin rights on all involved nodes.

Disable the loopback check

This is used to fix a logon issue with NTLM and IIS, the error message:

Logon Failure:
Reason: An error occurred during logon
User Name: [User Name]
Domain: [Domain]
Logon Type: 3
Logon Process: Èù®
Authentication Package: NTLM
Workstation Name: [Workstation Name]
Status code: 0xC000006D
Substatus code: 0x0
Caller User Name: -
Caller Domain: -
Caller Logon ID: -
Caller Process ID: -
Transited Services: -
Source Network Address: 127.0.0.1
Source Port: 1298


For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.

the following steps will fix the issue:

1. Click Start, click Run, type regedit, and then click OK.
2. In Registry Editor, locate and then click the following registry key:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa
3. Right-click Lsa, point to New, and then click DWORD Value.
4. Type DisableLoopbackCheck, and then press ENTER.
5. Right-click DisableLoopbackCheck, and then click Modify.
6. In the Value data box, type 1, and then click OK.
7. Quit Registry Editor, and then restart your computer.

sourced from http://support.microsoft.com/kb/896861

Wednesday, July 22, 2009

Foreign Key vs. Trigger Referential Integrity in SQL Server

I personally thought foreign key action is better than triggers, well the following article back up my idea:

http://www.mssqltips.com/tip.asp?tip=1508

Monday, July 13, 2009

Adding cluster disk to sql

went through the practice again and realized that I actually forgot something I did before :-)

Also one mistake is, the LUN was presented to me already partitioned and thus when I tried to do the SAN disk alignment it gave me error message which I happened to find one technet article taking about different issue with same symptom and led to a waste of time.(error msg: DiskPart was unable to create the specified partition)

Anway, I finally figured this out and delete the old partition and then things went smoothly.

Finally, the performance project is finally nearlly there, the newly purchased test server is put online and a significant performance increase was observed. (previoulsy revenue recognition process took 50+ minutes now only 1+ minutes!).

Disable Microsoft Defender for Cloud for Visual Studio Subscription (MSDN)

I use a visual studio pro subscription which comes with $150 azure cloud credit, for some reason Microsoft Defender for Cloud was turned on ...