Example :- sales table and Purchtable already in databaselog table.
If i try to insert new table it is not getting added......
Urgent pls suggest
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
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
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