cancel
Showing results for 
Search instead for 
Did you mean: 

synchronization conflict resolution

Former Member
0 Kudos

Hello, i am testing synchronization, and i have created a conflict (unique index) to see what happens, with synchronization service stopped in master and client in a "in/out" i have created in the two databases in a replicated table with different primary key, the same values in two columns with a multiple column unique index, later i have launched synchronization service and i get this on the client:

SQLException 250: [250]: Duplicate secondary key:UQ_MODELO_TALLA: 23000

[Wed Mar 05 18:21:42 CET 2008]Listener thread stopped.

[Wed Mar 05 18:21:42 CET 2008] Stopping with session queue size: 0

SQLException 250: [250]: Duplicate secondary key:UQ_MODELO_TALLA: 23000

do i have any way to configure conflict resolution? i have not found how to in the maxdb 7.6 documentation. If i cant configure how i can discard updates? synchronization service has closed after this message. Thanks in advance.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello,

the Synchronization Manager handles conflict resolution only with primary keys. Secondary keys like unique indexes are not taken into account.

The conflict resolution rules are fixed. Generally you can say that conflichts are resolved at the master database. Data that was accepted by the master database will be inserted at the client databases.

To avoid conflicts during updates you can define columns groups. (See example document)

Regards

Wolfgang

Former Member
0 Kudos

ok, i have read the documentation of synchronization example, about the column groups they are only to updates, no? i would like to handle inserts with different id and same unique values in secondary index, anyway about the conflict resolution, if it is fixed the inserted conflict in client database will be deleted and the master database version will be inserted in client database? about my test i have launch after the error the syncservice with "-verbose_consumption -verbose_capture" to try to see if i could do manual fix if i get this problem (get exact information about the record creating the problem), and now the client database has inserted the record forgetting the unique index, i have now in client database the two records ¿¿??

Former Member
0 Kudos

Hi,

>the column groups they are only to updates, no?

Yes, the column groups are useful to avoid conflicts with updates.

> inserted conflict in client database will be deleted and the master database version will be inserted in client database?

Yes, if the master database receives an insert which failes with a duplicate key it will send its data to the client.

> and now the client database has inserted the record forgetting the unique index, i have now in client database the two records

As the insert failed with "Duplicate secondary key" the row should be rolled back and not inserted.

Regards

Wolfgang

Former Member
0 Kudos

yes it should be rolled back but it has not been, it has been inserted this time (after start synchronization service two times, the first failed with unique index and the second has been inserted and synchronization service still it is running without errors, without delete the offending row in any of the databases)

ID TAL DATE MOD USER BARCODE

1140001158 313 2008-03-05 17140 2102 0292430303138

1142001157 313 2008-03-05 17140 2102 0292430303138

this are the two records in client database.

ID primary key

TAL+MOD is a unique index

BARCODE is unique index

and they have been inserted, to me it seems a kernel error. Any other idea?

Former Member
0 Kudos

Hi,

the SyncService is just doing "normal" SQL via JDBC. Could you please empty the table and insert the two data rows with the database and see if the same effect occurs.

Just to clarify:

> the first failed with unique index and the second has been inserted and synchronization service still it is running without errors

You mean inserting the first row failed, but the second row is inserted. Or do you start two SyncServices for one client.

Regards

Wolfgang

Former Member
0 Kudos

>

> Hi,

>

> the SyncService is just doing "normal" SQL via JDBC. Could you please empty the table and insert the two data rows with the database and see if the same effect occurs.

I will delete the records from Sql Studio and i will try to recreate it.

>

> Just to clarify:

> > the first failed with unique index and the second has been inserted and synchronization service still it is running without errors

> You mean inserting the first row failed, but the second row is inserted. Or do you start two SyncServices for one client.

I have started two services in the same client, after the first fail i have launched with "-verbose_consumption -verbose_capture" and it has inserted the record. In the master although it is a in/out synchronization i only have the row inserted on it, the client row has not been inserted in the master and the synchronization service in the master has not notified me of the problem, the client synchronization version has closed the first time with the error on unique index but the master synchronization service has not closed, no give any error either.

>

> Regards

> Wolfgang

Former Member
0 Kudos

Hi,

i tried to reproduce your problem.

I created the table

CREATE TABLE "SYNC_TEST"

(

"C1" Char (100) ASCII NOT NULL,

"C2" Char (100) ASCII,

UNIQUE(C2),

PRIMARY KEY("C1")

)

on master and client.

On the master I inserted the values.

insert into "SYNC_TEST" values('a','a')

insert into "SYNC_TEST" values('b','b')

On the client I inserted the value.

insert into "SYNC_TEST" values('c','a')

Now I sync the values from the master two the client.

As expected the SyncService failes with "Duplicate secondary key" an stops.

No data from the master was inserted on the client.

As the error only occurs on the client side only the client SyncService will throw an error.

Is this your scenario?

Regards

Wolfgang

Edited by: Wolfgang Auer on Mar 6, 2008 3:06 PM

Former Member
0 Kudos

the client database has not the unique index, it seems the export catalog has not created the indexes in the catalog file so the import has not created it, other questions:

1.- it is normal behaviour that export catalog has not recreated indexes? i have the grants and comments in the catalog but not the indexes

2.- can i activate synchronization if the client database has data? my databases will be connected by adsl and the database is more thant 1gb, it will be slow to send if i have to do with "send content to client" to start synchronization.

3.- i now have understand what have happened before, the first time synchronization service get the error has closed (but before it has wrote the record in the index-less client, the error was caused tried to insert client record in master database that have unique index), after the error it seems that the record has been forgotten so if i have a problem i will not know what record has created the problem and i will not can fix manually it, no?

Thanks.

Former Member
0 Kudos

Hi,

> it is normal behaviour that export catalog has not recreated indexes? i have the grants and comments in the catalog but not the indexes

I tested an EXPORT DB CATALOG and it exported the indexes.

> can i activate synchronization if the client database has data? my databases will be connected by adsl and the database is more thant 1gb, it will be slow to send if i have to do with "send content to client" to start synchronization.

Yes you can, as we discussed in a previous thread. If the data that has to be synchronized is already on the master and on the client database you use the menus: Initialize Master Versions, Synchronize Client Versions with Loader. This will generate all necessary version numbers on the master and transport it to the client database.

> i now have understand what have happened before, the first time synchronization service get the error has closed (but before it has wrote the record in the index-less client, the error was caused tried to insert client record in master database that have unique index), after the error it seems that the record has been > forgotten so if i have a problem i will not know what record has created the problem and i will not can fix manually it, no?

Each synced table has an audit table. The audit table only log "real" sync conflicts. In your case there was an SQL error. To log conflicts you have to start the SyncService with option -conflict_tables. The audit table starts with RA_ followed by its tableid. The table id can be found when you execute "select schemaname,tablename,tableid from domain.tables where tablename = ? and schemaname = ?".

I know this is manuall work and actually there is a GUI based support missing for conflict resolution.

Regards

Wolfgang

Former Member
0 Kudos

> Hi,

>

> > it is normal behaviour that export catalog has not recreated indexes? i have the grants and comments in the catalog but not the indexes

> I tested an EXPORT DB CATALOG and it exported the indexes.

>

i am using this command to export database:+

EXPORT DB CATALOG OUTSTREAM FILE 'oterosdb_ddl.catalog' DDL DATA OUTSTREAM+

FILE 'oterosdb_records.data' RECORDS PACKAGE OUTSTREAM FILE 'oterosdb_csv.package' CSV+

i have searched in my subversion repository (where i update the schema file catalog) and i see older revisions where the indexes was exported (with the same command).

> > can i activate synchronization if the client database has data? my databases will be connected by adsl and the database is more thant 1gb, it will be slow to send if i have to do with "send content to client" to start synchronization.

> Yes you can, as we discussed in a previous thread. If the data that has to be synchronized is already on the master and on the client database you use the menus: Initialize Master Versions, Synchronize Client Versions with Loader. This will generate all necessary version numbers on the master and transport it to the client database.

>

thanks.

> > i now have understand what have happened before, the first time synchronization service get the error has closed (but before it has wrote the record in the index-less client, the error was caused tried to insert client record in master database that have unique index), after the error it seems that the record has been > forgotten so if i have a problem i will not know what record has created the problem and i will not can fix manually it, no?

> Each synced table has an audit table. The audit table only log "real" sync conflicts. In your case there was an SQL error. To log conflicts you have to start the SyncService with option -conflict_tables. The audit table starts with RA_ followed by its tableid. The table id can be found when you execute "select schemaname,tablename,tableid from domain.tables where tablename = ? and schemaname = ?".

> I know this is manuall work and actually there is a GUI based support missing for conflict resolution.

>

i have read the row in conflict but i get no sufficient information to do a manual fix with this, i get the primary key, the conflict_type (¿?) and the row_version but i dont know with this how to identify what client has created the problem, and when i fix manually the row is there yet so i dont know what conflicts have been fixed, should i delete manually the row?

Former Member
0 Kudos

Hi,

> after the error it seems that the record has been forgotten

If there is an SQL error with the SyncService the messages on MessageServer will be marked as not delivered. In my test I received the data row again every time I started the SyncService.

Best Regards

Wolfgang

Former Member
0 Kudos

>

> Hi,

>

> > after the error it seems that the record has been forgotten

> If there is an SQL error with the SyncService the messages on MessageServer will be marked as not delivered. In my test I received the data row again every time I started the SyncService.

>

> Best Regards

> Wolfgang

in my test i get the error a non-fixed number of times and later it is started without any warnings or error but the row has not been inserted.

Former Member
0 Kudos

Hi,

I get the following output when I start the SyncService in verbose mode

RECEIVE: unit=1204811478479000000, type=0 (insert), trans=null, isLast=false, tab=1204811494432000000

creator=0, rowVers=1002, updater=0, colVers=0

1 AFTER colID=1204811473745000000, value=a

2 AFTER colID=1204811473745001000, value=a)

consumption INFO : statement not cached, SQL : lock (wait) row "MONA"."SYNC_TEST" key "C1"= ? in exclusive mode thread : Thread[ConsumptionUpdateHandlerSlaveThread-4,5,main]consumption INFO : statement not cached, SQL : insert into "MONA"."SYNC_TEST" set "C1"=?,"C2"=? thread : Thread[ConsumptionUpdateHandlerSlaveThread-4,5,main]

-


stopping all threads -


[Thu Mar 06 17:45:29 CET 2008 CaptureTableHandler-1] stopped

[Thu Mar 06 17:45:29 CET 2008 CaptureTransHandler-0] stopped

[Thu Mar 06 17:45:29 CET 2008 CaptureTableHandler-3] stopped

SQLException 250: [250]: Duplicate secondary key:INDEX001: 23000

com.sap.dbtech.jdbc.exceptions.DatabaseException: [250]: Duplicate secondary key:INDEX001

at com.sap.dbtech.jdbc.packet.ReplyPacket.createException(ReplyPacket.java:64)

With the output lines

1 AFTER colID=1204811473745000000, value=a

2 AFTER colID=1204811473745001000, value=a)

insert into "MONA"."SYNC_TEST" set "C1"=?,"C2"=?

you could identify the row that causes the problem.

Regards

Wolfgang

Former Member
0 Kudos

i get this output in verbose mode:

INFO: starting administration thread at port 7223 ...

INFO: ... done.

[Thu Mar 06 18:36:14 CET 2008 CaptureTableHandler-1] started

[Thu Mar 06 18:36:14 CET 2008 CaptureTransHandler-0] started

[Thu Mar 06 18:36:14 CET 2008 CaptureTableHandler-2] started

[Thu Mar 06 18:36:14 CET 2008 CaptureTableHandler-3] started

consumption INFO : statement not cached, SQL : select LAST_UPDATER, ROW_CREATOR, ROW_VERSION, REF_COUNT from "SYNCHRONIZATIONSERVICE"."REPLICATION_IGNORE_LIST" where UNIT_ID = '1204629808932000781' thread : Thread[SessionThread,5,main]

[Thu Mar 06 18:36:16 CET 2008 ConsumptionUpdateHandlerMasterThread-4] started

consumption INFO : statement not cached, SQL : lock (wait) row "OTEROS"."ARTICULO" key "ARTICULO_ID"= ? in exclusive mode thread : Thread[ConsumptionUpdateHandlerMasterThread-4,5,main]

consumption INFO : statement not cached, SQL : insert into "OTEROS"."ARTICULO" set "ARTICULO_ID"=?,"CODIGO_BARRAS_OTEROS"=?,"CODIGO_BARRAS_PROVEEDOR"=?,"FECHA_CREACION"=?,"ID_USUARIO"=?,"TALLA"=?,"ID_MODELO"=? thread : Thread[ConsumptionUpdateHandlerMasterThread-4,5,main]

consumption INFO : statement not cached, SQL : insert into "SYNCHRONIZATIONSERVICE"."_R_V_000000000000174E" set "ROW_VERSION"=?, "COL_GROUP_VERSION"=?, "ROW_CREATOR"=?, "LAST_UPDATER"=? , "_ARTICULO_ID"=? thread : Thread[ConsumptionUpdateHandlerMasterThread-4,5,main]

consumption INFO : statement not cached, SQL : update "SYNCHRONIZATIONSERVICE"."_R_000000000000174E" set "ROW_VERSION"=?, "COL_GROUP_VERSION"=?, "ROW_CREATOR"=?, "UPDATER_ID"=? where "_ARTICULO_ID"= ? and "REP_TRANSID" = TRANSACTION and "UPDATER_ID" = -2 thread : Thread[ConsumptionUpdateHandlerMasterThread-4,5,main]

-


5 threads -


[Thu Mar 06 18:36:24 CET 2008 CaptureTableHandler-1] 1 wait call; waiting for table

[Thu Mar 06 18:36:24 CET 2008 CaptureTableHandler-2] 1 wait call; waiting for table

[Thu Mar 06 18:36:24 CET 2008 CaptureTableHandler-3] 1 wait call; waiting for table

[Thu Mar 06 18:36:24 CET 2008 CaptureTransHandler-0] 0 wait calls; sleeping 10 sec; 0 messages sent

[Thu Mar 06 18:36:24 CET 2008 ConsumptionUpdateHandlerMasterThread-4] 1 wait call; waiting for 1204629808932000781.(TEST); processed msgs (mod 10GMsg) : 1

[Thu Mar 06 18:36:24 CET 2008 CaptureTransHandler-0] running

[Thu Mar 06 18:36:24 CET 2008 CaptureTransHandler-0] capture transID 000000024513

[Thu Mar 06 18:36:24 CET 2008 CaptureTransHandler-0] running

[Thu Mar 06 18:36:24 CET 2008 CaptureTransHandler-0] finish transID 000000024513

-


stopping all threads -


SQLException 250: [250]: Duplicate secondary key:UQ_MODELO_TALLA: 23000

[Thu Mar 06 18:36:24 CET 2008 ConsumptionUpdateHandlerMasterThread-4] stopped

[Thu Mar 06 18:36:24 CET 2008 CaptureTableHandler-3] stopped

[Thu Mar 06 18:36:24 CET 2008 CaptureTableHandler-2] stopped

[Thu Mar 06 18:36:24 CET 2008 CaptureTableHandler-1] stopped

[Thu Mar 06 18:36:24 CET 2008 CaptureTransHandler-0] stopped

[Thu Mar 06 18:36:34 CET 2008] Stopping with session queue size: 0

[Thu Mar 06 18:36:34 CET 2008]Listener thread stopped.

SQLException 250: [250]: Duplicate secondary key:UQ_MODELO_TALLA: 23000

i dont know from here how identify the conflicting record and write the verbose output ever it is a resource wasting, and the next time i launch the synchronization client it works without error so i should do it work ever in verbose mode to a log redirecting output to a log, no?

Former Member
0 Kudos

Hola,

I think it makes no sense you try to find a manuall solution for the SQL Error "Duplicate secondary key".

The Synchronization Manager handles conflict resolution only with primary keys. You have to transform your unique indexes somehow as primary keys.

"Real" conflicts are logged in the audit tables for information purpose.

The Synchronization Manager will keep the data consistent over all client databases, a manuall intervention should not be necessary.

Regards

Wolfgang

Former Member
0 Kudos

>

> Hola,

>

> I think it makes no sense you try to find a manuall solution for the SQL Error "Duplicate secondary key".

> The Synchronization Manager handles conflict resolution only with primary keys. You have to transform your unique indexes somehow as primary keys.

> "Real" conflicts are logged in the audit tables for information purpose.

> The Synchronization Manager will keep the data consistent over all client databases, a manuall intervention should not be necessary.

>

> Regards

> Wolfgang

Hola Wolfgang,

this is not an ever-solution, for example this table has a (two columns) unique index (model_id, size) and two single column unique index (our barcode and factory barcode) i cant do all my primary key because later any user can try to add other model-size the same barcode and this is not correct.

Former Member
0 Kudos

>

> Hi,

>

> > it is normal behaviour that export catalog has not recreated indexes? i have the grants and comments in the catalog but not the indexes

> I tested an EXPORT DB CATALOG and it exported the indexes.

>

> > can i activate synchronization if the client database has data? my databases will be connected by adsl and the database is more thant 1gb, it will be slow to send if i have to do with "send content to client" to start synchronization.

> Yes you can, as we discussed in a previous thread. If the data that has to be synchronized is already on the master and on the client database you use the menus: Initialize Master Versions, Synchronize Client Versions with Loader. This will generate all necessary version numbers on the master and transport it to the client database.

i have tried do this and after try "synchronize Client Versions with Loader" i get this error:

<LoaderException -25501 Error opening file 'my_file_version': OS error: 'Permission denied'.

---

Total number of records exported : 0

Total number of records exported with errors: 0>

at com.sap.dbtech.powertoys.LoaderException.create(LoaderException.java:73)

at com.sap.dbtech.powertoys.Loader.cmd(Loader.java:174)

at com.sap.sdb.tools.ui.syncman.SyncManUIPlugin.syncClientVersion(SyncManUIPlugin.java:911)

at com.sap.sdb.tools.ui.syncman.editor.SyncClientVersionWithLoaderJob.run(SyncClientVersionWithLoaderJob.java:43)

at org.eclipse.core.internal.jobs.Worker.run(Worker.java:58)

previously i have connected to msgserver and initialize master versiones, what can be happening?

do msgserver and syncservice any command option to output log to a file other than redirect stdout? i dont know where find command line options like you have put here in forum:

-conflict_tables -verbose_consumption -verbose_capture

where are all the options of this programs documented? Thanks.

Edited by: Soraya Pedrera Fernandez on Mar 11, 2008 12:39 PM

Former Member
0 Kudos

Hi,

The SyncMan Plugin executes a Loader command. You should see the command in the console window of Database Studio.

The Loader that creates the file seems not to have this permissions as it runs under the SDB user . Do you use Windows or Linux as OS?

As a solution you could give write permission to tha path that delivers 'dbmcli dbm_getpath IndepProgPath'.

I will improve this handling for Database Studio.

Regards

Wolfgang

Former Member
0 Kudos

Hi,

i am using linux

./dbmcli dbm_getpath IndepProgPath

OK

/opt/sdb/programs

l /opt/sdb/ |grep programs

dr-xr-xr-x 16 sdb sdba 4096 2007-05-28 10:31 programs

sdb is the owner but it dont have write perms.

i have tried with chmod 775 /opt/sdb/programs and failed, later i have tried with chmod 775 /opt/sdb/programs/* to make all subdirectories in programs writable to user and group and failed with the same error.

Former Member
0 Kudos

Hi,

what kind of error do you receive when you try to change the permission for the SDB user using the superuser?

Regards

Wolfgang

Former Member
0 Kudos

no, i have not explained well, failed the processs from database studio with the same error than before, in console window i get this:

Starting Export/Import ...

use user REPLER ***** serverdb OTEROS

DATAEXTRACT "_MOVIMIENTO_ID",ROW_CREATOR,ROW_VERSION,LAST_UPDATER,COL_GROUP_VERSION FROM SYNCHRONIZATIONSERVICE."_R_V_00000000000017B6" OUTFIELDS "_MOVIMIENTO_ID" 1 ROW_CREATOR 2 ROW_VERSION 3 LAST_UPDATER 4 COL_GROUP_VERSION 5 OUTSTREAM FILE 'my_file_version' RECORDS

Error synchronizing client versions with loader.

and in event log viewer <LoaderException -25501 Error opening file 'my_file_version': OS error: 'Permission denied'.

it seems this is not the directory where it writes, could it be other directory?

Former Member
0 Kudos

Hi,

your version of the SyncMan Plugin uses a MaxDB JDBC extension (Powertoys) to call the Loader.

The powertoys start the Loader through the x_server which runs under the SDB account.

As the SDB user is a limited user the Loader has the problems creating the necessary file.

Normally the loader uses the user home directories to write its data. Maybe you could open them for the SDB user as a workaround.

Please revoke the permissions from the first try on the /opt/sdb/programs directories.

Regards

Wolfgang

Former Member
0 Kudos

the sdb user has the home set to /home/sdb in the two machines, and the two has the correct perms to sdb can write on it, sdb is the owner of the directory and subdirectories. But i am using the database studio from a third machine with windows xp, where it is trying to create this file, in master, in client or in machine running database studio? and if it is in the windows xp where should be writing the file?

Former Member
0 Kudos

Hi,

I thought you run Database Studio on Linux.

If you run Database Studio under Windows XP the Loader is started under Windows XP.

I installed Database Studio and reproduced the situation. The Loader file was stored under the installation directory (dbmcli inst_enum). In my case "C:\Program Files\sdb\MAXDB1".

Does your Windows XP user has administration rights?

Can you search for the loader*.log files? They might contain useful hints.

Regards

Wolfgang

Answers (1)

Answers (1)

Former Member
0 Kudos

while i am trying to do work the option of "synchronize client versions with loader" i am trying too (with other tables) to do a "send content to client", it works but it is really slow, i am sending a table with 400000 records, the client database it is receiving at a speed of 15 records/s and my core 2 duo 2.4 of the master machine it is at 100% cpu usage in one of his cores by the maxdb process kernel. it is this normal? I am doing the test on lan.

Edited by: Soraya Pedrera Fernandez on Mar 12, 2008 2:12 PM

Former Member
0 Kudos

Hi,

the speed of the message delivery depends on the size of the data rows you transport.

The use case of Synchronization Manager is that you transport initially the database content with the Loader or by a system copy. After this you use the Synchronization Manager to distribute changes between the different databases. So the ratio between the static data of the database and the changed data should be small.

http://maxdb.sap.com/doc/7_6/72/7ed43fb9490c65e10000000a114b1d/content.htm

In general ther Synchronization Manager was not designed to make a system copy.

Regards

Wolfgang

Former Member
0 Kudos

>

> Hi,

>

> the speed of the message delivery depends on the size of the data rows you transport.

>

> The use case of Synchronization Manager is that you transport initially the database content with the Loader or by a system copy. After this you use the Synchronization Manager to distribute changes between the different databases. So the ratio between the static data of the database and the changed data should be small.

>

> http://maxdb.sap.com/doc/7_6/72/7ed43fb9490c65e10000000a114b1d/content.htm

>

> In general ther Synchronization Manager was not designed to make a system copy.

>

I thought "send content to client" was designed to do that, send initial complete data to the client, anyway i prefer to do work the option to "synchronize client versions with loader" after create the database restoring a backup o with loader.

Hi,

I thought you run Database Studio on Linux.

If you run Database Studio under Windows XP the Loader is started under Windows XP.

I installed Database Studio and reproduced the situation. The Loader file was stored under the installation directory (dbmcli inst_enum). In my case "C:\Program Files\sdb\MAXDB1".

Does your Windows XP user has administration rights?

Can you search for the loader*.log files? They might contain useful hints.

I think i have found the problem with that, in this machine i have not maxdb installed, i have only installed database studio, "dbmcli inst_enum" show only an OK message and in "c:\program files\sdb" i only have the folder programs, not MAXDB1.

Former Member
0 Kudos

Hi,

in one of next versions Database Studio will start the Loader without the x_server and with a full qualified path to the user home directory so we don't have to search again.

muchas gracias por tu ayuda y paciencia.

Wolfgang

Former Member
0 Kudos

thank you for your great support, do you know any possible workaround? i should be using synchronization this week or my bosses could make me burn in hell hehehe.

Former Member
0 Kudos

Hi,

did you resolve the problem with the loader file installing a MaxDB software on the Database Studio computer?

If yes you could do the following steps.

1) Make a copy from the master database to a client database

2) Design you replication untis

3) Start the message server

4) Activate all the replication untis

5) Database Studio -> Initialize Master Versions

6) Database Studio -> Synchronize Client Versions with Loader

7) Start SyncServices

Regards

Wolfgang

Former Member
0 Kudos

the problem i have it is i dont have maxdb version 7.7 but database studio it is for maxdb version 7.7, can i install in the same machine maxdb 7.6 without problems?

Former Member
0 Kudos

It should work. The MaxDB installation manager should handle this.

Regards

Wolfgang

Former Member
0 Kudos

i have installed 7.6.03.15 version, now:

C:Documents and SettingsAdministrador>dbmcli inst_enum

OK

7.6.03.15 C:Archivos de programasdbmaxdb1

i can write in this directory but maxdb studio gives me the same error message.

<LoaderException -25501 Error opening file 'my_file_version': OS error: 'Permission denied'.

¿

Former Member
0 Kudos

Hi,

in fact I run out of ideas what happens on your computer.

I installed the same configuration as you did. MaxDB 7.6 and Database Studio 7.7. I cannot reproduce this error.

Does your Windows XP user has administration rights and write privileges for all directories?

Regards

Wolfgang

Former Member
0 Kudos

yes i am using the administrator account, i have tested to write inside the directory C:\Archivos de programa\sdb\maxdb1 and i can. I have tried to debug the process with process monitor from sysinternals but i dont see the process trying to write the file 'my_file_version', any other way to debug where it is trying to write?

Former Member
0 Kudos

funny I thought about the same idea a few minutes ago to use filemon from Microsoft to see where the Loader tries to write the file.

As a program filter you could set lserver or loadercli. There should be an entry in the filemon window.

Another idea is that there is still a lserver oder loadercli running that has the file my_file_version open. Could you check this in the taskmanager.

Could you search your hard disc for my_file_version?

Regards

Wolfgang

Former Member
0 Kudos

I have not any file 'my_file_version' in my hard disk and i have not any lserver or loaderprocess in taskmanager, i have loaded with filemon and only filtering out windows standard process and i dont see database studio launch a loader or lserver process, the only process database studio use in my xp it is javaw.exe it read in this order:

sdbuisyn.jar

sdbui.jar

syncmanlib.jar

sapdbc.jar

sdbcore.jar

rt.jar

and after this it writes to dbstudio.log the error and load manu jar with names like sdbtrace, sdbuievtlog, etc.. i suposse to trace and log the error, but it doesnt launch an external process of lserver or loadercli, and i have lserver.exe in:

c:\archivos de programa\sdb\programs\pgm\lserver.exe 2936kb

and in:

c:\archivos de programa\sdb\maxdb1\pgm 2936kb

and in:

c:\archivos de programa\sdb\programs\databasestudio\pgm 3672kb

Former Member
0 Kudos

but this is very strange

We see the exception:

LoaderException -25501 Error opening file 'my_file_version': OS error: 'Permission denied'.

There must be a lserver or loadercli process started that produces this error. As it is started with the x_server it could run under the system account. Maybe you filtered them out with the standard process.

Regards

Wolfgang

Former Member
0 Kudos

i have reset the filters to do a clean capture, still i dont see lserver.exe, of maxdb i only see any lines of dbmcli.exe, javaw.exe, dbmsrv.exe, dbmevtdisp.exe, all the work it is done with javaw.exe in many .jar files. I could send you by mail the exported log of filemon if you want to check it. I have checked too the number of processes from process explorer of sysinternals too and it doesnt change when i try to synchronizate client versions with loader.

Edited by: Soraya Pedrera Fernandez on Mar 12, 2008 11:33 PM

Former Member
0 Kudos

Hello,

today I have very limited access to my e-mail.

I will ask a colleague to check if the JDBC-Powertoys have the permissions problem so the Loader is not started.

If we don't find a solution I will build you tomorrow a binary patch for the SyncMan plugin that calls the Loader with a fix path.

Can you check if you can execute the export command that is shown in the Database Studio console window with the loaderCLI. If yes we can exclude that we have a Loader problem and it makes sense to build a plugin patch.

Regards

Wolfgang

Former Member
0 Kudos

Can you check if you can execute the export command that is shown in the Database Studio console window with the loaderCLI. If yes we can exclude that we have a Loader problem and it makes sense to build a plugin patch.

i have this commands in console:

use user REPLER ***** serverdb OTEROS

DATAEXTRACT "_MOVIMIENTO_ID",ROW_CREATOR,ROW_VERSION,LAST_UPDATER,COL_GROUP_VERSION FROM SYNCHRONIZATIONSERVICE."_R_V_00000000000017B6" OUTFIELDS "_MOVIMIENTO_ID" 1 ROW_CREATOR 2 ROW_VERSION 3 LAST_UPDATER 4 COL_GROUP_VERSION 5 OUTSTREAM FILE 'my_file_version' RECORDS

in the same machine i execute loadercli, first i have tried with only "loadercli" but in the command use user i dont find a server ip so later i used "loadercli -n 192.168.1.4" (master ip) but then loader gives me this output after try the "use USER REPLER **** serverdb OTEROS"

ERR -25004

A connection to the database could not be established: 5 = database not running.

it is normal that the command console output me dont work here?

later i try with "loadercli -n 192.168.1.4 -d OTEROS" and i get this output:

User connected to database OTEROS on 192.168.1.4.

loadercli>use user REPLER ********

OK

---

loadercli>DATAEXTRACT "_MOVIMIENTO_ID",ROW_CREATOR,ROW_VERSION,LAST_UPDATER,COL_

GROUP_VERSION FROM SYNCHRONIZATIONSERVICE."_R_V_00000000000017B6" OUTFIELDS "_M

OVIMIENTO_ID" 1 ROW_CREATOR 2 ROW_VERSION 3 LAST_UPDATER 4 COL_GROUP_VERSION 5 O

UTSTREAM FILE 'my_file_version' RECORDS

OK

---

Total number of records exported : 0

Total number of records exported with errors: 0

this creates a file in the directory from where i have executed loader but like you can view it is empty, well it have the headers of the export. Should i try to running this command in the client?

steffen_schildberg
Active Participant
0 Kudos

Hi Soraya,

Wolfgang asked me to take over today as he is not in the office. I might have found the problem:

If I get it right it is not possible to export from the source database a special version entry? And if I do not fail you do the replication from a third computer having source and target systems on other, different computers? Please check the source computer (Linux, right?) for a file loader.log. If found I'm very interested in its content.

And here is the problem: The sync manager starts the Loader on the source and target computer (which it actually should not; we have to change that, but anyway) but not on the computer the Database Studio runs on. This way you can't find any lserver running on your XP machine. It runs on your Linux source machine. Could you change the permissions on your dependent path on your source machine (run on source machine dbmcli inst_enum) in a way that the sdb user has write permissions. And then try to sync the version again. If this then fails during dataload we have found the problem and the same procedure must applied to the target machine, too. This is not a general solution but might help in your situation. We have to find a general solution here.

I'm really sorry about all the inconveniences and wait excitedly for your answer.

Best regards,

Steffen

Former Member
0 Kudos

>

> Hi Soraya,

> Wolfgang asked me to take over today as he is not in the office. I might have found the problem:

> If I get it right it is not possible to export from the source database a special version entry? And if I do not fail you do the replication from a third computer having source and target systems on other, different computers? Please check the source computer (Linux, right?) for a file loader.log. If found I'm very interested in its content.

yes you have found the problem, the loader it is running in the source machine, here you have the contents of loader.log file under

/home/sdb/sdb/skuda/loader/log :

// M Loader 7.6.03 Build 015-121-173-107

// *

// M Loader instance started at skuda for database OTEROS

// *

// M Starting protocol at 2008031300093111

// *

// M START 20080313 00093111

// *

use user REPLER * serverdb OTEROS

// *

// M USER: 'REPLER' on DB: 'OTEROS' ISOLATION LEVEL: 3

// *

// M START 20080313 00093111

// *

SET FORMAT ISO

// *

// M START 20080313 00093111

// *

DATAEXTRACT "_MOVIMIENTO_ID",ROW_CREATOR,ROW_VERSION,LAST_UPDATER,COL_GROUP_VERSION FROM SYNCHRONIZATIONSERVICE."_R_V_00000000000017B6" OUTFIELDS "_MOVIMIENTO_ID" 1 ROW_CREATOR 2 ROW_VERSION 3 LAST_UPDATER 4 COL_GROUP_VERSION 5 OUTSTREAM FILE 'my_file_version' RECORDS

// *

// E -25501: Error opening file 'my_file_version': OS error: 'Permission denied'.

// M Releasing user connection (USER: 'REPLER').

// *

> And here is the problem: The sync manager starts the Loader on the source and target computer (which it actually should not; we have to change that, but anyway) but not on the computer the Database Studio runs on. This way you can't find any lserver running on your XP machine. It runs on your Linux source machine. Could you change the permissions on your dependent path on your source machine (run on source machine dbmcli inst_enum) in a way that the sdb user has write permissions. And then try to sync the version again. If this then fails during dataload we have found the problem and the same procedure must applied to the target machine, too. This is not a general solution but might help in your situation. We have to find a general solution here.

> I'm really sorry about all the inconveniences and wait excitedly for your answer.

well i have put the correct perms in /opt/sdb/OTEROS in source machine and now i past the initial DATAEXTRACT but althought i have done the same in destination machine it fails in import, in destination machine i get more installations with:

dbmcli inst_enum

OK

7.6.02.10 /opt/sdb/DBCLIENT

7.6.02.10 /opt/sdb/MAXDB1

7.6.02.10 /opt/sdb/DBMASTER

7.6.03.15 /opt/sdb/OTEROS

anyway i have put the correct perms on all the folders to be sure, but i get this error in loader.log in destination machine:

// M Loader 7.6.03 Build 015-121-173-107

// *

// M Loader instance started at vmware for database OTEROS

// *

// M Starting protocol at 2008031300122455

// *

// M START 20080313 00122455

// *

use user REPLER * serverdb OTEROS

// *

// M USER: 'REPLER' on DB: 'OTEROS' ISOLATION LEVEL: 3

// *

// M START 20080313 00122455

// *

IMPORT TABLE SYNCHRONIZATIONSERVICE."_R_V_0000000000000867" DATA INSTREAM FILE 'my_file_version' RECORDS "_MOVIMIENTO_ID" 1 ROW_CREATOR 2 ROW_VERSION 3 LAST_UPDATER 4 COL_GROUP_VERSION 5

// *

// M Import PACKAGE x'01000000070FD947092200004D68AB2C00017F0000000000'

// *

// E -25501: Error opening file 'my_file_version': OS error: 'No such file or directory'.

// M Releasing user connection (USER: 'REPLER').

// *

Thanks.

steffen_schildberg
Active Participant
0 Kudos

Hi Soraya,

this problem can't be solved otherwise than with a patched Sync manager. Why? Well, now the Sync manager has exported the file on your source machine where the exported file resides afterwards. But the Loader on your target machine can hardly reach this file as this one is not on the target machine at all. But the Loader on the target machine tries to load the file from the target machine where it naturally cannot be found in your situation.

There must be something changed in sync manager to serve situations like yours properly.

Even I know it is kind of silly you can get it running today by doing the following: copy the file 'my_file_version' into the dependent directory of the target database on your target machine. Then start the version synchronization again. The Sync manager now should export the file which has no impact on the target machine. On the other hand the Loader on your target machine will find the file you copied manually and will import it. The versions are synced. If you need to do this only once initially it might be applicable. Otherwise I can only ask you to wait for a patched Sync manager tomorrow.

Best regards,

Steffen

Former Member
0 Kudos

Yes it works if i copy manually the file from source machine to destination machine, this way i can continue testing, anyway tomorrow i will test your patch to post here the results, thanks.

Former Member
0 Kudos

Hi,

the problem is addressed with http://www.sapdb.org/webpts?wptsdetail=yes&ErrorType=0&ErrorID=1153906 . I will send you a workaround patch via e-mail.

Regards

Wolfgang

Former Member
0 Kudos

Hi,

did you receive the patch?

Regards

Wolfgang

Former Member
0 Kudos

Yes i have tested it and works ok, thanks Wolfgang.