I wrote a report to do item renaming. It read the "Rename String", a new field created in the item table,and does the rename when I ran the report at night. It worked great and I can print/email/fax the output report to the sales person and warehouse for their reference.
I just installed the NAS for Navision 3.70b and create a new parameter "ITMREM", associated with all the necessary code and codeunit, for the services. The application server service started OK and connected to the SQL server without problem. I can see it was connected to the proper database and company through database information.
The service was ran under a timer and it should wake up at 22:30PM and start to run the report to rename. BUT it got stuck at first item, it renamed the first item then just got stuck. SQL log file was keeping growing and growing....
I have Navision 3.70b, run time, with SQL option - SQL 2000 SP4 running on MS 2000 Server SP4.
Anyone had any idea why this is happening? HELP!!!! ](*,) ](*,) ](*,)
0
Answers
Example: if you have a few gigs in the item ledger entry, Sql server has to write item the ledger entry modifications in transaction log, and then renames the item ledger entry, and the transaction log file will grow quickly. If the transaction takes too long, the SQL server can give timout during the renaming and gives error.
Freelance Dynamics AX
Blog : http://axnmaia.wordpress.com/
Thank you nunomaia.
I understood the issues with renaming and that is why the report ran at night with only one user -- me! I created the report 6 month ago and had no problem until try to use nas to run it. The log file actually doubled, up to 13GB, while it was stuck in nas. Any idea why?
RIS Plus, LLC
Thank you DenSter,
I will add the COMMIT statement into my code and test it tonight!
Yet, it stuck at the end of the FIRST item! Say, I have 10 items need to be renamed. When I used to run it manually, it took sometime to finish. But when I use nas and the timer to run the same report, it just stuck after finish renaming the FIRST item!
Is this has anything to do with I am using section to create output. But I entered the report ID into the printer selection table and set the parameter to FALSE,FALSE already!
HELP!!!
Even with COMMIT, if you have Recovery mode Full Backup the log file will grow very fast.
Freelance Dynamics AX
Blog : http://axnmaia.wordpress.com/
Thank you nunomaia,
Yes, I have another instance started at 21:00PM to do the "Adjust Cost - Item Entry" and event viewer loged start time and ending time at least 20 minutes before the time to run the item renaming report. Can I run 2 instances as two separate services at the same time?
Thanks :-s
Freelance Dynamics AX
Blog : http://axnmaia.wordpress.com/
I deleted the "section" of the renaming report and it went through. Renamed all the item and log file did not go crazy!!!!
So, What should I do if I need to produce a output from the NAS processing?
Please advise.
PS. All I did was delete the section from the report, I did not add COMMIT and still running two nas instances!!!
Thanks all! :shock:
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
Hi Kine,
I have the code in code unit 1 as follow:
'ITMREM':
BEGIN
CODEUNIT.RUN(CODEUNIT::"Item Renaming Management");
ATASStarted := TRUE;
END;
and code in the code unit "Item Renaming Management" as follow:
OnRun()
IF ISCLEAR(Timer) THEN
CREATE(Timer);
interval := 60 * 15; //wake up every 15 minutes
Timer.Enabled := FALSE;
Timer.Interval := interval * 1000;
Timer.Enabled := TRUE;
UserStartTime := 222900T;
LastRunDate := 0D;
Timer::Timer(Milliseconds : Integer)
IF (TIME >= UserStartTime) AND (TODAY <> LastRunDate) THEN
BEGIN
MESSAGE('Start Rename Item %1',TIME);
REPORT.RUNMODAL(50173,FALSE,FALSE);
MESSAGE('Done Rename Item %1',TIME);
LastRunDate := TODAY;
END;
report 50173 is the report does the renaming:
Item - OnAfterGetRecord()
IF Item2.GET(Renamestring) THEN CurrReport.SKIP;
IF Item1.GET("No.") AND (Renamestring <> '') THEN
IF Item1.RENAME(Renamestring) THEN BEGIN
Item1.Renamestring := '';
Item1.MODIFY;
END;
Thanks :roll:
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.