Quantcast
Channel: SCN : Unanswered Discussions - SAP SQL Anywhere
Viewing all 542 articles
Browse latest View live

Limit rows send to consolidate db from remote db with mobilink

$
0
0

I need to limit the rows that send the remote database to the consolidate database with mobilink 16.

 

I have a case that only need to send the rows for a table that only exists in another table to the consolidate database.

 

Also after the syncronization need to delete those rows in the remote database.

 

My consolidate DB and Remote DB is ASA 16.  I use for the syncronization mobilink 16.

 

Anyone have an idea how to resolve this case?

 

Thanks for any  help.


SQL Anywhere 16: TLS handshake failed, error code 20

$
0
0

I'm testing TLS connections on SQL Anywhere 16.0.0.2158 and am getting a TLS handshake failed, error code 20 error message.  I've read the following documents with no help:

http://dcx.sap.com/index.html#sa160/en/dbadmin/tls-j22-s-5729723.html

and

http://dcx.sap.com/index.html#sa160/en/dbadmin/gencert-ml-ref1.html

and

http://dcx.sap.com/index.html#sa160/en/dbadmin/ml-tls-s-6232604.html

 

here is the client log

 

Fri Sep 25 2015 14:52:03

14:52:03 Attempting to connect using:

UID=ficsro;PWD=********;DBN=fics;ServerName=billytest;CON=SQL_DBC_4c382e5200;ENC='TLS(tls_type=rsa;fips=n;trusted_certificate=C:\ssl\public.pem)';LOG=c:\ssl\ssl.log;LINKS='tcpip(HOST=web1)';CPOOL=NO

14:52:03 Attempting to connect to a running server...

14:52:03 Attempting TCPIP connection (address 192.168.4.112:2638 found in sasrv.ini cache)

14:52:03 Looking for server with name billytest

14:52:03 Trying to find server at cached address 192.168.4.112:2638 without broadcasting

14:52:03 Found database server billytest on TCPIP link

14:52:03 Connected using client address 192.168.5.150:52913

14:52:03 Connected to server over TCPIP

14:52:03 Connected to SQL Anywhere Server version 16.0.0.2158

14:52:03 Application information:

14:52:03 IP=192.168.5.150;HOST=staging11;OSUSER=estatuswebsvc;OS='Windows 2012R2 Build 9200 ';EXE=C:\ColdFusion11\estatuswebsvc\bin\coldfusion.exe;PID=0xab4;THREAD=0xaec;VERSION=16.0.0.2158;API=iAnywhereJDBC;TIMEZONEADJUSTMENT=-300

14:52:03 Connected to the server, attempting to connect to a running database...

14:52:03 The TLS handshake failed, error code 20

14:52:03 Communication function SQLPresSyncPoint code 8

14:52:03   unknown error 0

14:52:03 Client disconnected

14:52:03 Disconnected from server

 

here are the server startup options which startup just fine:

 

-c 128M

-ec none,simple,TLS(identity=c:\db\identity.pem;identity_password=fics)

-n billytest

-x tcpip

c:\db\fics.db

 

here is the test certificate info:

 

C:\Program Files\SQL Anywhere 16\Bin64>createcert -t rsa

SQL Anywhere X.509 Certificate Generator Version 16.0.0.2158

 

Warning: The certificate will not be compatible with older versions

of the software including version 12.0.1 prior to build 3994 and version 16.0

prior to build 1691. Use the -3des switch if you require compatibility.

 

Enter RSA key length (512-16384): 2048

Generating key pair...

Country Code: US

State/Province: TX

Locality: ADDISON

Organization: FICS,INC

Organizational Unit: FICS

Common Name: web1

Enter file path of signer's certificate:

Certificate will be a self-signed root

Serial number [generate GUID]:

Generated serial number: f3dde00072d04f319b17cd429769b75e

Certificate valid for how many years (1-100): 99

Certificate Authority (Y/N) [N]:

1.  Digital Signature

2.  Nonrepudiation

3.  Key Encipherment

4.  Data Encipherment

5.  Key Agreement

6.  Certificate Signing

7.  CRL Signing

8.  Encipher Only

9.  Decipher Only

Key Usage [1,3,4,5]: 3,4,5

Enter file path to save certificate: c:\db\public.pem

Enter file path to save private key: c:\db\private.pem

Enter password to protect private key: fics

Enter file path to save identity: c:\db\identity.pem

Vendor Announcement: 17.0.0.1211 for Windows

Download Link for SQL Anywhere 17

$
0
0

Hello Team,

 

Can anyone provide download link for SQL Anywhere 17?

 

Thanks in advance...

mobilink 16 error ODBC: [Sybase][ODBC Driver]Syntax error or access violation (ODBC State = 42000, Native error code = 0)

$
0
0

I use the scripted sync in mobilink 16.0 .. my consolidate and remote databases is ASA 16.0 also

But when i try to sincronize with one table i have thos error

-10002] Consolidated database server or ODBC error:  ODBC: [Sybase][ODBC Driver]Syntax error or access violation (ODBC State = 42000, Native error code = 0)
[-10058] Unable to open upload_insert

Already review the table schema in the store procedures and scripts of mobilink and dont have any error.  If i run the store procedure run fine without errors.

Anyone have experience with this kind of error?

Also in the publications have anothers tables that dont have any error when sinc with dbmlsync.

this is he scripts in the:

Create Procedure tbl_LogTarjeta_inserted ()                

result (
Cod_tienda varchar (10),                                                                                                                                                                                                                                        
ID_Caja varchar (15),                                                                                                                                                                                                                                           
transaccion integer,                                                                                                                                                                                                                                        
Cod_Autorizador integer ,                                                                                                                                                                                                                                    
fechaTransaccion timestamp ,                                                                                                                                                                                                                                 
Tipo varchar (15),                                                                                                                                                                                                                                              
trackEnvio long varchar ,                                                                                                                                                                                                                                
fechaRespuesta timestamp ,                                                                                                                                                                                                                                   
trackRespuesta long varchar                                                                                                                                                                                                                           
)
begin
select
Cod_tienda,                                                                                                                      
ID_Caja,                                                                                                                         
transaccion,                                                                                                                     
Cod_Autorizador,                                                                                                                 
fechaTransaccion,                                                                                                                
Tipo,                                                                                                                            
trackEnvio,                                                                                                                      
fechaRespuesta,                                                                                                                  
trackRespuesta                                                                                                                 
from tbl_LogTarjeta a
where exists (select 1 from Tbl_TrxTrasladable b where a.ID_Caja = b.ID_Caja and a.Transaccion = b.Transaccion )
end

table tbl_LogTarjeta

(

Cod_tienda,                                                                                                                      
ID_Caja,                                                                                                                         
transaccion,                                                                                                                     
Cod_Autorizador,                                                                                                                 
fechaTransaccion,                                                                                                                
Tipo,                                                                                                                            
trackEnvio,                                                                                                                      
fechaRespuesta,                                                                                                                  
trackRespuesta                                                                                                                  

)

using (

procedure tbl_LogTarjeta_inserted for upload insert )

CALL ml_add_table_script ( 'default','tbl_LogTarjeta','upload_insert',
'INSERT INTO tbl_LogTarjeta (Cod_tienda,ID_Caja,transaccion,Cod_Autorizador,fechaTransaccion,Tipo,trackEnvio,fechaRespuesta,trackRespuesta)
Values ( { ml r.Cod_tienda}, { ml r.ID_Caja}, { ml r.transaccion}, { ml r.Cod_Autorizador}, { ml r.fechaTransaccion},{ ml r.Tipo},{ ml r.fechaRespuesta})' )

The message that is in the ml server is:
I. 2015-10-01 16:45:44. <13> PHASE: send_download: 0
I. 2015-10-01 16:45:44. <13> PHASE: wait_for_download_ack: 0
I. 2015-10-01 16:45:44. <13> PHASE: get_db_worker_for_download_ack: 0
I. 2015-10-01 16:45:44. <13> PHASE: connect_for_download_ack: 0
I. 2015-10-01 16:45:44. <13> PHASE: nonblocking_download_ack: 0
I. 2015-10-01 16:47:03. <14> Request from "Dbmlsync 16.0.2158" for: remote ID: bd6dee9f-9eff-474a-978a-6cbd5ec94ea0, user name: dba, version: default
I. 2015-10-01 16:47:03. <14> Synchronization connection with connection ID 'SPID 17' has been established
I. 2015-10-01 16:47:03. <14> ODBC isolation set to: Read Committed
I. 2015-10-01 16:47:03. <14> COMMIT Transaction: Begin connection
I. 2015-10-01 16:47:03. <14> The current synchronization is using a connection with connection ID 'SPID 17'
I. 2015-10-01 16:47:03. <14> COMMIT Transaction: Begin synchronization
E. 2015-10-01 16:47:03. <14> [-10002] Consolidated database server or ODBC error:  ODBC: [Sybase][ODBC Driver]Syntax error or access violation (ODBC State = 42000, Native error code = 0)
E. 2015-10-01 16:47:03. <14> [-10058] Unable to open upload_insert
I. 2015-10-01 16:47:03. <14> Error Context:
I. 2015-10-01 16:47:03. <14> Remote ID: bd6dee9f-9eff-474a-978a-6cbd5ec94ea0
I. 2015-10-01 16:47:03. <14> User Name: dba
I. 2015-10-01 16:47:03. <14> Modified User Name: dba
I. 2015-10-01 16:47:03. <14> Transaction: Upload
I. 2015-10-01 16:47:03. <14> Table Name: tbl_LogTarjeta
I. 2015-10-01 16:47:03. <14> Script Version: default
I. 2015-10-01 16:47:03. <14> Script: INSERT INTO tbl_LogTarjeta (Cod_tienda,ID_Caja,transaccion,Cod_Autorizador,fechaTransaccion,Tipo,trackEnvio,fechaRespuesta,trackRespuesta)
                        Values ( { ml r.Cod_tienda}, { ml r.ID_Caja}, { ml r.transaccion}, { ml r.Cod_Autorizador}, { ml r.fechaTransaccion},{ ml r.Tipo},{ ml r.fechaRespuesta})
I. 2015-10-01 16:47:03. <14> End of Error Context
I. 2015-10-01 16:47:03. <14> ROLLBACK Transaction: Upload
I. 2015-10-01 16:47:03. <14> COMMIT Transaction: End synchronization
I. 2015-10-01 16:47:03. <14> COMMIT Transaction: End connection
I. 2015-10-01 16:47:03. <14> Synchronization connection with connection ID 'SPID 17' has been disconnected
I. 2015-10-01 16:47:03. <14> Synchronization failed
I. 2015-10-01 16:47:03. <14> PHASE: sync_request: 688
I. 2015-10-01 16:47:03. <14> PHASE: receive_upload: 15
I. 2015-10-01 16:47:03. <14> PHASE: get_db_worker: 0
I. 2015-10-01 16:47:03. <14> PHASE: connect: 16
I. 2015-10-01 16:47:03. <14> PHASE: authenticate_user: 0
I. 2015-10-01 16:47:03. <14> PHASE: begin_sync: 0
I. 2015-10-01 16:47:03. <14> PHASE: apply_upload: 31
I. 2015-10-01 16:47:03. <14> PHASE: prepare_for_download: 0
I. 2015-10-01 16:47:03. <14> PHASE: fetch_download: 0
I. 2015-10-01 16:47:03. <14> PHASE: end_sync: 110
I. 2015-10-01 16:47:03. <14> PHASE: send_download: 0
I. 2015-10-01 16:47:03. <14> PHASE: wait_for_download_ack: 0
I. 2015-10-01 16:47:03. <14> PHASE: get_db_worker_for_download_ack: 0
I. 2015-10-01 16:47:03. <14> PHASE: connect_for_download_ack: 0
I. 2015-10-01 16:47:03. <14> PHASE: nonblocking_download_ack: 0

Thanks for any comments or help

-1117 Mobilink Error

$
0
0

Hi ,

 

We have large data to be downloaded from SQL server to iOS via Mobilink. Table has 5 columns out of which 3 of varchar(2000).

 

I am getting  -1117 Error while downloading this table (during Sync). This error says that exceeded db page size.

 

How to increase this DB page size. Is it from Mobilink server side or iOS side?

 

Please suggest me to solve this problem.

 

 

Thanks,

Suman Kumar

Mobilink Error 10012

$
0
0

I get the following error when we have sporadic connection / sync issues.

I am able to fix this by resetting the value in the consolidated database to remote database value or below  (usually make it 0)  then it will finish syncing.

My problem is I may be missing some data at that point, but my only other fix is to reload the whole database

I have tried everything to trap for this event, I would like to be able to insert some logging so we can notify our support team when this happens.

It does not look like the handle_error event is even firing...

 

 

 

 

W. <18> [10012] The consolidated and remote databases disagree on when the last synchronization took place, the progress offsets are 99 in the consolidated database and 83 in the remote database.  The remote is being asked to send a new upload that starts at the last known synchronization point

E. <18> [-10035] Download failed with client error -794

 

 

Error 10012.jpg

 

 

 

I have tried  the following events

 

 

handle_error / handle_odbc_error events

{CALL ps_error_insert({ml s.action_code}, {ml s.error_code}, {ml s.error_message},  {ml s.username},    {ml s.table} )}

 

These events only seems to fire when I have an odbc / sql error .

I thought that this would fire for all errors...

 

 

 

 

end_synchronization event

 

Insert into SyncStatus(RemoteID,UserID,SyncStatus,ScriptVersion)

Values({ml s.remote_id},{ml s.username},{ml s.synchronization_ok},{ml s.script_version})

 

This event seems to only fire when i have a successful sync.

 

 

 

 

Where do i put this trap ?

 

Thanks

Jay

Assertion failed: 200505

$
0
0

The following error appear in Sqlanywhere 12.0.1.3994:

 

There was an error reading the results of the SQL statement.

The displayed results may be incorrect or incomplete.

Internal database error  ERROR  Assertion failed: 200505

(12.0.1.3994)[DBNAME]

Checksum failure on page 27332 -- transaction

rolled back

SQLCODE=-301, ODBC 3 State="HY000"


Problems in DBISQL Sybase Anywhere 17

$
0
0

Hi,

i have two problem's with my ISQL 17.

 

If I want to copy (right click on the cell, copy data, cell/column)a value from a numeric column, I receive the value with a thousand separator. If I do the same but copying the row, the thousand separator is not copied which is correct in my opinion.

 

Another problem is, that the messages from the query (message type info to client) does not appear live in the progress tab when executing the query. All the messages appear only after the execution of the query ends. This behavior is in my opinion is new to isql17. In isql16/11 the messages appears live on the messages tab.

 

How can I change these two points to the “old” behavior (no copy of thousand separator, messages appears live while executing the query)?

 

Thanks and Greetings

T. Brinkmann

Integration of SQL Anywhere 16 into Visual Studio 2013

$
0
0

Hi

 

I'm trying to use Visual Studio 2013 to create an entity model with Entity Framework 6 and I just can't get the SQL Anywhere driver into list of drivers, so I can't choose it for connection. I tried to follow instructions from http://sqlanywhere-forum.sap.com/questions/22161/entity-framework-6-provider  and also from SQLA17 documentation as closely as possible - with no luck. Some details:

 

SQL Anywhere 16.0.0.2178, both 32-bit and 64-bit installed.

Visual Studio Express Edition Update 5

Entity Framework 6.1.3

 

Output from the run of SetupVSPackage.exe:

 

C:\Program Files\SQL Anywhere 16\Assembly\V4>SetupVSPackage.exe /i /v EF6

 

SQL Anywhere Package for Visual Studio .NET Setup Utility Version 16.0.0.21784

Copyright (c) 2015 SAP SE or an SAP affiliate company. All rights reserved.

 

Installing SQL Anywhere Package for Visual Studio 2010......

 

Succeeded

 

Replaced part of Web.config:

 

  <entityFramework>  <defaultConnectionFactory type="iAnywhere.Data.SQLAnywhere.SAConnectionFactory, Sap.Data.SQLAnywhere.EF6, Version=16.0.0.21784, Culture=neutral, PublicKeyToken=f222fc4333e0d400">  </defaultConnectionFactory>     <providers>      <provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />      <provider invariantName="iAnywhere.Data.SQLAnywhere" type="iAnywhere.Data.SQLAnywhere.SAProviderServices, iAnywhere.Data.SQLAnywhere.EF6, Version=16.0.0.21784, Culture=neutral, PublicKeyToken=f222fc4333e0d400" />    </providers>  </entityFramework>

After all this, I still see only SQL Server drivers in the list when I try to add ADO.NET Entity Data Model.

 

Thanks in advance

Leonid Gvirtz

ASA16 vs ASA11 thread counts

$
0
0

In ASA11 we had the thread count set to 30 in an installation with approx. 1300 db connections.  Monitoring the active vs unscheduled requests we rarely saw the active go over 20 and unscheduled, when they rarely happened, were always below 10.

 

Install ASA16 on new server and rebuilt the db, and removed the thread count option on the server service as 16 is supposed to handle this internally. Now monitoring active and unscheduled I see anywhere from 20 to a high of 81 active and the unscheduled range from 30 to over 500.

 

Has anyone else seen the same issue, should I turn off the auto-threading option that is on by default in ASA16?

Issue with auto increment column in ASA 16

$
0
0

Hi everyone,

I faced with strange behavior of auto-increment column.

It happens in ordinary table without Foreign Constraints, Triggers and etc.

Auto-increment for  id column  (numeric(10)) works as usual - add 1 to every new row.

But sometime it 'jumps' to billion. You can see it on pictures bellow:

Jump_1.jpg

jump_2.jpg

 

You can see the jumps happen randomly. First was after 200 records second was after next 690.

At the moment I have 4 such jumps and I am not sure this won't happen again.

 

Has anybody seen something like this before?

Json in SQL Anywhere16

$
0
0

Hello All,

 

I am trying to use Json for complex structure.

 

I am able to create Json for simple structure with help of Json Raw and Auto but I am not sure how I will be able to implement below complex structure.

 

Below is the sample Json structure which I am trying to implement.

Another problem is, in our database, User information is storing along with Address in same table. If I will use Json Auto, it won't return data in another array inside User Array.

 

I also need information about how I can decode same structure back to normal table.

 

{

  "remote_user": {

    "display_name" : "string",

    "phone_number" : "string",

    "fax_number"   : "string"

  },

  "request": {

    "urgent":                  "boolean",

    "form_id":                 "string",

    "state":                   "STATE",

    "memo":                    "string",

    "User": {

      "first_name":            "required string",

      "middle_name":           "string",

      "last_name":             "required string",

      "date_of_birth":         "date",

      "gender":                "GENDER",

      "email":                 "EMAIL",

      "member_id":             "string",

      "pbm_member_id":         "string",

      "phone_number":          "string",

      "address": {

        "street_1":            "string",

        "street_2":            "string",

        "city":                "string",

        "state":               "STATE",

        "zip":                 "zip"

      }

    },

    "payer": {

      "form_search_text":      "string",

      "bin":                   "bin",

      "pcn":                   "string",

      "group_id":              "string",

      "medical_benefit_name":  "string",

      "drug_benefit_name":     "string"

    },

    "prescriber": {

      "npi":                   "npi",

      "first_name":            "string",

      "last_name":             "string",

      "clinic_name":           "string",

      "fax_number":            "phone",

      "phone_number":          "phone",

     "address": {

        "street_1":            "string",

        "street_2":            "string",

        "city":                "string",

        "state":               "STATE",

        "zip":                 "zip"

      }

    },

    "prescription": {

      "drug_id":                  "required ndc or ddid",

      "name":                     "string",

      "strength":                 "string",

      "frequency":                "FREQUENCY",

      "refills":                  "integer",

      "dispense_as_written":      "boolean",

      "quantity":                 "decimal",

      "days_supply":              "decimal",

      "quantity_unit_of_measure": "string",

      "rationale":                "string"

    },

   "pharmacy": {

      "name":                  "string",

      "fax_number":            "phone",

      "phone_number":          "phone",

      "address": {

        "street_1":            "string",

        "street_2":            "string",

        "city":                "string",

        "state":               "STATE",

        "zip":                 "zip"

      }

    },

    "enumerated_fields": {

      "icd9_0":                "ICD9",

      "icd9_1":                "ICD9",

      "icd9_2":                "ICD9",

      "icd10_0":               "ICD10",

      "icd10_1":               "ICD10",

      "icd10_2":               "ICD10",

      "failed_med_0":          "ndc or ddid",

      "failed_med_1":          "ndc or ddid",

      "failed_med_2":          "ndc or ddid",

      "failed_med_3":          "ndc or ddid",

      "failed_med_4":          "ndc or ddid",

      "failed_med_5":          "ndc or ddid",

      "failed_med_6":          "ndc or ddid",

      "failed_med_7":          "ndc or ddid",

      "failed_med_8":          "ndc or ddid",

      "failed_med_9":          "ndc or ddid"

    }

  }

}

 

Thanks in advance.

Unable to open an entity framework model in LinqSample

$
0
0

Hi

 

I'm trying to open SampleModel.edmx that comes with LinqSample project, which in turns comes as a sample with SQLA 16. I receive the following message: "Unable to cast object of type 'iAnywhere.Data.SQLAnywhere.SAProviderServices' to type 'System.Data.Common.DBProviderServices'". The problem exists in both Visual Studio 2013 and 2015, and after I followed all installation instructions. Any advice is very much welcome.

 

Leonid Gvirtz

OData Offline

$
0
0

Hi,

 

we are trying to get OData work offline. It works fine online, but we get exception on oDataStore.Open. It stops with "Unknown network error occured" or in Windows "Exception calling native with command :: OData :: openOfflineStore ::exception=TypeError: Die Eigenschaft "OfflineStore" eines undefinierten oder Nullverweises kann nicht abgerufen werden." But there is no error for createOfflineStore.

 

Sample code:


    var data = {

         languageID: getLanguageId(),

         hostName: "localhost", // host

         port: 8090, // port

         odataOnline: "/odata", // serviceRoot online requests

         odataOffline: "/odata_offline", // serviceRoot offline requests

         odataOfflineRequests: { // offline requests: definingRequests

             "LGNTINITAnrede_ODataVIEW" : "/LGNTINITAnrede_ODataVIEW"

         }

     };

     var getODataStore = function (complete, error) {

         Log.call(Log.l.trace, "appSettings.");

         var deferred = $q.defer();

         if (oDataStore) {

             Log.print(Log.l.trace, "oDataStore already opened");

             complete(oDataStore);

             deferred.resolve();

         } else if (sap && sap.OData &&

                     typeof sap.OData.createOfflineStore === "function") {

             window.setTimeout(function () {

                 Log.call(Log.l.trace, "appSettings.getODataStore.setTimeout");

                 var properties = {

                     name: "LeadSuccess",

                     host: data.hostName,

                     port: data.port,

                     serviceRoot: data.odataOffline,

                     definingRequests: data.odataOfflineRequests

                 }

                 oDataStore = sap.OData.createOfflineStore(properties);

                 if (oDataStore &&

                     typeof oDataStore.open === "function") {

                     Log.print(Log.l.trace, "createOfflineStore success! calling oDataStore.open()");

                     oDataStore.open(function () {

                         Log.call(Log.l.trace, "appSettings.oDataStore.open", "success!");

                         Log.print(Log.l.trace, "applyHttpClient() calling...");

                         sap.OData.applyHttpClient();

                         Log.print(Log.l.trace, "applyHttpClient() returned");

                         complete(oDataStore);

                         deferred.resolve();

                         Log.ret(Log.l.trace);

                     }, function (e) {

                         Log.call(Log.l.error, "appSettings.oDataStore.open", "oDataStore.open() failed!");

                         if (typeof e === "string") {

                             error({ status: 500, statusText: "open offline store failed with error:\r\n" + e });

                         } else {

                             error(e);

                         }

                         deferred.reject();

                         Log.ret(Log.l.error);

                     });

                 } else {

                     Log.print(Log.l.error, "createOfflineStore() failed!");

                     error({ status: 500, statusText: "Creating offline store failed" });

                     deferred.reject();

                 }

                 Log.ret(Log.l.trace);

             });

         } else {

             Log.print(Log.l.error, "sap.OData missing!");

             error({ status: 501, statusText: "OData offline store functionality not implemented" });

             deferred.reject();

         }

         Log.ret(Log.l.trace);

         return deferred.promise;

     };

 

thanks for help or suggestions

 

M. Marek


Count total and missing in one query

$
0
0

I am able to use COUNT(*) AS CNT_TOT, SUM(VAR1="") AS CNT1_MISSING, SUM(VAR2="") AS CNT2_MISSING, etc; in many other SQL tools, such as Microsoft SQL, SAS SQL. How can I do this as a pass through SQL to SAP? This is very useful to investigate the data quality.

Multiple sub SQL not working

$
0
0

Hello,

 

I am able to run the 1st pass through SQL

 

select count(*) as cnt1,

         (select count(*) as cnt2 from table1 where var1 is null)

from table1


However, the 2nd SQL failed with "undefined index" error message.


select count(*) as cnt1,

         (select count(*) as cnt2 from table1 where var1 is null),

         (select count(*) as cnt3 from table1 where var1<0)

from table1


Does anybody know why?



Thanks.

How to prevent corruption of subscription log offsets?

$
0
0

Hello, all

I have the following situation:

 

Numerous client sites synchronize with the consolidated DB's using Mobilink.

The center URL is specified in the Mobilink user.

 

Sometimes there is a need to change the synchronization URL. In order to do that IT people open Sybase central, stop Mobilink client service, change the URL in the user and start the service again.

 

If they do not stop the service, then sometimes the sync stops working, because log offsets get corrupted.

 

My question is: is it possible to prevent corruption of the log offsets from SQL script, so the IT people would not need to open Sybase central again and application users could do it from client application?

Mobilink Error 10012

$
0
0

I get the following error when we have sporadic connection / sync issues.

I am able to fix this by resetting the value in the consolidated database to remote database value or below  (usually make it 0)  then it will finish syncing.

My problem is I may be missing some data at that point, but my only other fix is to reload the whole database

I have tried everything to trap for this event, I would like to be able to insert some logging so we can notify our support team when this happens.

It does not look like the handle_error event is even firing...

 

 

 

 

W. <18> [10012] The consolidated and remote databases disagree on when the last synchronization took place, the progress offsets are 99 in the consolidated database and 83 in the remote database.  The remote is being asked to send a new upload that starts at the last known synchronization point

E. <18> [-10035] Download failed with client error -794

 

 

Error 10012.jpg

 

 

 

I have tried  the following events

 

 

handle_error / handle_odbc_error events

{CALL ps_error_insert({ml s.action_code}, {ml s.error_code}, {ml s.error_message},  {ml s.username},    {ml s.table} )}

 

These events only seems to fire when I have an odbc / sql error .

I thought that this would fire for all errors...

 

 

 

 

end_synchronization event

 

Insert into SyncStatus(RemoteID,UserID,SyncStatus,ScriptVersion)

Values({ml s.remote_id},{ml s.username},{ml s.synchronization_ok},{ml s.script_version})

 

This event seems to only fire when i have a successful sync.

 

 

 

 

Where do i put this trap ?

 

Thanks

Jay

Release Memory used by SQL Anywhere

$
0
0

How to release memory used by SQL Anywhere without restart database server ?

Viewing all 542 articles
Browse latest View live


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