Search

Wednesday, March 23, 2011

Change database compatibility level

Use below script to change the database compatibility level

ALTER DATABASE DatabaseName
SET SINGLE_USER
GO
EXEC sp_dbcmptlevel DatabaseName, 90;
GO
ALTER DATABASE DatabaseName
SET MULTI_USER
GO

SQL Server VersionCompatibility Level
SQL Server 6.565
SQL Server 7.070
SQL Server 200080
SQL Server 200590
SQL Server 2008100

Tuesday, March 22, 2011

Problem detected with installed .Net Framework

While connecting with Database from some other System, it is showing the following error message. How to resolve this? Message: "Problem detected with installed .Net Framework"


This error message is coming because the Database is in "Readonly" Mode. Please use the following steps to resolve the problem…

  1. Go to Start > Programs > Microsoft SQL Server 2005 > SQL Server Management Studio
  2. Check that the database is showing "Read Only"
  3. Right Click on Database name
  4. Select Properties
  5. Select "Options"
  6. Scroll Down to bottom of the newly opened window
  7. 7. Set “Database Read-Only = False”
  8. Click on “Ok” button

Monday, March 21, 2011

File Growth / Log Space / Transaction Log is Full

Issue

While trying to run the program following message appears.

“File Growth / Log Space is full. Delete Transaction Log file”

Solution

Close all application on all nodes (if running). Run the following commands using Query Analyzer of MSSQL Server.

BACKUP TRANSACTION Data WITH no_log

GO

CHECKPOINT

GO

/* IF YOU ARE USING SQL SERVER 2000 USE FOLLOWING QUERY */

DBCC SHRINKDATABASE(‘Data’,10)

/* IF YOU ARE USING SQL SERVER 7.0 USE FOLLOWING QUERY */

DBCC SHRINKDB(‘Data’,10)

GO

CHECKPOINT

GO

Friday, March 18, 2011

Error Attaching Database

Could not find row in sysindexes for database ID 7, object ID 1, index ID 1. Run DBCC CHECKTABLE on sysindexes.
Could not open new database'FR6DemoDB'. CREATE DATABASE is aborted.

This error is coming due to version mismatch of SQL Server. This particular error appears when you are trying to attach a SQL Server 2005 database in SQL Server 2000.

Data is created in SQL Server 2005 and you are trying to Restore/Attach this Data in SQL 2000, the above mentioned error will occur.

Please check your system and be sure that SQL Server 2005 is installed.

Thursday, March 17, 2011

How to remove a corrupt SQL Server 2005 Express Instance?

  • Download msicuu2.exe from http://support.microsoft.com/kb/290301
  • Remove the highlighted programs as shown in the picture.
  • Completely delete C:\Program Files\Microsoft SQL Server
  • Install SQL Server Express Edition again.
  • If instance error comes then remove the services.

How to Delete / Remove Services in Windows XP and Vista

  1. Go to Start > Run > services.msc to start Services applet.
  2. In the Services applet, find the service that you want to delete permanently, right click it and click on the Properties from the menu.
  3. In the properties window, find the name of the service and copy it to your clipboard.
  4. NOTE : ITS Service NAME / NOT the display Name.
  5. You may also want to stop the service, if it is running; this will kill all the running processes for it.
  6. Open a command prompt by going to Start > Run > CMD
  7. Once a command prompt has opened up, type the command “sc delete service name” without the quotes, replace service name, with the name of the service you copied in above step.

Note : Once a service has been deleted you should see a message saying “[SC] DeleteService SUCCESS”, this should mean that the service has been deleted, to ensure that, just click on the refresh button in the services applet and confirm that the service has been deleted.

Description of the Windows Installer CleanUp Utility

SUMMARY :When you are working on your computer and installing a new program, the installation suddenly fails. Now you are left with a partly installed program. You try to install the program again, but you are unsuccessful. Or, maybe you have problems trying to remove an old program because the installation files are corrupted.

Do not worry. Windows Installer CleanUp Utility might be able to help. You can use the utility to remove installation information for programs that were installed by using Windows Installer. Be aware that Windows Installer CleanUp Utility will not remove the actual program from your computer. However, it will remove the installation files so that you can start the installation, upgrade, or uninstall over.

You can download Windows Installer CleanUp Utility from http://support.microsoft.com/kb/290301