Quantcast
Channel: Unanswered Questions
Viewing all 1435 articles
Browse latest View live

Mobilink > Recommended way to broadcast + sync schema changes?

$
0
0

Is there a document that describes the recommended way of dealing with schema changes in a Mobilink setup? I found http://dcx.sap.com/sqla170/en/html/81a9817d6ce2101492e8b8285e7791d9.html but even after reading it, I don't know the answers to the following:

  • Should the schema change be done, first, on the (a) LIVE consolidated DB, (b) all LIVE remote DBs, (c) a replica of the consolidated DB, (d) replica of a remote DB, or (e) some combination thereof?
  • If the answer to the previous question is (b) or (d), then is there a tool within the mobilink suite that allows one to remotely manage multiple remote DBs easily? If the answer is (a) or (c), then how does on broadcast these changes (related the schema, as well as the synchronization model) to all remote DBs?
  • When the schema is changed, and Synchronization Model > Update schema is used, will it update various scripts (upload, download, etc) to deal with the following automatically: (a) newly added columns, (b) newly added tables, (c) altered columns, (d) altered tables?

Related to: https://sqlanywhere-forum.sap.com/questions/35910/mobilink-changing-a-synchronisation-model-after-it-has-been-deployed


Rename a user

$
0
0

Using SQL Anywhere 17, is there really still no way to easily rename a user? Deleting and re-creating the user seems a bit clunky.

Mobilink > Timestamps related to the sync process

$
0
0

I've read Implementing timestamp-based downloads and its subsections multiple times and it has only confused me further:

Why is there a last_modified timestamp in each table in the consolidated DB, but NOT in the remote DBs? As per The synchronization process

By default, the MobiLink client automatically keeps track of which rows in the remote database have been inserted, updated, or deleted since the last successful synchronization. Once the connection is established, the MobiLink client uploads a list of all these changes to the MobiLink server.

If one can keep track of which rows have been synced, and which haven't, WITHOUT the last_modified column, why is it required in each table in the consolidated DB?

Now, as-per How download timestamps are generated and used...

The last download time is stored on the remote database. This is the appropriate place because only the remote database knows if the download has been successfully applied. For SQL Anywhere remotes, the last download time is stored per subscription and can be viewed using the SYSSYNC system view.

... whereas as per Implementing timestamp-based downloads...

To implement timestamp-based synchronization for a table, at the consolidated database, add a last_modified column that holds the most recent time the row was modified.

How many timestamps are we talking about here? Where is each one of them stored? And why does every table in the remote-db not have a last_modified column?

Mobilink > Getting started WITHOUT graphical wizard?

Cannot change license type from seats to core with DBLIC

$
0
0

Hi,

For the first time ever we're installing the Core edition license for SQL Anywhere 17 (4 cores), but at the start setup I only had an option to enter the number of licensed seats, without specifying that it's a Core license. So I entered 100 seats just to install the package.

But now I'm trying to change it using dblic utility:

dblic -l core dbsrv17.lic "Administrator" "Company"

but the utility does not run, I just get the usage text:

*SQL Anywhere Server Licensing Utility Version 17.0.10.6175
Usage: dblic [options] license_file ["user name" "company name"]
        @<data> expands <data> from environment variable <data> or file <data>   
Options (use specified case, as shown):
        -l <type>      license type: perseat or core
        -k <key>       registration key
        -o <file>      append output messages to file
        -q             quiet: do not display messages
        -u <n>         number of users or processors for license*

Curiously, all of these work just fine:

dblic -l perseat -u 10 dbsrv17.lic "Administrator" "Company"

dblic -l perseat -u 200 dbsrv17.lic "Administrator" "Company"

dblic -l perseat -u 500 dbsrv17.lic "Administrator" "Company"

if I want to change the number of licensed seats, but switch "-l core" as indicated in SQL Anywhere 17 documentation does not work, I just get text with how to use dblic command?

Never done this before, so am I missing something about the DBLIC utility?

Thanks

Installing any SA17 EBF after PL42 5750 causes an sqlcentral1700.jar error.

$
0
0

I'm somewhat new to using SQL Anywhere. We have a project requirement for it so I've installed the base installation files from SAP. Without any updates added, the SA17 version reports 17.0.0.1062. This is on Windows Server 2012 R2 btw. I also have JRE8u261 installed. In this configuration SQL Central (scjview.exe) opens just fine.

However, once I start applying any of the recent EBF patch files I can no longer open SQL Central. The patch files install fine on the surface, but if I try to open SQL Central now I get the following error:

"This file could not be found: sqlcentral1700.jar"

It seems like I have tried every file starting with PL61 Build 6175 (released on 13.08.2020). I worked my way all the way back to PL42 Build 5750 (released on 16.04.2019) before I no longer got the error. I would have to uninstall SA and reinstall it each time.

So right now I'm on 17.0.10.5750 and I can't upgrade without it breaking SQL Central. I'm downloading the EBF zip files from the SAP Launchpad site (e.g., SQLANYW170000P_61-71001031.ZIP).

Am I doing something wrong when I try to upgrade? Is there a specific log file I can view that can give me a better idea of how to proceed? Any help would be greatly appreciated. Thank you.

Mobilink > Where are ml_* procedures/functions documented?

$
0
0

I've generated a sample Mobilink project via the graphical wizard and obtained the cons_setup.sql and remote_setup.sql scripts. I can see that they're using a bunch of ml_* procedures/functions:

  • where are these documented on help.sap.com? I managed to find the MobiLink server system procedures section, and can see a whole bunch of ml_* procedures documented there, but none of the ones that are used in the two SQL scripts above!
  • Starting from scratch and without the GUI, how does one install all the ml_* related tables and procs in a consolidated DB? Where is all of this documented?

Related to https://sqlanywhere-forum.sap.com/questions/35971/mobilink-getting-started-without-graphical-wizard

Future of SQL Anywhere - Next Version

$
0
0

Hey Everyone,

Hope everyone is well and staying healthy.

Just wanted to check in on things again. Obviously it looks like the Waterloo division is staying up to date on pushing out updates for the SQL Anywhere 17 product line. Up to service pack 59 is not a bad continuation of SQL Anywhere 17.

I have seen where ASE has been pushed out now to where it looks like it would be 2030 before we would not have a product road map.

Long story short, we have some new products we have in the queue development wise. Would like to use (or continue to use) SQL Anywhere within these environments. Has SAP put SQL Anywhere on the roadmap for new versions?

Any info would be greatly appreciated!

Thanks Everyone!

Jeff Gibson
Intercept Solutions
Nashville, TN


MobiLink server 17 in a Windows container

$
0
0

Is there any information on the viability of running MobiLink server 17 in a Windows container? I have tried windows:1809 and windowsservercore-1909 images and keep running into issues. It's really difficult to troubleshoot, because it appears that the process wants to open a popup window with an error, but doesn't seem to be getting that far (at least not visible to a compiled AutoIt script). The mlsrv.mle and designated output log are both present, and both zero length. An experiment in the host environment seems to indicate that those logs may not get written to until any error popup is closed (or at least created).

Has anyone successfully containerized MobiLink server for Windows? Is there a way to force MobiLink Server to write to logs and completely suppress all popups?

dbunload for SA16 runs VERY slow

$
0
0

I have run dbunload.exe for external unloads (both -xx and -xi) on a test 20 GB SQL Anywhere 16 database. The "-xx" unload completed in 29 hours 32 minutes. I aborted the "-xi" unload after 21 hours 30 minutes. The only thing remarkable about this database is a single table with blob data that exported into a 32.5 GB ".dat" file. However, unloads of large, conventional data tables seem to run at a slow proportional speed.

I am running the unload on a powerful, dedicated Windows 10 PC with 32 GB of RAM and a SSD with lots of free space.

Why should the unload run so slowly? Is there anything I can do to speed this up?

This long elapsed time presents a problem as I want to rebuild a customer database, splitting the blob data into a separate dataspace. To do this - I need to do an external unload, modify the reload.sql, and then run the modified reload.sql. The customer database will be even larger than my 20 GB test database, and a 48 hour (or more) production downtime will probably be unacceptable.

Interestingly, the "-xi" unload ran about twice as fast as the "-xx" unload up to the point of the large blob table, and then bogged right down to similar performance.

I'm using SA 16.0.0.1324, however I have searched "SQL Anywhere Bug Fix Readme for Version 16.0.0, build 2798" and see no evidence of this being a problem that fixed by a maintenance release or EBF.

Thanks your your help and consideration!

SQL Anywhere 17: sp_parse_json how to handle properties that are not passed when empty

$
0
0

If you have agreed on a json format like for example:

{ "firstName": "Frank","middleName": null,"lastName": "Vestjens"}

Then the json is also valid if the middleName is not mentioned

{ "firstName": "Frank","lastName": "Vestjens"}

But then the sp_parse_json does not know the middleName. Because if I use test.middleName I'll get the error

"Column 'middleName' not found in variable 'test'"

Is there a way to test whether this middleName exists after parsing the json?

difference between call and select

$
0
0

I have problem with the following code:

create procedure MyDummy()

begin

select 'mydummy' from dummy;

end;

create procedure MyDummyWrapper()

begin

select * from MyDummy();

end;


call MyDummy(); -->mydummy (As Expected)

call MyDummyWrapper();-->mydummy (As Expected)


alter procedure MyDummy()

begin

select 'mydummy' from dummy where 1 = 0;

end;


call MyDummy()-->empty (As Expected)

call MyDummyWrapper()-->mydummy (NOT As Expected!!!)

select * from MyDummyWrapper()-->empty (As Expected)

I have here 2 Questions:

  1. what is the difference between select and call? Why I have the problem only with call?
  2. how can I overcome the problem with call? is there any alternative for sp_recompile (as with Adaptive Server)?

Authenticating OEM edition DB / applications

$
0
0

Hi all,

Several months ago we purchased an OEM edition SQL Anywhere 17 Advanced edition for the rollout to client network (they are running our solution SQL Anywhere / Powerbuilder), and I guess it was the first time we've ever purchased OEM edition, as we've just encountered "Authentication violation" when we try to change anything in the DB, via the application or the Sybase Central / Interactive SQL.

So I've been reading up on it a bit. I've found the SAP link where I can submit our company name and application name to receive authentication signature, but I am so new to this that I would warmly appreciate all information:

  1. After I receive the authentication sig, I just need to run the

    SET OPTION PUBLIC.database_authentication='company=company-name; application=application-name; signature=database-signature';

    and restart the database, and after this the database end is authenticated, Sybase Central and Interactive SQL are fully read/writable, they are no longer read-only, correct?

  2. Our application is a Powerbuilder application accessing the database via ODBC data source. How exactly do we authenticate the application via the Powerbuilder source code? What if we have another application (dot Net) accessing the database via the same ODBC profile? Is it possible at all to skip on the application authenticating?

I'm sorry if it's a newbie question, but in almost 20 years working with SQL Anywhere, this is the first time we're using the OEM edition and have to work with anything like database authentication

unload statement error introduced post 16.0.0.1324

$
0
0

A SQL Anywhere code construct that worked up to and including 16.0.0.1324 produces an error in 16.0.0.2798 and 17.0.10.5963. This seems related to the topic "¿Bug in Unload Select?", however I thought I'd publish a clean post - especially since I have the problem pretty well isolated. I also found a work-around to prevent the problem - namely, restructuring the joins.

Please see my "//" comments embedded with the code below:

create view view_test as 
  select 
    wo.wk_ord_id,
    wo.wk_ord_no,
    p.prt_id,
    p.prt_cd 
  from
    work_order as wo join work_order_part_part as wopp on
      (wo.wk_ord_id = wopp.wk_ord_id),
    work_order_part_part as wopp join part as p 
go

-- Following works for all tested SQL Anywhere versions:
select * from view_test;

-- Following:
-- 1) Works for SQL Anywhere 16.0.0.1324
-- 2) Issues error for SQL Anywhere 16.0.0.2798, 17.0.10.5963: "Column 'prt_id' not found"
begin
  declare s_result_set      long varchar;
  --
  unload
    select * from view_test
  into variable
    s_result_set
  delimited by '\x09' quotes off;
end
go

-- Create a view representing the same query but restructured joins:
create view view_test_2 as 
  select 
    wo.wk_ord_id,
    wo.wk_ord_no,
    p.prt_id,
    p.prt_cd 
  from
    work_order as wo 
    join work_order_part_part as wopp on (wo.wk_ord_id = wopp.wk_ord_id)
    join part as p on (wopp.prt_id = p.prt_id)
go

-- Following works for all tested SQL Anywhere versions:
select * from view_test_2;

-- *** FOLLOWING WORKS *** for all tested SQL Anywhere versions:
begin
  declare s_result_set      long varchar;
  --
  unload
    select * from view_test_2
  into variable
    s_result_set
  delimited by '\x09' quotes off;
end
go

Certainly I can restructure my joins to keep the later versions of SQL Anywhere happy, but it would be nice not to.

How to parse JSON numbers as bigint?

$
0
0

As a follow-up to this FAQ, it seems that the sp_parse_json system procedure only supports numbers as double or integer:

begin
   declare MyJson long varchar;
   select '{"MyDouble": -12345678901234.567890,
            "MyEValue": -1e6,
            "MyInt": -2147483648,
            "MyBigInt1": 2147483648,
            "MyBigInt2": -1234567890123456789,
            "MyBit": 1}' into MyJson;
   drop variable if exists sql_row;
   call sp_parse_json ('sql_row', MyJson);

   select '1 MyDouble' as "Variable", exprtype('select sql_row.MyDouble', 1) as Data_Type, sql_row.MyDouble as Value 
   union all
   select '2 MyEValue', exprtype('select sql_row.MyEValue', 1), sql_row.MyEValue
   union all
   select '3 MyInt', exprtype('select sql_row.MyInt', 1), sql_row.MyInt
   union all
   select '4 MyBigInt1', exprtype('select sql_row.MyBigInt1', 1), sql_row.MyBigInt1
   union all
   select '5 MyBigInt2', exprtype('select sql_row.MyBigInt2', 1), sql_row.MyBigInt2
   union all
   select '6 MyBit', exprtype('select sql_row.MyBit', 1), sql_row.MyBit
   order by 1;
end;

returns

1 MyDouble;double;-12345678901234,568
2 MyEValue;double;-1000000
3 MyInt;integer;-2147483648
4 MyBigInt1;integer;2147483647 <-- wrong
5 MyBigInt2;integer;-2147483648 <-- wrong
6 MyBit;integer;1

This was tested with 17.0.10.6175.

Resume: MyBigInt1 and MyBigInt2 are wrongly limited to the maximum positive resp. negative integer values, so it seems that JSON numbers in the format without fraction and exponent are wrongly casted to integer instead of bigint or other "huger" types.


dbunload -e

$
0
0

Using 16.0.0.2798

This is more of a warning to others rather than a question, but please feel free to comment.

It seems as if the dbunload utility when executed with the -e option to exclude a table, doesn't produce a complete rebuild script skipping users, functions etc. I don't understand this behavior, the help says

Excludes the specified tables from the reload.sql file. Table names are always case insensitive, even in case sensitive databases. A reload.sql file created with the -e option should not be used to rebuild a database because the file will not include all the database tables. If a table has foreign keys referring to it, the database cannot be rebuilt without the contents of the table. It is recommended that you only use the -e option with the -d option to unload data for all tables except those identified by -e. <<

In my case the -d option was not included so I expected a complete reload script to be generated. I guess the only alternative is to delete the table prior to unload.

Connect to Running Database on another computer is failing

$
0
0

we are trying to connect a DAtabase running on another computer but it is failing.we are using sqlanywerhe 10 -we have tried with dbeng10 and dbsrv10 -while running up the database we have provided the option -x tcp/ip -we are able to ping the IP address successfully -but we didn't get the reply for db ping option. -odbc we are checking the TCP/ip option and provided the IP address and port

Finally we are getting database server not found issue.

VBA Access Sybase SQL Anywhere 17

$
0
0

Hello, I tried to access sybase via MSADO 2.8 and SQL Anywhere17 Driver, but was not successful. Obviously it sets up a connection (there is no error message) but it does not except the SELECT etc. It says: the syntax is wrong. Even if the syntax is the same as in MS Query / Excel. There it works via SQL Anywhere 17 ODBC and I can edit the values in the fields of Sybase DB. Does anybody have an advise? I would be very thankful. Johannes

connecting to SQL17 from python

$
0
0

Hi all,

I try to connect to a SQL17 DB using the following lines in Python

import sqlanydb

con = sqlanydb.connect(uid='dba', pwd='sql', servername='SRV1', host='localhost:2638' )

con.close()

I get following errors:

File "C:\Python38\lib\site-packages\sqlanydb.py", line 522, in connect

File "C:\Python38\lib\site-packages\sqlanydb.py", line 538, in init parent = Connection.cls_parent = Root("PYTHON")

self.api = load_library(os.getenv( 'SQLANY_API_DLL', None ), 'dbcapi.dll', 'libdbcapi_r.so',

raise InterfaceError("Could not load dbcapi. Tried: " + ','.join(map(str, names))) sqlanydb.InterfaceError: ('Could not load dbcapi. Tried: None,dbcapi.dll,libdbcapi_r.so,libdbcapi_r.dylib', 0)

Return weekday from a stored int value with sql

$
0
0
CREATE TABLE WeekDay (DeliveryWeekdays INTEGER NOT NULL);

INSERT INTO WeekDay(DeliveryWeekdays) values (7);

We have a program that stores an int value in a table with which weekdays you have selected in a check box.

{
    None = 0,
    Monday = 1,
    Tuesday = 2,
    Wednesday = 4,
    Thursday = 8,
    Friday = 16,
    Saturday = 32,
    Sunday = 64,
}

alt text

Ex: If you have checked Monday and Thursday the value is 9 in the field in the table. If you checked Monday, Tuesday, Wednesday the value is 7 in the field and so on..

The question is whether with a date I can check if the day of the week in that date is in the int value stored in the table.

If I check the date 2020-10-08, I see that it is a Thursday. I want to check if Thursday is in value 7. The answer is yes. If the int value is 3, the answer will be no.

Viewing all 1435 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>