Showing posts with label SQL 2000. Show all posts
Showing posts with label SQL 2000. Show all posts

18 October 2011

Error: MMC cannot open the file C:\Program Files\Microsoft SQL Server\80\Tools\BINN\SQL Server Enterprise Manager.MSC.

Upon clicking on the SQL Server Enterprise Manager shortcut the following error occurs:
MMC cannot open the file C:\Program Files\Microsoft SQL Server\80\Tools\BINN\SQL Server Enterprise Manager.MSC.
This may be because the file does not exist, is not an MMC console, or was created by a later version of MMC. This may also be because you do not have sufficient access rights to the file.
The msc file did exist and I definately has permissions to it.  So I can only assume it some how got corrupt.
The solution to this is fairly simple... either get another copy of this file, or create one, as follows:
  1. Select Start - Run.
  2. At the Open prompt enter: mmc
  3. Click OK
  4. Select File - Add/Remove Snap-in...
  5. Click Add...
  6. Select Microsoft SQL Enterprise Manager
  7. Click Add, then Close
  8. Click Ok to return to the mmc.
  9. Select File - Save As...
  10. Delete or rename the original (offending) file out the way.
  11. Save the new msc file as C:\Program Files\Microsoft SQL Server\80\Tools\BINN\SQL Server Enterprise Manager.MSC
Now your original shortcut should work.
Alternatively you can always access Enterprise Manager from within the Computer Management mmc

21 July 2011

Suspect SQL Server 2000 Database

ProblemI have a SQL Server 2000 database that has the wrong database status. For some reason it is in the 'Suspect/Offline' mode. I just need to correct the problem quickly and get my database back online. How can I do so? Once the status is correct, do I need to take any further steps?

SolutionTo cut to the chase, the script below can be used to correct the SQL Server 2000 database status, but in reality this is only a third of the equation. We also need to correct any sort of corruption and understand why this occurred in the first place.

Database Status Correction Script
The script below will change the database to be in simple recovery mode, which may or may not be the needed configuration for your database. As such, it is necessary to review your database configurations once this script has been executed. In addition, it is necessary to change the 'YourDatabaseName' to your database name in single quotes.

USE Master
GO

-- Determine the original database status
SELECT [Name], DBID, Status
FROM master.dbo.sysdatabases

GO

-- Enable system changes
sp_configure 'allow updates',1
GO
RECONFIGURE WITH OVERRIDE
GO

-- Update the database status
UPDATE master.dbo.sysdatabases

SET Status = 24

WHERE [Name] = 'YourDatabaseName'
GO

-- Disable system changes
sp_configure 'allow updates',0
GO
RECONFIGURE WITH OVERRIDE
GO

-- Determine the final database status
SELECT [Name], DBID, Status
FROM master.dbo.sysdatabases

GO

Check for Corruption
The next step in this process is very key. It is necessary to determine if the database has any corruption and ensure that the database will be able to support the users. If the database has corruption, you may be exposing yourself to more issues by just changing the database status without correcting the underlying issue. To identify the underlying issue, execute the following commands:
  • DBCC CHECKDB - Validate the overall database integrity
  • DBCC CHECKCATALOG - Validate the system catalog integrity
  • DBCC CHECKTABLE - Validate the integrity for a single table
To resolve the issue, you may need to do one or more of the following:
  • Drop and Recreate Index(es)
  • Move the recoverable data from an existing table to a new table
  • Update statistics
  • DBCC UPDATEUSAGE
  • sp_recompile
To ensure the issue is corrected, it is a good idea to re-run the identification commands listed above and validate that they do not have any issues.

Determine the Root Cause
In the long term, it is imperative to understand what caused the suspect/offline database. At a minimum the following questions should be addressed:
  • What has recently changed in your environment?
  • Review your SQL Server logs to see if you can determine when the error occurred.
  • Talk to your team members to ask them what changes have been made.
  • Review your change management and auditing processes to see what has changed in SQL Server or at a systems level.
  • See if the issue has occurred on any other databases in your environment.
Next Steps
  • Although the script from this tip can be easily run, it is necessary to understand why the issue occurred and be sure not to have any corruption moving forward.
  • Heed caution and truly understand the situation before running this script and make sure you do not cause any further issues

SQL Server Enterprise Manager - opening problem

Problem :


"MMC cannot open the file C:\Program Files\Microsoft SQL Server\80\Tools\BINN\SQL Server Enterprise Manager.MSC. This may be because the file does not exist, is not an MMC console, or was created by a later version of MMC. This may also be because you do not have sufficient access rights to the file."




Solution:
Go to run box and run regsvr32 C:\Windows\system32\msxml3.dll when succeeded it will allow you to both opening and closing off your mmc


or


Go to C:\Windows\system32\ folder , select the msxml3.dll , Open With -> Browse -> C:\Windows\system32\ Regsvr32.ex

ActiveX component can't create object - Error

Cause 1: DAO is not properly registered

Resolution

  1. On the computer that hosts Microsoft Windows Terminal Server or the computer on which Microsoft Access is installed, click Start, and then click Run.
  2. Type regsvr32 followed by the path to your DAO file. Enclose this path in quotation marks. For example, to register the DAO 3.6 library, use the following command:
    regsvr32 "C:\Program Files\Common Files\Microsoft Shared\DAO\DAO360.DLL"

Cause 2: One or more references are missing

Resolution

  1. Open the database for which you receive the error message.
  2. Press ALT+F11 to open the Microsoft Visual Basic Editor.
  3. In the Visual Basic Editor, click References on the Tools menu.
  4. Examine the list of libraries. If any items are marked as "missing," locate the library file and re-associate the reference. Or, click to clear the check box next to the library name.

Cause 3: There is a utility database reference that is not valid

Resolution

  1. Open the database for which you receive the error message.
  2. Press ALT+F11 to open the Visual Basic Editor.
  3. In the Visual Basic Editor, click References on the Tools menu.
  4. Click to clear the check box next to any reference to Utility Database or Utility.mda

SQL Error - MMC cannot open the file

MMC cannot open the file C:\Program Files\Microsoft SQL Server\80\Tools\BINN\SQL Server Enterprise Manager.MSC.
Upon clicking on the SQL Server Enterprise Manager shortcut the following error occurs:
MMC cannot open the file C:\Program Files\Microsoft SQL Server\80\Tools\BINN\SQL Server Enterprise Manager.MSC.
This may be because the file does not exist, is not an MMC console, or was created by a later version of MMC. This may also be because you do not have sufficient access rights to the file.
The msc file did exist and I definately has permissions to it. So I can only assume it some how got corrupt.
The solution to this is fairly simple... either get another copy of this file, or create one, as follows:
1. Select Start - Run.
2. At the Open prompt enter: mmc
3. Click OK
4. Select File - Add/Remove Snap-in...
5. Click Add...
6. Select Microsoft SQL Enterprise Manager
7. Click Add, then Close
8. Click Ok to return to the mmc.
9. Select File - Save As...
10. Delete or rename the original (offending) file out the way.
11. Save the new msc file as C:\Program Files\Microsoft SQL Server\80\Tools\BINN\SQL Server Enterprise Manager.MSC
Now your original shortcut should work.
Alternatively you can always access Enterprise Manager from within the Computer Management mmc.

Alternate Method
at command-line:

RegSvr32 MSXML.DLL
RegSvr32 MSXML2.DLL
RegSvr32 MSXML3.DLL

or

regsvr32 C:\Windows\system32\msxml.dll
regsvr32 C:\Windows\system32\msxml2.dll
regsvr32 C:\Windows\system32\msxml3.dll

Active X component error in server

Re-register the following DLLs by using Regsvr32.exe, and then restart the computer:

C:\Program files\Common Files\System\ADO\Msado15.dll
C:\Program files\Common Files\System\Ole Db\Oledb32.dll
C:\Program files\Common Files\System\Ole Db\Sqloledb.dll
C:\WINNT\System32\Atl.dll

MSDTC on server 'servername' is unavailable

By default, when a stand-alone instance of Microsoft SQL Server exists in a cluster environment, the SQL Server-based instance is set to start automatically. If the host node is rebooted, you may receive the following error message when you issue commands that are related to distributed transactions:
ERROR: MSDTC on server 'servername' is unavailable.
RESOLUTION On the server where the trigger resides, you need to turn the MSDTC service on. You can this by clicking START > SETTINGS > CONTROL PANEL > ADMINISTRATIVE TOOLS > SERVICES. Find the service called 'Distributed Transaction Coordinator' and RIGHT CLICK (on it and select) > Start.

( or Change the Startup type into Automatic and Right Click and Restart the service )


To do this, type the following command at a command prompt, and then press ENTER:

net start msdtc

Verify that a message is displayed that indicates that the MSDTC service was started successfully.

SQL 2000 Installation Problem

A previous program installation created pending file operations on the installation machine. You must restart the computer before running setup.


You don’t really have to restart your machine – at least I didn’t have too! I hate to close out all my apps and reboot (are you listening Microsoft?) for a simple install like this. Are you getting this error message “A previous program installation created pending file operations on the installation machine. You must restart the computer before running setup.” when attempting to install the SQL Server Enterprise Tools on your workstation? Hopefully this will help.

Exit the installer and then do this:

Click START, RUN type regedit
Surf to the following key:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager
Delete PendingFileRenameOperations
Start the install process again.

Source: if the above doesn’t work, try the other items mentioned at the bottom of this Microsoft Support article.

01 July 2011

How to Repair a Suspected SQL Database

Sometimes when you connect to your database server, you may find it in suspect mode. Your database server won’t allow you to perform any operation on that database until the database is repaired.

A database can go in suspect mode for many reasons like improper shutdown of the database server, corruption of the database files etc.

To get the exact reason of a database going into suspect mode can be found using the following query

DBCC CHECKDB (‘YourDBname’) WITH NO_INFOMSGS, ALL_ERRORMSGS

Output of the above query will give the errors in the database.

To repair the database, run the following queries in Query Analyzer,

EXEC sp_resetstatus ‘yourDBname’;
ALTER DATABASE yourDBname SET EMERGENCY
DBCC checkdb(‘yourDBname’)
ALTER DATABASE yourDBname SET SINGLE_USER WITH ROLLBACK IMMEDIATE
DBCC CheckDB (‘yourDBname’, REPAIR_ALLOW_DATA_LOSS)
ALTER DATABASE yourDBname SET MULTI_USER

      You should keep one thing in mind while using the above queries that the repair mode used here , REPAIR_ALLOW_DATA_LOSS, is a one way operation i.e. once the database is repaired all the actions performed by these queries can’t be undone. There is no way to go back to the previous state of the database. So as a precautionary step you should take backup of your database before executing above mentioned queries.

02 May 2011

Another Solution to Active X error in Windows Server 2003

ActiveX Control cannot create object" Error showing in opning any module in server machine
Symptoms
When you use Microsoft Access related applications, you receive the following error message: ActiveX...
When you use Microsoft Access, you receive the following error message:
ActiveX component can't create object
This article describes some common causes for this error message and offers methods that you can use to resolve the issue.
cause
This behavior can occur if any of the following conditions are true: Data Access...
This behavior can occur if any of the following conditions are true:
Data Access Objects (DAO) is not properly registered.
-or-
One or more references are missing.
-or-
There is a utility database reference that is not valid.
-or-
You do not have the required permissions for required libraries.
-or-
There is a damaged wizard file.
Resolution
Cause 1: DAO is not properly registered
1. On the computer that hosts Microsoft Windows Terminal Server or the computer on which Microsoft Access is installed, click Start, and then click Run.
2. Type regsvr32 followed by the path to your DAO file. Enclose this path in quotation marks. For example, to register the DAO 3.6 library, use the following command:
regsvr32 "C:\Program Files\Common Files\Microsoft Shared\DAO\DAO360.DLL"


Cause 2: There is a damaged wizard file
1. Use Windows Explorer to locate the following wizard files: Acwzmain.mde, Acwztool.mde and Acwzlib.mde.
2. Change the file name extension of each file to "old." For example, change Acwzmain.mde to Acwzmain.old.
3. Reinstall Access to restore the files.

Active X Component Can not Create Object Problem in Windows Server 2003

Reason:The Problem may be due to curruption of installation files of MDAC.
Solution:
1. Click on Start > Programs > Accessories > Notepad.
2. Click on File > Save As to save the blank document.
3. Browse to the root of the C:\ drive.
4. Name the file: MDACRdMe.htm, click Save.
5. Close Notepad.
6. In Windows Explorer, open the c:\Windows\Inf folder.
7. Right-click the Mdac.inf file, and then click Install.
8. You will be prompted for multiple files during the installation.
9. At each prompt, click on browse and navigate to the appropriate file (see list
below), click on Open then Retry.
10. There will be no notification when the installation is complete.
Files and Corresponding Locations
• File Name: adcjavas.inc
• Location: C:\Program Files\Common Files\System\msadc
• File Name: adojavas.inc
• Location: C:\Program Files\Common Files\System\ado
• File Name: msdadc.dll
• Location: C:\Program Files\Common Files\System\ole db
• File Name: dao360.dll
• Location: C:\Program Files\Common Files\Microsoft shared\dao
• File Name: handler.reg
• Location: C:\Program Files\Common Files\System\msadc
• File Name: MDACRdMe.htm
• Location: C:\
• File Name: oledbvbs.inc
• Location: C:\Program Files\Common Files\System\ole db
• File Name: oledbjvs.inc
• Location: C:\Program Files\Common Files\System\ole db

29 March 2011

HOW TO SHRINK DATA BASE IN SQL 2000 SERVER

The script file shrinkdb.txt is for shrinking all the databases on a server.



Please do the following steps:
1) Log off all the client applications.
2) Backup all the databases in the server
3) Isolate the server (no sql connection should exist)
4) If SQL version is SQL2000 and above open the shrinkdb.txt file in query analyser and execute it. 
5) Wait till the query completes its execution as it may take several minutes.
Note: Before and after shrinking, compare the size of the log and data files to observe the space recovered.
DOWNLOAD

28 March 2011

How to Backup Database in SQL Server 2000

 Open SQL Enterprise Manager  and follow  below scrren shots