Tuesday, October 16, 2012

Journal entry "number" has been entered in another window

Cause

The BACHNUMB and BCHSOURC fields was missing in GL10000.

Resolution

1. Call the journal entry number from GL10001.
2. Copy batch ID from BACHNUMB and past in the BACHNUMB field in GL10000.
3. Mostly the BCHSOURC is GL_Normal.

Monday, October 1, 2012

You cannot complete this process while transactions are being edited

When you attempt to reconcile Inventory Control in Microsoft Dynamics GP, you receive the following message.

You cannot complete this process while transactions are being edited.

Cause

You may have a user locked in a table even though all users are logged out.

Resolution


1. Have all users exit Microsoft Dynamics GP and execute the following query in the SQL Query Tool against the DYNAMICS database: 

delete SY00800

2. Execute the following queries against the Tempdb database: 

delete DEX_LOCK 

delete DEX_SESSION

3. Run this script 

UPDATE SY00500 SET MKDTOPST=0, BCHSTTUS=0 where BACHNUMB='XXX'


APPLIES TO
  • Microsoft Dynamics GP 2010
  • Microsoft Dynamics GP 10.0
  • Microsoft Dynamics GP 9.0, when used with:
    • Inventory Control

Saturday, September 29, 2012

The server principal "sqlLoginName" is not able to access the database "myDatabaseName" under the current security context.

Description of the issue: When you restore a backup database to another server, you may encounter the error message below when you try to connect.

Msg 916, Level 14, State 1, Line 1The server principal "mtohamy" is not able to access the database "TWO" under the current security context.

Cause: When you restore a backup database to another server, you may experience a problem with orphaned users. That is to say that the SID system view sysuser is not mapped to a SID syslogins existing.

Resolution: To detect orphaned users you can run the following command:
USE <TWO>sp_change_users_login  @Action='Report';

You can see that the SID does not match the system views: sys.sysusers and sys.syslogins
USE <TWO>SELECT sid FROM sys.sysusers WHERE name = 'mtohamy'SELECT sid FROM sys.syslogins WHERE name = 'mtohamy'

To correct this problem of connection between the server connection account specified by the user and <login_name> the database specified by <database_user>, you can run the following command.
USE <myDatabaseName>EXEC  sp_change_users_login @Action='update_one', @UserNamePattern='mtohamy',@LoginName='mtohamy';

This should be done to all the db(s)  that user is associated in.



SQL SERVER – Fix: Error: 15138 – The database principal owns a schema in the database, and cannot be dropped

Error:
The database principal owns a schema in the database, and cannot be dropped. (Microsoft SQL Server, Error: 15138)

Reason:
 The reason for error is quite clear from the error message as there were schema associated with the user and that needs to be transferred to another user.

Solution:
Let us assume that user was trying to delete user which is named as ‘mtohamy’ and it exists in the database ‘TWO’.
Now run following script with the context of the database where user belongs.
USE TWO;SELECT s.nameFROM sys.schemas sWHERE s.principal_id USER_ID('mtohamy');
In my query I get following two schema as a result.




Now let us run following query where I will take my schema and and alter authorization on schema. In our case we have two schema so we will execute it two times.
ALTER AUTHORIZATION ON SCHEMA::db_denydatareader TO dbo;ALTER AUTHORIZATION ON SCHEMA::db_denydatawriter TO dbo;
Now if you drop the database owner it will not throw any error.
Here is generic script for resolving the error:
SELECT s.nameFROM sys.schemas sWHERE s.principal_id USER_ID('mtohamy');
Now replace the result name in following script:
ALTER AUTHORIZATION ON SCHEMA::YourSchemaName TO dbo;

Wednesday, February 29, 2012

syExcelReports.fmt

I was trying today to install MS Dynamics GP2010 @ customer development server while I'm creating Dynamics.db when the system was loading the "Load Required Data" step exactly when system was loading the "syExcelReports.fmt" I got error and couldn't complete the installation also GP utility has been closed then I copied my "Install.dll" from my machine and replace it @ the customer program files under C:\Program Files\Microsoft Dynamics\GP2010\SQL\0 then I run the utility again and it has been passed successfully.
FYI I've uploaded the "Install.dll" @ 4shared.com

Monday, January 16, 2012

Activate Analytical Accounting Manually


The case after installing and configuring the AA normally I noticed that the AA is not activated at the company and after investigation I activated it Manually from the Dynamics.db open AAG00104 then select the company and modify the aaCompanyStatus to 4 then you will find the AA is activated at the relevant database.
But don’t forget to backup your databases before  :)

Sunday, January 15, 2012

Error message when you try to post a journal entry that contains Analytical Accounting assignments in Microsoft Dynamics GP : "Cannot insert the value NULL into column 'aatrxsource' table"


Cause:
This problem occurs because an Analytical Accounting record is missing in the SY01000 table.
Solution:
Run the following script in an appropriate SQL query tool against the company database.
insert into SY01000 VALUES (0,2,0,'Analytical Accounting','AATRX',1,'')
Wish it will help.
BR,
Mohammed Tohamy