The file is not attached to the server--or-- Database Failed to Restore

If All Orders is unable to connect to the database you might get one of the messages:

The file is not attached to the server

Database failed to restore

There are many things that may cause this to happen:

-The database server might be turned off or not currently on the network.
-The database software on the server may have shut down.
-The network might have changed requiring All Orders to connect in a different way.
-Database files may have become lost or corrupted due to hardware malfunction.

This guide will take you step by step through a checklist which can be used to try and restore connectivity to the database. If all else fails please contact Numbercruncher support immediately.

1. Check that the computer/server where the database is stored is currently online and is accessible on the network. If there are any folders shared on the network from this computer try to browse through them and see if you can access them. Even if you are able to, rebooting the computer where the database is stored is generally a good first thing to try. Once the computer is back online try to open All Orders and connect to the database again.

2. The next step is to verify that the database software is running and that the database is currently online and accessible. Log into the computer either by sitting in front of it and logging in or by using Remote Desktop. Once you are logged in go to the list of Programs from the Start Menu. Here you should see some folders such as Microsoft SQL Server 2005, Microsoft SQL Server 2008, Microsoft SQL Server 2008 R2 etc… One of these options should have an icon with a caption for SQL Server Management Studio. Click this option. Once open a box should pop up for which database server you want to log into. Make sure the Server Name drop down has the \ALLORDERS server selected. If there is more than one, pick the one that starts with the name of the computer where the database is stored. Next select SQL Server Authentication in the Authentication drop down. The user should be sa and the password should be Sysadmin1. Click Connect once all of this is filled in. If you are able to connect skip to the next step. If you are not able to connect it generally means that the database server software has gone offline. Make sure you have rebooted the computer as this will generally restart the database server software as well. If you reboot and still cannot connect you can try to manually start up the database server software. To do this, go to the Start menu, control panel, administrative tools, services. In the list of services locate the SQL Server (ALLORDERS) service. Double click to open the properties. Make sure Startup Type is Automatic and then click the Start button. If it says the Status is already started then click stop and then start to reboot the software. Try to follow the previous steps to log in again and if you still cannot, contact Numbercruncher support.

3. Once you have successfully logged into SQL Server Management Studio, you will be present with the name of the database server you logged into with a plus sign that can be clicked to expand it. Expand the database server and then expand the databases folder. In the list of databases you should see the database for your company. If you do, skip to the next step. If it is not listed there it may have become detached. To reattach it right click the Databases folder and select Attach… In the window that pops up click the Add… button to search for the .MDF file for your database. It will generally be located in the same folder as you All Orders .NCD file or your Quickbooks company file. If it is not you can do a search from the Start menu for files with *.MDF . If you cannot locate your .MDF file call Numbercruncher support immediately. If you can locate it, select it and then click the OK button to finish attaching it. Once it is finished attaching successfully try to open All Orders again.

4. Once you have confirmed the machine is online and the database server software is running and the database is attached and online the last step is to check the networking. Please see the article on connecting to remote SQL Server databases located here:

http://www.numbercruncher.com/docs/Connecting_to_remote_sql_databases.pdf



This article covers all the topics for fixing connectivity to SQL databases on networks. If after following this article you are still unable to connect to the database, please contact Numbercruncher technical support.