Tanmaya Thopate, Chincholi Morachi, Low cost WEBSITE development in Pune, Windows Tips n Tricks

Friday, November 14, 2008

Check heart beat of SQL Server services

Helpful for Database administrators to test the heart beat of SQL Server services daily.

Step1
Create c:\HeartBeat folder and a file ServiceList.txt which will contains following text in it with all the servers and services would like to check.

SQL,MSSQLServer
SQL,SQLSERVERAGENT
YUKON,MSSQLServer
YUKON,SQLSERVERAGENT
YUKON,MSSQLServerOLAPService
ETL,MSSQLServer
ETL,SQLSERVERAGENT
Note: Need to add server names and its related service names.

Step2
Make a file c:\HeartBeat\CheckHeartbeat.vbs and copy the below code into the file.

'Objective: TO check the Heartbeat of all SQL Server services

on error resume next
Set iFSO = CreateObject("Scripting.FilesyStemObject")
Set oFSO = CreateObject("Scripting.FilesyStemObject")

InputFile="c:\Heartbeat\Servicelist.txt"
Outputfile="c:\Heartbeat\Status.txt"

Set ifile = iFSO.OpenTextFile(inputfile)
Set ofile = ofso.createTextFile(OutputFile, True)

Do until ifile.AtEndOfLine
servicelist= ifile.ReadLine
strcomputer=left(servicelist,instr(servicelist,",")-1)
Service =right(servicelist,len(servicelist)-instr(servicelist,","))
ofile.writeline Now()
ofile.writeline "ServerName: " & strcomputer
ofile.writeline "ServiceName: " & Service

Set objWMIService =nothing
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")

if err.number<>0 then
ofile.writeline "Error: " & err.number
ofile.writeline "Error: " & err.description
else

Set colItems = nothing
query=""
query = "Select * from Win32_Service where name = '" & Service & "'"
'msgbox query
Set colItems = objWMIService.ExecQuery(query,,48)
if err.number<>0 then
ofile.writeline "Error: " & err.number
ofile.writeline "Error: " & err.description
else
For Each objItem in colItems
ofile.writeline "Status: " & objItem.Status
ofile.writeline "State: " & objItem.State
next

next
end if
end if
err.number=0
Loop

msgbox "SQL Service Status Check completed"
Step3
Execute the above VB script. The message will show the status of it.
In addition, it creates a file c:\HeartBeat\Status.txt with detailed logs for the status.

Ref: Check MSSQL Server's status

Tuesday, October 28, 2008

How hacker exploits a website?

Hacking Web Sites:

Hackers are with tons of mechanisms attack, they decide the one most appropriate to vulnerability. Its organized plan to exploit.
There are so many techniques of hacking used by hackers, following are couple of them explained in details.

How hacker exploits a website

MySQL memcache

In current web scenario, the access speed of website is more crucial. If your web site is running on MySQL database with number of records in it, can be slow processed as each record needs execution of the SQL query and resulting of the data from the database. So that queries on tables, which are in the process, are locked, this may result in delay of query and reduce the speed.
memcache for MySQL

Tuesday, October 21, 2008

Hindi supported on Joomla


Here is how you can enable Joomla to write in Indian languages.

Step 1:Install indiaPlugin for tinyMCE

Upload files to hosting server,
• Download the India Plugin
• Extract this file in a folder named indiaplugin.
• Now FTP the indiaplugin folder and all files inside it, to “plugins\editors\tinymce\jscripts\tiny_mce\plugins ” in case of Joomla 1.5.x
Modify the ‘tinymce.php‘ file
• Edit tinymce.php file in “editors\tinymce”.
In Joomla 1.0.x

For further detailed steps, follow Indian Language support on Joomla

Tuesday, October 7, 2008

SQL Server 2005 Deployment on Windows Shared Server Hosting

SQL Server 2005 Deployment management on Windows Shared Server Hosting Plan

Requirement:

Windows shared hosting Server should be with 32-bit processor and minimum of 3GB of RAM including Windows Server™ 2003 operating system.

Possibilities:

a) In various situations, managing several instances of SQL Server on a particular server can support additional users than a single instance of SQL Server.

b) CLR integration with SQL Server offers developers who are well-known with .NET programming the skill to code database objects by using the programming language they previously know.

EXEC sp_configure ‘show advanced options’, 1
RECONFIGURE
GO

EXEC sp_configure ‘clr enabled’, 1
RECONFIGURE
GO

c) Using the query cost governor
can avoid run off queries from overwhelming lots of resources on a Windows shared hosting server.

Whenever SQL Server obtains a query, the query optimizer produces probable time that the query is likely to take. The query cost governor limit can be used to stop all queries that are probable to take more than a particular amount of time. However, it is possible for the probable time to be inaccurate, which will cause fast-running queries to be cancelled. The choice to apply query cost governor limits is a negotiation between maintaining suitable server performance under load versus the possible for generating client support issues.

EXEC sp_configure ‘show advanced options’, 1
RECONFIGURE
GO

EXEC sp_configure ‘query governor cost limit’, 300

RECONFIGURE
GO

d)
Disabling or Renaming the Built-in SA Account
In SQL Server 2005, the built-in system administrator (SA) account was kept for backward compatibility. As long as it is not necessary, this account ought to be disabled or renamed.
These commands can be used to disable or rename SA account:
ALTER LOGIN sa DISABLE;
ALTER LOGIN sa WITH NAME = [sys-admin];

Tuesday, September 30, 2008

Login failed for user computer\ASPNET

Common reason behind this is, with a Web application is trying to access a Microsoft SQL Server. The definite error or exception that is raised depends on whether the Web server is also running SQL Server? This problem arises because the Web application is not passing valid credentials to SQL Server. You can check following steps,

Login failed for user computer\ASPNET

Thursday, September 25, 2008

ASP.NET Web Applications under IIS 6.0


Hi All,

You might be all curious about How ASP.NET web applications run under IIS6.0 on Windows Web hosting Server

In the following post, I've briefed it, may it will help you to understand an idea about its layout.


Your ASP.NET application need to be under an IIS virtual directory, working under application root. These ASP.NET applications have compiled assemblies settings stored in a text-based Web.config file; pages; server controls; and XML Web services..... ASP.NET Web Applications under IIS 6.0
 
Add to Technorati Favorites