Friday, May 29, 2009

ias service error 0x80004015:The class is Configured to run as a security ID diffrent from the caller

I recently had the same on an Win XP x64. The way I solved it was to delete the security descriptors from the registry for the IASJet service to force it to apply default ones. Export and then delete the following keys (do export first, just in case):
  • HKEY_LOCAL_MACHINE\SOFTWARE\Classes\AppID\{A5CEB593-CCC3-486B-AB91-9C5C5ED4C9E1}
  • HKEY_LOCAL_MACHINE\\SYSTEM\CurrentControlSet\Services\IASJet\Security
Start the "IAS Jet Database Access" service and then the RRAS service.
It should now work.
Additionally, you might also want to make RRAS dependent on IASJet so it starts the IASJet service before it starts itself. Otherwise it may fail to start with the 7024 error in the eventlog, saying
"The Routing and Remote Access service terminated with service-specific error 340 (0x154)."
Event Type: Error
Event Source: Service Control Manager
Event Category: None
Event ID: 7024
Description:
The Routing and Remote Access service terminated with service-specific
error 340 (0x154).
Just edit the registry for the RemoteAccess service at HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\RemoteAccess and add "IASJet" to the list of DependOnService value (note that the services need to be separated by new lines, not spaces).

How to change the Default port for Remote Desktop

You can use the Remote Desktop feature in Microsoft Windows XP Professional to connect to your computer from another remote computer.
Warning The Remote Assistance feature in Microsoft Windows XP may not work correctly if you change the listening port.
To change the port that Remote Desktop listens on, follow these steps.
1. Start Registry Editor.
2. Locate and then click the following registry subkey:
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\TerminalServer\WinStations\RDP-Tcp\PortNumber
3. On the Edit menu, click Modify, and then click Decimal.
4. Type the new port number, and then click OK.
5. Quit Registry Editor.
Note When you try to connect to this computer by using the Remote Desktop connection, you must type the new port.
Note The Remote Desktop Connection Client for the Mac supports only port 3389. 3389 is the default port.

Enable Remote Connection on SQL Server 2008 Express

If you’re trying to connect to SQL Server 2008 Express remotely without enable remote connection first, you may see these error messages:
•“Cannot connect to SQL-Server-Instance-Name
An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 28 - Server doesn’t support requested protocol) (Microsoft SQL Server)”
•“Cannot connect to SQL-Server-Instance-Name
An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified) (Microsoft SQL Server)”•“Cannot connect to SQL-Server-Instance-Name
Login failed for user ‘username‘. (Microsoft SQL Server, Error: 18456)”
To enable remote connection on SQL Server 2008 Express, see the step below:
1.Start SQL Server Browser service if it’s not started yet. SQL Server Browser listens for incoming requests for Microsoft SQL Server resources and provides information about SQL Server instances installed on the computer.
2.Enable TCP/IP protocol for SQL Server 2008 Express to accept remote connection.
3.(Optional) Change Server Authentication to SQL Server and Windows Authentication. By default, SQL Server 2008 Express allows only Windows Authentication mode so you can connect to the SQL Server with current user log-on credential. If you want to specify user for connect to the SQL Server, you have to change Server Authentication to SQL Server and Windows Authentication.
Note: In SQL Server 2008 Express, there isn’t SQL Server Surface Area Configuration so you have to configure from SQL Server Configuration Manager instead.
Step-by-step
1.Open SQL Server Configuration Manager. Click Start -> Programs -> Microsoft SQL Server 2008 -> Configuration Tools -> SQL Server Configuration Manager. 2.On SQL Server Configuration Manager, select SQL Server Services on the left window. If the state on SQL Server Browser is not running, you have to configure and start the service. Otherwise, you can skip to step 6.
3.Double-click on SQL Server Browser, the Properties window will show up. Set the account for start SQL Server Browser Service. In this example, I set to Local Service account. 4.On SQL Server Browser Properties, move to Service tab and change Start Mode to Automatic. Therefore, the service will be start automatically when the computer starts. Click OK to apply changes. 5.Back to SQL Server Configuration Manager, right-click on SQL Server Bowser on the right window and select Start to start the service.
6.On the left window, expand SQL Server Network Configuration -> Protocols for SQLEXPRESS. You see that TCP/IP protocol status is disabled.
7.Right-click on TCP/IP and select Enable to enable the protocol.
8.There is a pop-up shown up that you have to restart the SQL Service to apply changes. 9.On the left window, select SQL Server Services. Select SQL Server (SQLEXPRESS) on the right window -> click Restart. The SQL Server service will be restarted.
10.Open Microsoft SQL Server Management Studio and connect to the SQL Server 2008 Express.
11.Right-click on the SQL Server Instance and select Properties. 12.On Server Properties, select Security on the left window. Then, select SQL Server and Windows Authentication mode.13.Again, there is a pop-up shown up that you have to restart the SQL Service to apply changes.
14.Right-click on the SQL Server Instance and select Restart.
15.That’s it. Now you should be able to connect to the SQL Server 2008 Express remotely.

Enable Remote Connection on SQL Server 2008 Express

If you’re trying to connect to SQL Server 2008 Express remotely without enable remote connection first, you may see these error messages:
“Cannot connect to SQL-Server-Instance-NameAn error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 28 - Server doesn’t support requested protocol) (Microsoft SQL Server)”
“Cannot connect to SQL-Server-Instance-NameAn error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified) (Microsoft SQL Server)”
“Cannot connect to SQL-Server-Instance-NameLogin failed for user ‘username‘. (Microsoft SQL Server, Error: 18456)”
To enable remote connection on SQL Server 2008 Express, see the step below:
Start SQL Server Browser service if it’s not started yet. SQL Server Browser listens for incoming requests for Microsoft SQL Server resources and provides information about SQL Server instances installed on the computer.
Enable TCP/IP protocol for SQL Server 2008 Express to accept remote connection.
(Optional) Change Server Authentication to SQL Server and Windows Authentication. By default, SQL Server 2008 Express allows only Windows Authentication mode so you can connect to the SQL Server with current user log-on credential. If you want to specify user for connect to the SQL Server, you have to change Server Authentication to SQL Server and Windows Authentication.
Note: In SQL Server 2008 Express, there isn’t SQL Server Surface Area Configuration so you have to configure from SQL Server Configuration Manager instead.
Step-by-step
Open SQL Server Configuration Manager. Click Start -> Programs -> Microsoft SQL Server 2008 -> Configuration Tools -> SQL Server Configuration Manager.
On SQL Server Configuration Manager, select SQL Server Services on the left window. If the state on SQL Server Browser is not running, you have to configure and start the service. Otherwise, you can skip to step 6.
Double-click on SQL Server Browser, the Properties window will show up. Set the account for start SQL Server Browser Service. In this example, I set to Local Service account.
On SQL Server Browser Properties, move to Service tab and change Start Mode to Automatic. Therefore, the service will be start automatically when the computer starts. Click OK to apply changes.
Back to SQL Server Configuration Manager, right-click on SQL Server Bowser on the right window and select Start to start the service.
On the left window, expand SQL Server Network Configuration -> Protocols for SQLEXPRESS. You see that TCP/IP protocol status is disabled.
Right-click on TCP/IP and select Enable to enable the protocol.
There is a pop-up shown up that you have to restart the SQL Service to apply changes.
On the left window, select SQL Server Services. Select SQL Server (SQLEXPRESS) on the right window -> click Restart. The SQL Server service will be restarted.
Open Microsoft SQL Server Management Studio and connect to the SQL Server 2008 Express.
Right-click on the SQL Server Instance and select Properties.
On Server Properties, select Security on the left window. Then, select SQL Server and Windows Authentication mode.
Again, there is a pop-up shown up that you have to restart the SQL Service to apply changes.
Right-click on the SQL Server Instance and select Restart.
That’s it. Now you should be able to connect to the SQL Server 2008 Express remotely.

Create an exception for the SQL Server Browser service in Windows Firewall

To create an exception for the SQL Server Browser service in Windows Firewall,
follow these steps:
  • In Windows Firewall, click the Exceptions tab, and then click Add Program.
  • In the Add a Program window, click Browse.
  • Click the C:\Program Files\Microsoft SQL Server\90\Shared\sqlbrowser.exe executable program, click Open, and then click OK.

Note The path may be different depending on where SQL Server 2005 is installed.

Create an exception for SQL Server 2005 in Windows Firewall

To create an exception for SQL Server 2005 in Windows Firewall, follow these steps:
  • In Windows Firewall, click the Exceptions tab, and then click Add Program.
  • In the Add a Program window, click Browse.
  • Click the C:\Program Files\MicrosoftSQL Server\MSSQL.1MSSQL\Binn\ sqlservr.exe executable program, click Open, and then click OK.

Note The path may be different depending on where SQL Server 2005 is installed.

MSSQL.1 is a placeholder for the instance ID that you obtained in step 3 of the previous procedure.
Repeat steps 1 through 3 for each instance of SQL Server 2005 that needs an exception.

Create exceptions in Windows Firewall

These steps apply to the version of Windows Firewall that is included in Windows
XP Service Pack 2 (SP2) and in Windows Server 2003. If you are using a different
firewall system, see your firewall documentation for more information. If you are
running a firewall on the computer that is running SQL Server 2005, external
connections to SQL Server 2005 will be blocked unless SQL Server 2005 and the
SQL Server Browser service can communicate through the firewall. You must
create an exception for each instance of SQL Server 2005 that you want to accept
remote connections and an exception for the SQL Server Browser service.SQL
Server 2005 uses an instance ID as part of the path when you install its program
files. To create an exception for each instance of SQL Server, you must identify
the correct instance ID. To obtain an instance ID, follow these steps:
  • Click Start, point to Programs, point to Microsoft SQL Server 2005, point to Configuration Tools, and then click SQL Server Configuration Manager.
  • In SQL Server Configuration Manager, click the SQL Server Browser service in the right pane, right-click the instance name in the main window, and then click Properties.
  • On the SQL Server Browser Properties page, click the Advanced tab, locate the instance ID in the property list, and then click OK.
  • To open Windows Firewall, click Start, click Run, type firewall.cpl, and then click OK.

Enable the SQL Server Browser service

If you are running SQL Server 2005 by using an instance name and you are not
using a specific TCP/IP port number in your connection string, you must enable
the SQL Server Browser service to allow for remote connections. For example, SQL
Server 2005 Express is installed with a default instance name of Computer
Name\SQLEXPRESS. You are only required to enable the SQL Server Browser
service one time, regardless of how many instances of SQL Server 2005 you are
running. To enable the SQL Server Browser service, follow these steps.Important
These steps may increase your security risk. These steps may also make your
computer or your network more vulnerable to attack by malicious users or by
malicious software such as viruses. We recommend the process that this article
describes to enable programs to operate as they are designed to, or to
implement specific program capabilities. Before you make these changes, we
recommend that you evaluate the risks that are associated with implementing
this process in your particular environment. If you choose to implement this
process, take any appropriate additional steps to help protect your system. We
recommend that you use this process only if you really require this process.
  • Click Start, point to Programs, point to Microsoft SQL Server 2005, point to Configuration Tools, and then click SQL Server Surface Area Configuration.
  • On the SQL Server 2005 Surface Area Configuration page, click Surface Area Configuration for Services and Connections.
  • On the Surface Area Configuration for Services and Connections page, click SQL Server Browser, click Automatic for Startup type, and then click Apply.

Note When you click the Automatic option, the SQL Server Browser service starts

automatically every time that you start Microsoft Windows.

  • Click Start, and then click OK.Note When you run the SQL Server Browser service on a computer, the computer displays the instance names and the connection information for each instance of SQL Server that is running on the computer. This risk can be reduced by not enabling the SQL Server Browser service and by connecting to the instance of SQL Server directly through an assigned TCP port. Connecting directly to an instance of SQL Server through a TCP port is beyond the scope of this article. For more information about the SQL Server Browser server and connecting to an instance of SQL Server, see the following topics in SQL Server Books Online:
  • SQL Server Browser Service
  • Connecting to the SQL Server Database Engine
  • Client Network Configuration

Enable remote connections for SQL Server 2005 Express or SQL Server 2005 Developer Edition

You must enable remote connections for each instance of SQL Server 2005 that you want to connect to from a remote computer. To do this, follow these steps:
  • Click Start, point to Programs, point to Microsoft SQL Server 2005, point to Configuration Tools, and then click SQL Server Surface Area Configuration.
  • On the SQL Server 2005 Surface Area Configuration page, click Surface Area Configuration for Services and Connections.
  • On the Surface Area Configuration for Services and Connections page, expand Database Engine, click Remote Connections, click Local and remote connections, click the appropriate protocol to enable for your environment, and then click Apply. Note Click OK when you receive the following message:
  • Changes to Connection Settings will not take effect until you restart the Database Engine service.
  • On the Surface Area Configuration for Services and Connections page, expand Database Engine, click Service, click Stop, wait until the MSSQLSERVER service stops, and then click Start to restart the MSSQLSERVER service.

Wednesday, May 20, 2009

Restore Exchange Server 2003

One of the most important tasks for an Exchange administrator is the regular, day-by-day, backing up of all the Exchange databases. This can be easily accomplished by use of the built-in NTBACKUP.EXE software found on your Exchange 2000/2003 server.
If the server running Exchange 2000/2003 is still functional after a disaster, recovering a store is a pretty straightforward process.
Make note of the following guidelines when restoring Exchange stores:
Verify that the Exchange Information Store service is running.
Verify that the Exchange store or stores that you want to restore are dismounted.
Note: Although Exchange 2003 supports multiple storage groups and multiple Exchange stores, it is only necessary to dismount the specific store that you want to restore. This operation allows users to continue to access all of the other Exchange stores in the storage group.
Make an Offline backup before restoring the store
Whatever may be the reason for the restore process, always try to make a copy of all existing database files, even if these files are damaged. That way, if the attempted recovery fails it may still be possible to repair the existing store from its copy even if the store has been damaged. When repairing the damaged store it is likely that you will lose at least some data, but even this might be a better deal than having to do with a total database loss.
When restoring from a backup set, your current database files will overwritten as soon as the process begins. You should rename the old database files that you are restoring before you begin the restore process. If you do not leave your database drive at least half empty, you will not be able to restore from backup because you will not have enough space left for the restore.
Preparing the Store
Before beginning the restore process you should first prepare the store and dismount it:
1. In Exchange System Manager, browse to Administrative Groups\First Administrative Group\Servers\server name\First Storage Group, and then click Mailbox Store or the Public Store, depending on the store you wish to restore (As always, use your own path).
2. In the console tree, right-click store and then click Properties.

3. In the Properties dialog box, click the Database tab.
4. On the Database tab, select the This database can be overwritten by a restore check box, and then click OK.

5. In the console tree, right-click the store, click Dismount Store, and then click Yes to continue.

Restoring the Store
To perform an Online restore of Exchange Server 2003 follow these steps (note that 99% of the steps outlined here also work for Exchange 2000, although the screenshots were taken on Exchange Server 2003):
1. Click Start, point to Run, type NTBACKUP and click Ok (or press Enter).
2. If the Backup or Restore Wizard appears, on the Welcome to the Backup or Restore Wizard page, click Advanced Mode.

3. Click on the Restore and Managed Media tab.
4. On the Restore and Managed Media tab expand the Catalog file that holds the backup set you wish to restore. Select the specific store you wish to restore.

In case that the catalog is not displayed in the list of available catalogs, click on the Tools menu and choose Catalog a Backup File. Browse to the file you want to use and click ok.

5. After selecting the correct store, click on the Start Restore button.
In the Temporary location for the Log and Patch files box enter C:\Temp or similar. If this is the only (or last) Restore Set (i.e. you won't be restoring any more files) makes sure you select the Last Restore Set check-box.
When you're ready to begin, click Ok.

6. The restore process will begin. Wait till you get a complete status and then go back to the Exchange System Manager snap-in.
7. In Exchange System Manager, browse to Administrative Groups\First Administrative Group\Servers\server name\First Storage Group, and then click Mailbox Store or the Public Store, depending on the store you've just restored.
8. In the console tree, right-click store and then click Mount Store.
If all goes well, you should be getting a progress window telling you that the store is currently mounting (BTW, this is one of the weirdest GUI progress bars I've seen, as it always stays at 66 %...).
After the store has been successfully mounted, test it by trying to log on as one of the users that has a mailbox on that store.
Note that you might have older mailboxes on the restored store (it all depends on the restore scenario you had), and then you'll need to reconnect these mailboxes to a new users in Active Directory. I'll discuss this process in an article that's about to be published soon.

Backup Exchange Server 2003

One of the most important tasks for an Exchange administrator is the regular, day-by-day, backing up of all the Exchange databases. This can be easily accomplished by use of the built-in NTBACKUP.EXE software found on your Exchange 2000/2003 server.
Some administrators might choose to your 3rd-Party backup tools, such as:
Veritas Backup Exec (currently version 10.0)
BrightStor ARCserve Backup (currently version r11.1)
Legato Co-StandbyServer Advanced (currently version 5.1)
However, as stated above, you do NOT need to buy expensive 3rd-Party tools just to backup your Exchange server.
Generally, you can backup Exchange 2000/2003 in 2 ways: Online backup and Offline backup.

Online Backup - An Online backup is performed while the Information Store is still mounted and the Exchange server is operational. The Exchange is Online and available for transactions, therefore it still allows users to work without interruption. Online backups also automatically clear the database logs upon completion.
Another major advantage of the Online backup method is the fact that the Exchange store is checked for corruption at the file-system level. This check is done by verifying the checksums on each 4 KB (Kilobyte) block or page in the database. If there is a checksum failure, backup will terminate. Exchange will not allow you to back up an Exchange store with a wrong checksum in it.
Therefore, after an online backup is complete, you should check the Event Viewer to find out whether your Exchange store is corrupted. If you see a failed backup with a page read error event in Event Viewer, this may be an early indication of a problem in the database.
Offline Backup - Offline backup is performed by shutting down the Exchange Information Store service and performing COPY procedures on the Exchange databases (Public Folder or Mailbox stores). Using an Offline Backup provides a method to restore the Exchange system to its last known state or specific "point in time", and is usually considered to be less attractive than the Online backup.
However, you may need to perform an Offline backup in the following situations:
Your online backup failed. You can complete an Offline backup in situations where an online backup might fail (for example, due to an error such as a checksum1018 JET_errReadVerifyFailure).
Your backup software does not support Exchange Online backup APIs, requiring you to dismount the Exchange 2000/2003 mailbox and public folder stores before you backup the server.
Some disadvantages to performing an Offline backup include:
You must stop IS services (You do not need to stop the IS if you only want to backup the store, for that you can simply just dismount it. However if you want to backup the log files you do need to stop the IS service).
Users will not be able to access their mailboxes during the offline backup.
Log files that contain transactions already written to the database files will not be purged after the completion of the backup.
The database is not checked for corruption during an Offline backup. You might have a corrupt database and backup sets that cannot be used to restore your server to full functionality.
An increased chance of data loss due to files being copied to and from a backup location.
In this article I will discuss the online backup method.
Backup Exchange with NTBACKUP
Windows 2000 Server and Windows Server 2003 already have the NTBACKUP software installed by default. However, installing Exchange 2000 Server or Exchange Server 2003 on these machines will upgrade NTBACKUP and allow it to be used to backup the Exchange databases (also known as Stores).
Note: You can also Backup Exchange 2000/2003 from a Non-Exchange Server.
To perform an online backup of Exchange Server 2003 follow these steps (note that 99% of the steps outlined here also work for Exchange 2000, although the screenshots were taken on Exchange Server 2003):
1. Click Start, point to Run, type NTBACKUP and click Ok (or press Enter).
2. If the Backup or Restore Wizard appears, on the Welcome to the Backup or Restore Wizard page, click Advanced Mode.
3. Click on the Backup tab.
4. On the Backup tab expand Microsoft Exchange Server, expand server name (you should see your own server name of course... duh), expand Microsoft Information Store, and select the correct Storage Group's check-box or the entire Information Store check-box.
Note: It is always best to backup an entire Storage Group rather than individual Stores, and if possible, try to backup the entire IS in one job, although lack of time or storage might force you to selectively backup just parts of the IS at a time.
4. On the Backup Destination choose the right tape device (if you have one, and you should), or, like in the above screenshot, a local File.
5. In the Backup Media or Filename make sure you enter a descriptive name for the backup job.
6. Click on the Start Backup button.
7. In the Backup Job Information window make sure you have your settings right. If you already have a backup job on the destination tape or file, make sure you select Append to make the file bigger and hold both jobs, or Replace to delete the old file and re-create it with the new job.
You can also press the advanced button and select the Backup Type. For this demonstration I've chosen Normal. I'll discuss the differences between the backup types in a different article.
Another thing you can do is schedule the job to automatically run by pressing the Schedule button. This too will be discussed in a different article.

When you're done press the Begin Backup button. The backup job should begin:

8. When the backup is finished, in the Backup Progress dialog box, click Report.
9. In the backup01.log window, verify that no errors are listed in the report. If no errors are listed, the backup was successful. Close backup01.log.
10. In the Backup Progress dialog box, click Close.
To verify that Exchange recognizes that an online backup was performed follow these steps:
1. In Exchange System Manager, browse to Administrative Groups\First Administrative Group\Servers\server name\First Storage Group\Mailbox Store (server name) (as always, use your own path...)
2. In the console tree, right-click either the Mailbox Store or the Public Store, and then click Properties.
3. In the store properties dialog box, click the Database tab.
4. On the Database tab, in the Time of last full backup box, verify that the time of the backup you just performed is recorded, and then click OK.

Note regarding the backing-up of the System State AND the Information Store in one backup job: In Windows Server 2003 and Exchange Server 2003 you cannot perform a backup of the System State AND the Exchange IS in one job, due to limitations in the Volume Shadow Copy service (VSS).