CA Service Management

 View Only

Publish schema with replication without delete replication (READPAST error) 

Jun 06, 2016 07:36 AM

Hello again guys,

 

I found a way to use pdm_publish with BD replication(boxi offline) without delete that replication, only stopping that.

With the replication online, you will recive the READPAST error during the pdm_publish.

 

Before PDM_PUBLISH, you need to stop the replication agent:

replication2.PNG

replication3.PNG

 

With the Agent stopped, insert the var SQL_NO_DIRTY_READS:

sql_dirty1.PNG

 

Now, you can use PDM_PUBLISH without recive the READPAST error.

 

After this, disable that variable:

sql_dirty2.PNG

 

And start the Agent.

 

 

 

Tks to EduardoDiersmann and Sandra_Antunes.

Statistics
0 Favorited
5 Views
0 Files
0 Shares
0 Downloads

Tags and Keywords

Comments

Dec 18, 2019 07:20 AM

In case someone is looking for this command to be executed each time a publish is done, you'll need to change the pdm_publish.cmd under the bin folder, the following are the changes I've made, tested it a few times and works ok.
@echo off rem ####################################################################### rem Simple Windows command to change to $NX_ROOT\bin and run pdm_publish rem ####################################################################### setlocal set NX_TEMP_CMD=%TEMP%\cd_nx.cmd nx_env -d NX_ROOT | pdm_gsub / \ > %NX_TEMP_CMD% CALL %NX_TEMP_CMD% echo pushd %NX_ROOT%\bin > %NX_TEMP_CMD% call %NX_TEMP_CMD% if ERRORLEVEL 1 goto :error set /p REP_DISABLED="DB Replica needs to be disabled before publishing, continue? (Y/N): " if %REP_DISABLED% == Y ( rem install option to avoid SQL READPAST error produced by DB replica pdm_options_mgr -c -s SQL_NO_DIRTY_READS -v 1 -a pdm_option.inst && pdm_perl .\pdm_publish.pl %1 %2 %3 %4 %5 %6 %7 %8 && pdm_options_mgr -c -s SQL_NO_DIRTY_READS -v 1 -a pdm_option.deinst echo You can now reactivate DB replica ) ELSE ( echo pdm_publish aborted by administrator goto :exit ) if ERRORLEVEL 1 goto :pdm_publish_error popd goto :exit :error echo Unable to cd to $NX_ROOT\bin echo Please do this manually and then issue the command echo pdm_perl .\pdm_publish.pl :pdm_publish_error echo pdm_publish execution failed exit /b 1 :exit del %NX_TEMP_CMD%

Mar 22, 2018 08:34 AM

Hey Rianne,

 

Please ignore my previous comment. My apologies.

 

Though NO_DIRTY_READS was being referred to, it does look like  SQL_NO_DIRTY_READS  is still the correct one.  Meaning what you have in the document is correct, no changes needed.

 

Thank you !

_R

Mar 21, 2018 09:23 AM

Rianne,

 

Based on the source code, the option seems to be:

 

NO_DIRTY_READS  and not  SQL_NO_DIRTY_READS.

 

Everything else should be correct otherwise though.  Would this be a change that you could make?


Thank you 
_R

 

Edited my comment above and put a strikethrough so please do not get misled by my previous wrong suggestion.  Its still readable, but makes it hard :-)

Jun 06, 2016 08:43 AM

Thanks for the feedback Rianne. I'll request the original tecdoc to be updated with this info!

Sandra

Related Entries and Links

No Related Resource entered.