Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Database log updation of tables not working Ax 2009

727 views
Skip to first unread message

Kishore

unread,
Aug 15, 2010, 10:31:03 AM8/15/10
to
i am not able to update the tables which i had inserted before in database log.
the only option available is to delete all the tables and re insert again.IF
I try to insert a new table to existing database log why the tables not
getting inserted?

Example :- sales table and Purchtable already in databaselog table.

If i try to insert new table it is not getting added......

Urgent pls suggest

SCGAN

unread,
Aug 17, 2010, 9:31:03 AM8/17/10
to
Hi Kishore,

Are you facing this issue?

https://mbs.microsoft.com/knowledgebase/KBDisplay.aspx?scid=kb;en-us;978889

You cannot add or change database log settings more than one time if you do
not have the license for Production I in Microsoft Dynamics AX 2009

Solution: Request and install this hotfix or install RU4 or above.

Regards,
S.C.GAN

Kishore

unread,
Aug 17, 2010, 10:17:04 PM8/17/10
to
HI SCGAN,
You are correct ...The below KB link is not working.

Alternatively I have debugged the code

delete_from dblog
where dblog.DomainId == domainId && (dblog.LogType ==
DatabaseLogType::Delete ||
dblog.LogType == DatabaseLogType::Insert || dblog.LogType ==
DatabaseLogType::RenameKey ||
dblog.LogType == DatabaseLogType::Updat notexists join
sysDatabaseLogTableSetup
where sysDatabaseLogTableSetup.DomainId == dblog.DomainId &&
sysDatabaseLogTableSetup.TableIdRef == dblog.LogTable;


this query fails to execute in the doRun() method of SysDatabaseLogWizard
class.if u run this in a seperate job the query executes and deletes the
databaselog table.

if u comment the sysDatabaseLogTableSetup table which is auditing for the
esignature of lifescience which has no data and does not required

if u coment the notexist join part it is working correctly......

but i am not sure whether the commenting of code would be good for the
longer term

Can u send the correct link as i logged not partner source id it says
sonnection unavailable

SCGAN

unread,
Aug 18, 2010, 2:27:03 AM8/18/10
to
Hi Kishore,

The link is correct. MS KB site have problem right now.

Alternately you can modify SysDatabaseLogWizard class for quick fix.

static server void doRun(TmpDatabaseLogWizard log, domainId domainId)
{
SysDatabaseLogTableSetup sysDatabaseLogTableSetup;
SysSignatureSetup sigSetup; //SIG
SIGProcSetup procSetup; //SIG
SIGProcSetupField procSetupField; //SIG

DatabaseLog dblog;
Company company = new Company(curext());
ttsbegin;

if (domainAccess())
{
// Life Science Electronic Signature Configuration Key
if(isConfigurationkeyEnabled(configurationkeynum(SysSign)))
{


delete_from dblog
where dblog.DomainId == domainId && (dblog.LogType
== DatabaseLogType::Delete ||
dblog.LogType
== DatabaseLogType::Insert ||
dblog.LogType
== DatabaseLogType::RenameKey ||
dblog.LogType

== DatabaseLogType::Update)


notexists join sysDatabaseLogTableSetup
where sysDatabaseLogTableSetup.DomainId ==
dblog.DomainId &&
sysDatabaseLogTableSetup.TableIdRef ==
dblog.LogTable;
}

else
{


delete_from dblog
where dblog.DomainId == domainId && (dblog.LogType
== DatabaseLogType::Delete ||
dblog.LogType
== DatabaseLogType::Insert ||
dblog.LogType
== DatabaseLogType::RenameKey ||
dblog.LogType

== DatabaseLogType::Update);
}
}
else
{
while select forupdate dblog
{
if (SysDatabaseLogWizard::tableAllowed(dblog.LogTable,
domainId))
{
dblog.delete();
}
}
}
//SIG - start
if (isConfigurationkeyEnabled(configurationkeynum(SIG)))
{
delete_from sigSetup
notexists join dblog
where dblog.RecId == sigSetup.LogRecRefId;
}
//SIG - end
dblog.DomainId = domainId;
while select log
{
dblog.LogTable = tablename2id(log.Tablename);
dblog.LogField = fieldname2id(dblog.LogTable, log.FieldName);
if (log.LogDelete)
{
dblog.LogType = DatabaseLogType::Delete;
dblog.insert();
}
if (log.LogInsert)
{
dblog.LogType = DatabaseLogType::Insert;
dblog.insert();
}
if (log.LogUpdate)
{
dblog.LogType = DatabaseLogType::Update;
dblog.insert();
}
if (log.LogRename)
{
dblog.LogType = DatabaseLogType::RenameKey;
dblog.insert();
}
if (log.LogEventDelete)
{
dblog.LogType = DatabaseLogType::EventDelete;
dblog.insert();
}
if (log.LogEventInsert)
{
dblog.LogType = DatabaseLogType::EventInsert;
dblog.insert();
}
if (log.LogEventUpdate)
{
dblog.LogType = DatabaseLogType::EventUpdate;
dblog.insert();
}
if (log.LogEventRename)
{
dblog.LogType = DatabaseLogType::EventRenameKey;
dblog.insert();
}
}
//SIG - start
if (isConfigurationkeyEnabled(configurationkeynum(SIG)))
{
if (useDomains())
{
while select procSetupField
join RecId
from procSetup
where procSetup.RecId ==
procSetupField.SetupRef
&& procSetup.ProcSignatureControlled ==
NoYes::Yes
&& procSetup.DomainId ==
domainId
{
procSetupField.addSignatureSetup();
}
}
else
{
while select procSetupField
join RecId
from procSetup
where procSetup.RecId ==
procSetupField.SetupRef
&& procSetup.ProcSignatureControlled ==
NoYes::Yes
{
procSetupField.addSignatureSetup();
}
}
}
//SIG - end
ttscommit;
SysFlushDatabaseLogSetup::main();
}

Regards,
S.C.GAN

0 new messages