Please be aware that the content in SAP SQL Anywhere Forum will be migrated to the SAP Community in June and this forum will be retired.

Here's what I did:

  1. Created a BLANK remote database on machine R
  2. Pretty much followed the docs for setting up a consolidated Mobilink database on machine C. The databae is called master
  3. While deploying the synchronization model, I configured the wizard to connect to the remote database on R

After the deployment, when I check the DB on R, I can see that the schema has pushed down to it, but three peculiarities:

  1. The owner of the tables is a user called master
  2. select * from tableName results in an error, but select * from master.tableName works.
  3. Mobilink synchronization fails because it can't find tableName, I think because of the previous point.

Information related to this problem

asked 04 Sep '20, 10:11

saurabhnanda's gravatar image

saurabhnanda
46121219
accept rate: 0%

edited 07 Sep '20, 01:45

Can you describe which documentation you followed? There are a number of tutorials. Knowing the starting point, I can explain how this was the result.

Here are ways that it can happen. Your remote database has an user or group named 'master'. The table was created either

  1. connected as user 'master' and the table owner was implicitly associated
  2. the table name is explicitly specified in the DDL.

-- implicitly -- connected as user 'master'

create table t(...)

-- table is master.t

or

--explicitly -- connected as any user

create table master.t(...)

-- table is master.t

(04 Sep '20, 11:05) Chris Keating

I'm going through the set of documents at http://dcx.sap.com/index.html#sqla170/en/html/81b786176ce2101484e0ba81e24eedcd.html (titled "MobiLink plug-in for SQL Central"), and also intermittently referring to http://dcx.sap.com/index.html#sqla170/en/html/81bc99f96ce210148d2ff57dcb4bb789.html (titled "Tutorial: Using MobiLink with a SQL Anywhere consolidated database")

Here are ways that it can happen. Your remote database has an user or group named 'master'.

Tihs is not possible, because I create a BLANK database every time I try to do this. Is a user created even in a blank database, by any chance?

Is it possible that the sync process is the one creating the master user in the remotedb and then using it to create the schema?

(07 Sep '20, 00:58) saurabhnanda

I can confirm that the owner of the table is the user master. Which leads me to a related question, is a "default" bearing the same name as the DB always created? If I create a db called remotedb, does that implicitly create a user called remotedb and only tables created by this users can be accessed without prefixing them?

(07 Sep '20, 01:26) saurabhnanda

I have edited the question with some extra information, and a screenshot.

(07 Sep '20, 01:30) saurabhnanda

I changed the remote DB also to be called master with DBA u/p = master/master. So, now, both the databases, i.e. consolidated and remote, have the same name along with the same DBA u/p. Even with this configuration the sync is failing with the same error. This leads me to conclude that the error is not related to users/namespaces but something completely different. I am starting a separate question for that, but I'd still like to know why tables are being created in the remotedb with user = master, when clearly the connection is being established using u/p = remotedb/remotedb

(07 Sep '20, 02:09) saurabhnanda

I never use the MobiLink Project gear to design and implement a MobiLink solution. The two ways that I described are the way that the table owner is specified. It appears that in the ML Project gear that the table ownership is picked up from the consolidated database and then explicitly provided in the table DDL. Here is the remote setup schema generated by the ML Project gear - it creates the a group master (i.e., as it has no password) and then the table with the explicit table owner:

IF NOT EXISTS ( SELECT 1 FROM SYS.SYSUSER WHERE user_name = 'master' ) THEN GRANT CONNECT TO "master"; END IF GO

/------------------------------------------------------------------------------ * Create table 'master.t'. -----------------------------------------------------------------------------*/ DROP TABLE IF EXISTS "master"."t" GO CREATE TABLE "master"."t" ( "id" integer not null, "c" char(50) null, PRIMARY KEY ("id") ) GO

If your remote database is created with an user other than master, you will be required to fully qualify the table owner to reference the table or modify the role definitions so that 'master' is an extended user and dba has been granted 'master'.

(07 Sep '20, 22:01) Chris Keating

Chris, when you say "Mobilink Project gear", do you mean the UI wizard/plugin that is part of SQL Central that the tutorials make you go through?

(08 Sep '20, 02:30) saurabhnanda
More comments hidden
showing 5 of 7 show all flat view
Be the first one to answer this question!
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×371

question asked: 04 Sep '20, 10:11

question was seen: 649 times

last updated: 08 Sep '20, 02:30