Thursday, January 9, 2014
SQL 2008 R2 - Failed to flush the commit table to disk
Other errors
Failed to flush the commit table to disk in dbid 10 due to error 2601
Failed to flush the commit table to disk in dbid 8 due to error 8630
Solution 1 (does absolutely nothing):
This issue is resolved in the latest service pack
http://support.microsoft.com/kb/2527041
If the service pack does not resolve the issue, you must repair your SQL installation
Launch SQL Install>Maintenance>Repair
Solution 2 (this one worked for me):
Run a
DBCC CHECKDB (two) WITH NO_INFOMSGS, ALL_ERRORMSGS
then most likely a
ALTER DATABASE two SET SINGLE_USER
GO
DBCC CHECKDB (two,repair_rebuild)
GO
ALTER two SET MULTI_USER
GO
Solution 3 (others have reported this, i tried it, it did not work):
You can also disable change tracking on all objects and the database, and delete the uncommitted transactions
--Find all objects with change tracking
select (select OBJECT_NAME(object_id)) from sys.change_tracking_tables
--Disable change tracking on each object
Failed to flush the commit table to disk in dbid 10 due to error 2601
Failed to flush the commit table to disk in dbid 8 due to error 8630
Solution 1 (does absolutely nothing):
This issue is resolved in the latest service pack
http://support.microsoft.com/kb/2527041
If the service pack does not resolve the issue, you must repair your SQL installation
Launch SQL Install>Maintenance>Repair
Solution 2 (this one worked for me):
Run a
DBCC CHECKDB (two) WITH NO_INFOMSGS, ALL_ERRORMSGS
then most likely a
ALTER DATABASE two SET SINGLE_USER
GO
DBCC CHECKDB (two,repair_rebuild)
GO
ALTER two SET MULTI_USER
GO
Solution 3 (others have reported this, i tried it, it did not work):
You can also disable change tracking on all objects and the database, and delete the uncommitted transactions
--Find all objects with change tracking
select (select OBJECT_NAME(object_id)) from sys.change_tracking_tables
--Disable change tracking on each object
alter table GL00102 disable change_tracking
alter table MC00200 disable change_tracking
alter table GL10001 disable change_tracking
alter table GL10100 disable change_tracking
alter table GL10101 disable change_tracking
alter table MC40000 disable change_tracking
alter table SY00300 disable change_tracking
alter table GL40000 disable change_tracking
alter table GL12000 disable change_tracking
alter table GL00201 disable change_tracking
alter table GL12001 disable change_tracking
alter table GL10000 disable change_tracking
alter table GL32000 disable change_tracking
alter table GL40200 disable change_tracking
alter table GL20000 disable change_tracking
alter table GL00200 disable change_tracking
alter table GL00100 disable change_tracking
alter table GL30000 disable change_tracking
alter table SY40100 disable change_tracking
alter table SY40101 disable change_tracking
--Disable Change tracking on database
ALTER DATABASE AdventureWorks2012 SET CHANGE_TRACKING = OFF
--Delete the sys.syscommittab table
Click New QueryClick Change connection to bring up the login screen for the queryenter ADMIN: before your sql server name to use the DAC connectionSelect your company--backup the syscommittab tableselect * into dbo.syscommittab_bak from sys.syscommittabdelete sys.syscommittab
--Enable change tracking on each objectalter table GL00102 enable change_tracking alter table MC00200 enable change_tracking alter table GL10001 enable change_tracking alter table GL10100 enable change_tracking alter table GL10101 enable change_tracking alter table MC40000 enable change_tracking alter table SY00300 enable change_tracking alter table GL40000 enable change_tracking alter table GL12000 enable change_tracking alter table GL00201 enable change_tracking alter table GL12001 enable change_tracking alter table GL10000 enable change_tracking alter table GL32000 enable change_tracking alter table GL40200 enable change_tracking alter table GL20000 enable change_tracking alter table GL00200 enable change_tracking alter table GL00100 enable change_tracking alter table GL30000 enable change_tracking alter table SY40100 enable change_tracking alter table SY40101 enable change_tracking--Enable Change tracking on databaseALTER DATABASE AdventureWorks2012 SET CHANGE_TRACKING = ON
Wednesday, January 8, 2014
Dynamics GP - Reconcile to GL - Inventory - Violation of Primary Key contstraint... Cannot insert duplicate key in object
Related Issues
--The problem occurs when this script is trying to run, but returns duplicates
BEGIN DECLARE @stored_proc_name char(28) DECLARE @retstat int set nocount on SELECT @stored_proc_name = 'ATLT.dbo.glGetIVTransactions'
EXEC @retstat = @stored_proc_name '2013.11.01', '2013.11.30', '##1765136' SELECT @retstat set nocount on END
--The constraint in question is this one
ALTER TABLE ##1765136 ADD CONSTRAINT PK##1765136 PRIMARY KEY NONCLUSTERED (TRXSORCE, DOCNUMBR, DOCTYPE, JRNENTRY, ACTINDX, ITEMNMBR)
--Send the output to a clean temp table
select * into temp_GLIVREC from dbo.##1765136
BEGIN DECLARE @stored_proc_name char(28) DECLARE @retstat int set nocount on SELECT @stored_proc_name = 'ATLT.dbo.glGetIVTransactions'
EXEC @retstat = @stored_proc_name '2013.11.01', '2013.11.30', 'temp_GLIVREC' SELECT @retstat set nocount on END
--Review the output by running this query to identify any duplicates
SELECT TRXSORCE, DOCNUMBR, DOCTYPE, JRNENTRY, ACTINDX, ITEMNMBR
FROM temp_GLIVREC
GROUP BY TRXSORCE, DOCNUMBR, DOCTYPE, JRNENTRY, ACTINDX, ITEMNMBR
HAVING (COUNT(TRXSORCE) > 1)
--I found that i was getting duplicates due to transctions in the SEE30303 table having blank TRXSORCE values. To resolve the issue, i populated the trxsorce with the dexrowid because i was unsure if the records should be deleted or not. I kept a backup of the SEE30303 table in case we needed to reset the data
select * into see30303_bak from SEE30303
update see30303 set TRXSORCE = DEX_ROW_ID where TRXSORCE = ''
- The excel sheet will still be generated after clearing the error
- The reconciled excel sheet shows no matched transactions
- All transactions appear as unmatched
--The problem occurs when this script is trying to run, but returns duplicates
BEGIN DECLARE @stored_proc_name char(28) DECLARE @retstat int set nocount on SELECT @stored_proc_name = 'ATLT.dbo.glGetIVTransactions'
EXEC @retstat = @stored_proc_name '2013.11.01', '2013.11.30', '##1765136' SELECT @retstat set nocount on END
--The constraint in question is this one
ALTER TABLE ##1765136 ADD CONSTRAINT PK##1765136 PRIMARY KEY NONCLUSTERED (TRXSORCE, DOCNUMBR, DOCTYPE, JRNENTRY, ACTINDX, ITEMNMBR)
--Send the output to a clean temp table
select * into temp_GLIVREC from dbo.##1765136
BEGIN DECLARE @stored_proc_name char(28) DECLARE @retstat int set nocount on SELECT @stored_proc_name = 'ATLT.dbo.glGetIVTransactions'
EXEC @retstat = @stored_proc_name '2013.11.01', '2013.11.30', 'temp_GLIVREC' SELECT @retstat set nocount on END
--Review the output by running this query to identify any duplicates
SELECT TRXSORCE, DOCNUMBR, DOCTYPE, JRNENTRY, ACTINDX, ITEMNMBR
FROM temp_GLIVREC
GROUP BY TRXSORCE, DOCNUMBR, DOCTYPE, JRNENTRY, ACTINDX, ITEMNMBR
HAVING (COUNT(TRXSORCE) > 1)
--I found that i was getting duplicates due to transctions in the SEE30303 table having blank TRXSORCE values. To resolve the issue, i populated the trxsorce with the dexrowid because i was unsure if the records should be deleted or not. I kept a backup of the SEE30303 table in case we needed to reset the data
select * into see30303_bak from SEE30303
update see30303 set TRXSORCE = DEX_ROW_ID where TRXSORCE = ''
Tuesday, January 7, 2014
Dynamics GP - SOP Posting - Unable to obtain Receivables Document Number
Solution here
http://support.microsoft.com/kb/856940
Run these scripts
--Confirm document started posting
SELECT * from RM00401 where DOCNUMBR = '509924'
--Confirm status is not 0
SELECT PSTGSTUS,* from SOP10100 where PSTGSTUS <> 0
--Set the PSTGSTUS back to 0, then post
UPDATE SOP10100 SET PSTGSTUS = 0 where SOPNUMBE in ('509924','510048')
PSTNGSTUS Values
http://dynamicsgpblogster.blogspot.com/2009/05/sales-order-processing-posting-statuses.html
0 - Unposted
2 - Posted
12 - Error during posting
14 - Error during posting
http://support.microsoft.com/kb/856940
Run these scripts
--Confirm document started posting
SELECT * from RM00401 where DOCNUMBR = '509924'
--Confirm status is not 0
SELECT PSTGSTUS,* from SOP10100 where PSTGSTUS <> 0
--Set the PSTGSTUS back to 0, then post
UPDATE SOP10100 SET PSTGSTUS = 0 where SOPNUMBE in ('509924','510048')
PSTNGSTUS Values
http://dynamicsgpblogster.blogspot.com/2009/05/sales-order-processing-posting-statuses.html
0 - Unposted
2 - Posted
12 - Error during posting
14 - Error during posting
Dynamics GP - SOP Edit List Errors
All of the errors are stored in the SOP10200 table.
the error code is in the SOPLNERR field.
http://support.microsoft.com/kb/943954
the error code is in the SOPLNERR field.
http://support.microsoft.com/kb/943954
Monday, December 30, 2013
Dynamics GP - Bank Audit Trail Codes: GPS Error: 54
Solution here
http://dynamicscare.com/blog/dynamics-gp-error-when-trying-to-print-bank-trans-history-report-using-audit-trail-code/
Problem:
Single Audit Trail code is used across multiple dates
run this query to identify the problem Bank transactions, and the last posted dates
------------------------------------------------------------------------------------------------------
SELECT AUDITTRAIL, COUNT(DISTINCT POSTEDDT) AS Expr1,Max(DISTINCT POSTEDDT) AS Expr2
FROM CM20200
GROUP BY AUDITTRAIL
HAVING (COUNT(DISTINCT POSTEDDT) > 1)
------------------------------------------------------------------------------------------------------
Next, update the posteddt for all audittrails that have multiple posteddts
------------------------------------------------------------------------------------------------------
update CM20200 set POSTEDDT = '2010-08-28 00:00:00.000' where AUDITTRAIL = 'CMDEP00001936' and POSTEDDT <> '2010-08-28 00:00:00.000'
------------------------------------------------------------------------------------------------------
After resolving this issue, another issue popped up immediately after due to multiple PDTUSRID values per audittrailcode in the CM20200
Other Related Errors:
An error occurred executing the SQL statements
GPS Error: 54
SQL Error: 2627 Violation of Primary Key Constraint, Cannot insert duplicate key in object
ODBC Error: 23000
Run this script to identify the duplicated lines for the audit trail codes throwing errors.
------------------------------------------------------------------------------------------------------
select * from cm20200 where cmrecnum in (select cmdnumwk from cm20100 where audittrail = 'cmdep00002318')
------------------------------------------------------------------------------------------------------
Find the PDTUSRID that should be used on all the transactins, then update all of the transactions to have the same PDTUSRID
------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------
http://dynamicscare.com/blog/dynamics-gp-error-when-trying-to-print-bank-trans-history-report-using-audit-trail-code/
Problem:
Single Audit Trail code is used across multiple dates
run this query to identify the problem Bank transactions, and the last posted dates
------------------------------------------------------------------------------------------------------
SELECT AUDITTRAIL, COUNT(DISTINCT POSTEDDT) AS Expr1,Max(DISTINCT POSTEDDT) AS Expr2
FROM CM20200
GROUP BY AUDITTRAIL
HAVING (COUNT(DISTINCT POSTEDDT) > 1)
------------------------------------------------------------------------------------------------------
Next, update the posteddt for all audittrails that have multiple posteddts
------------------------------------------------------------------------------------------------------
update CM20200 set POSTEDDT = '2010-08-28 00:00:00.000' where AUDITTRAIL = 'CMDEP00001936' and POSTEDDT <> '2010-08-28 00:00:00.000'
------------------------------------------------------------------------------------------------------
After resolving this issue, another issue popped up immediately after due to multiple PDTUSRID values per audittrailcode in the CM20200
Other Related Errors:
An error occurred executing the SQL statements
GPS Error: 54
SQL Error: 2627 Violation of Primary Key Constraint, Cannot insert duplicate key in object
ODBC Error: 23000
Run this script to identify the duplicated lines for the audit trail codes throwing errors.
------------------------------------------------------------------------------------------------------
select * from cm20200 where cmrecnum in (select cmdnumwk from cm20100 where audittrail = 'cmdep00002318')
------------------------------------------------------------------------------------------------------
Find the PDTUSRID that should be used on all the transactins, then update all of the transactions to have the same PDTUSRID
------------------------------------------------------------------------------------------------------
update CM20200 set PTDUSRID = 'Gillian' where DEX_ROW_ID = '107647'
------------------------------------------------------------------------------------------------------
Subscribe to:
Posts (Atom)