Thursday, August 5, 2010

SQL 2008 setup problem with PCU

Installing SQL server 2008 sp1 64 bit on Windows 2008 server.
1.Copied the software form one server to required server.
2.Clicked on Setup.exe file
3.Clicked on Preparing install on left pane of screen
4.Clicked on stan-alone server option
After this it's throwing error message saying the not able to viw PCU(Public Cummulative Update) folder and showing old server path.

Solution.

1.Locate to SQl server s\w folder (C:\softwares\SQl2008Sp1 in mycase)
2.open C:\softwares\SQl2008Sp1\X64\PCU
3.open defaultsetup.ini file
In defaultsetup.ini file PCU path showing to old server path.Now I removed the old path and edited with correct path(C:\softwares\SQl2008Sp1\X64\PCU) ans save it.

And run the setup again.This time setup completed sucessfully.

Tuesday, June 22, 2010

Start server with no debug mode

If Windows was started in debug mode on the system.
This stops the Visual Studio .NET debugger from debugging managed applications

To determine if a Windows-based computer is started in Debug mode, verify the computer's startup options in the registry:
Start Registry Editor.
Locate the following registry key:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control
In the Control key, locate the SystemStartOptions string value. If the computer is in Debug mode, one or more of the debug switches are displayed in the string (for example, /debug, /crashdebug, /debugport, or /baudrate). Any combination of one or more of these switches indicates that the computer is currently in Debug mode.


Remove all of the following switches
/debug
/debugport
/baudrate
in boot.ini file and then restart the server then it will come up in no-debug mode.

Wednesday, June 9, 2010

Logshipping systemtables

Below system tables in msdb database are used to capture the logshipping related information in Primary,secondary and monitor servers.

msdb..logshipping_primary_databases
msdb..log_shipping_secondary_databases
msdb..logshipping_secondary
msdb..log_shipping_primary_secondaries->Maps Each Primary database to its secondary database
msdb..log_shipping_monitor_primary
msdb..log_shipping_monitor_secondary-
msdb..log_shipping_monitor_history_detail->History of logshipping jobs
msdb..log_shipping_monitor_error_detail->error details of Logshipping jobs
msdb..log_shipping_monitor_alert->Alert Job ID

Backup and restore system tables

For every database backup/Restore,SQl server mantains the track of it's history in msdb database.

Backup related system tables:
msdb..backupmediafamily
msdb..backupfilefroup
msdb..backupfile
msdb..backupmediaset
msdb..logmarkhistory

Restore Database related System tables:
msdb..restorefile
msdb..restorefilegroup
msdb..restorehistory
msdb..suspect_pages
master..sysopentapes


To reduce the number of rows in the restore history table and in other backup and history tables, execute the sp_delete_backuphistory stored procedure.

Thursday, May 27, 2010

Advantages of SQl server 2005 over Sql 2000

1.Resource Databases
2.Security enhancement
3.Dynamic Management Views
4.Mirroring
5.Database Snapshots
6.Online Restore
7.On line-Rebuild Index by using snapshot Isolation
8.Tbldiff utility
9.Replication:allow supscriber Updates,introduced Tracer Token to get know the latency
10.SSIS packages
11.Data encryption and compression
12.High scalability:Limited to 2GB, 4CPUs in Standard Edition. Limited 64-bit support for SQl 2000 but in Sq 2005 we can use 4 CPU, no RAM limit in Standard Edition. More 64-bit options offer chances for consolidation.
13.SQL server managaement Studio tool.

Friday, May 21, 2010

Shutdown other computer

If we want to shutdown other computer which is in same domain.We can use shutdown command.

shutdown [{-l|-s|-r|-a}] [-f] [-m [\\ComputerName]] [-t xx] [-c "message"] [-d[u][p]:xx:yy]

Eg:

Shutdown -r -f -m \\machine name

-r indicates Shutdown and restart the server
-f indicates Forces running applications to close
-m indicates the machine name which is going to effect

SQL Jobs Suspended after restoing msdb Database

When we run jobs which already configured then we may gett the msg saying that "job already suspended" then it fail.

It should be the cause after restoring/Attaching the msdb Database from other server.The paths to the SQL Server Agent subsystem DLLs are stored in the msdb.dbo.syssubsystems table in the msdb database. The locations do not correspond to the current locations of the binaries for the instance of SQL Server.

Solution:
Delete the entries from msdb.dbo.syssubsystems table and then repopulate the entries.


use msdb
go
delete from msdb.dbo.syssubsystems--delete entries in syssubsystems
exec msdb.dbo.sp_verify_subsystems 1-- Update the susbsystem DLL's to the correct path on the current install Folder.


Finally we should restart the SQl Agent service to effect the change.