EEPOS:Database Suspect: Difference between revisions
Created page with "== Suspect EEPOS Database Recovery == It is possible for a database to become ‘Suspect’ for many reasons, such as: * There was an unexpected SQL Server Shutdown, power fail..." |
|||
| Line 89: | Line 89: | ||
Note: It may take some time to complete this command as the EEPOS database is replicating all data from EEE over the network again. | Note: It may take some time to complete this command as the EEPOS database is replicating all data from EEE over the network again. | ||
6. Remove the previous command and copy the below command. | |||
<pre>USE EEPOS | |||
EXEC usp_ReplicateUpstreamData</pre> | |||
If the above command fails, this indicates that the EEPOS database was unable to send its data up to the store server or EEE Server. | |||
Please contact Magenta Support if this occurs. | |||
Once replication is complete the EEPOS Database should now be repaired and ready for use again. | Once replication is complete the EEPOS Database should now be repaired and ready for use again. | ||
Latest revision as of 00:52, 27 March 2017
Suspect EEPOS Database Recovery
It is possible for a database to become ‘Suspect’ for many reasons, such as:
- There was an unexpected SQL Server Shutdown, power failure or a hardware failure.
- The database could have become corrupted.
- The database cannot be opened due to inaccessible files or insufficient memory or disk space.
- The database files are being held by operating system, third party backup software etc.
The below instructions show how to recover a Suspect database.
Stop EEPOS Service
EEPOS and the POS Service need to be closed before performing the steps to resolve the suspect database.
1. Close EEPOS.
2. Open the Windows Services screen (Control Panel → Administrative Tools → Services)
3. Stop the EEPOS Service – MAGENTAPOS service.
Backup EEPOS Database Files
Perform a backup of the EEPOS Database files.
1. Browse to C:\Program Files\Microsoft SQL Server\MSSQL11.MAGENTAPOS\MSSQL\DATA 2. Make a copy of the EEPOSdat.mdf and EEPOSlog.ldf files.
Note: If a prompt appears saying that the files are currently in use you will need to temporarily stop the SQL Service.
3. Open the Windows Services screen (Control Panel → Administrative Tools → Services)
4. Stop the SQL Server (Magentapos) service.
5. Attempt to copy the EEPOSdat.mdf and EEPOSlog.ldf files again.
6. Start the SQL Server (Magentapos) service again.
Connect to Magentapos SQL Instance
Open SQL Management Studio on your EEE Server. Then connect to the tills local SQL Database over the network using the below details.
Server Name – Hostname\magentapos
Example: If hostname of machine is Server40, then Server name should be Server40\magentapos
Authentication – SQL Server Authentication
Login – Magentasupport
Password – Please contact Magenta Support for the SQL Database Password.
Repairing Suspect Database
Once connected to the Tills SQL Database, follow the below steps to check and repair and corrupt data on the EEPOS Database.
1. Begin a new query by selecting New Query (CTRL+N).
2. Copy the below SQL command into the new query window.
EXEC sp_resetstatus EEPOS; ALTER DATABASE EEPOS SET EMERGENCY DBCC checkdb(EEPOS) ALTER DATABASE EEPOS SET SINGLE_USER WITH ROLLBACK IMMEDIATE DBCC CheckDB (EEPOS, REPAIR_ALLOW_DATA_LOSS) ALTER DATABASE EEPOS SET MULTI_USER
3. Select Execute (F5) to run the command.
This command should bring the database out of suspect mode and repair any corrupt data if possible.
4. Once completed, the EEPOS database should no longer be marked as suspect and should be accessible.
5. Remove the previous command and copy in the below command.
This command will replicate all data from EEE down to the till again.
EXEC usp_ReplicateMasterTablesLoop 1,10000
Note: It may take some time to complete this command as the EEPOS database is replicating all data from EEE over the network again.
6. Remove the previous command and copy the below command.
USE EEPOS EXEC usp_ReplicateUpstreamData
If the above command fails, this indicates that the EEPOS database was unable to send its data up to the store server or EEE Server. Please contact Magenta Support if this occurs.
Once replication is complete the EEPOS Database should now be repaired and ready for use again.
Testing
Perform the below steps to ensure EEPOS is working correctly.
1. Open the Windows Services screen (Control Panel → Administrative Tools → Services)
2. Start the EEPOS Service – MAGENTAPOS service.
3. Open EEPOS and check that you can search for products (F4.
4. Search for a customer (F12).
Once EEPOS is running again, we recommend reviewing the SQL Server logs to check for what caused the database to become suspect, to ensure the problem does not re-occur.
The SQL Server logs can be found under - C:\Program Files\Microsoft SQL Server\MSSQL11.MAGENTAPOS\MSSQL\Log
