Quantcast
Channel: Questions Tagged With connection
Viewing all 98 articles
Browse latest View live

How do I name my connection?

$
0
0

I am developing an application to perform data replication between one database and another, replication will be done through Trigger. I need to identify which application is performing a certain operation, and through this feature I mean to trigger that if the responsible By changing the application X it will not do anything. Objective: Avoid the infinite loop.

How do I send the name to the connection, would like to pass the name of the executable, to be identified in the process. If it is not possible how do I get the name of this connection when connecting.

See Image


Error: Code: -2004 Msg: Can't initialize DBCAPI

$
0
0

I am using node js (sails) and SQL Anywhere 16 for development. After I install node Sql Anywhere driver and follow all step to set up SQL Anywhere environment. (I also install the client software in my mac).it always return Error: Code: -2004 Msg: Can't initialize DBCAPI. However, i can run the dbping command for ping the other server database and return successful . What i missed and how can fix it? Thank you

dbsrv17 stops after disconnecting a transaction

$
0
0

Having successfully started the database using the following command:


$ /opt/sqlanywhere17/bin64s/dbsrv17 -ga -x tcpip(port=49153) -n ftnode_sa /home/sa/sqlany17/ftnode_sa.db
SQL Anywhere Network Server Version 17.0.4.2053

Copyright (c) 2016 SAP SE or an SAP affiliate company. All rights reserved. Use of this software is governed by the SAP Software Use Rights Agreement. Refer to http://global.sap.com/corporate-en/our-company/agreements/index.epx.

.. .. .. .. Database "ftnode_sa" (ftnode_sa.db) started at Thu Jul 13 2017 23:49 Database server started at Thu Jul 13 2017 23:49 Trying to start SharedMemory link ... SharedMemory link started successfully Trying to start TCPIP link ... Starting on port 49153 TCPIP link started successfully Now accepting requests Press 'q' to shut down the database server

The database suddenly shuts down whenever I close SQL Central on a client machine.

Finished checkpoint of "ftnode_sa" (ftnode_sa.db) at Thu Jul 13 2017 23:58
Database "ftnode_sa" (ftnode_sa.db) stopped at Thu Jul 13 2017 23:58
Database server shutdown automatically after last database stopped
TCPIP listener on IP address (::):49153 is exiting
TCPIP listener on IP address 0.0.0.0:49153 is exiting
Database server stopped at Thu Jul 13 2017 23:58

Is there anyway I can prevent this from happening. I prefer to explicitly stop the database using dbstop, something like this:

/opt/sqlanywhere17/bin64s/dbstop -c "Server=ftnode_sa;uid=sadb;pwd=sadb;"
Clients should be able to connect and disconnect as and when. I could hack it and open a dummy client, but prefer not to create such spurious connections.

c++ hanging with 2 connections

$
0
0

I'm currently stuck as to why I cannot get 2 connections working. I have two separate connections in a single c++ program, but when I attempt to commit with the first connection it hangs. I am running SQL Anywhere 17 Development Server on Linux 64bit. The code I that hangs is as follows


#include <iostream>
#include <sqlapi.h>

int main() { SAConnection con; SAConnection con1; SACommand cmd(&con); SACommand cmd1(&con1);

try{con.Connect("links=tcpip(host=10.11.12.17;port=49153);databasename=ftnode_sa;servername=ftnode_sa","sadb","sadb",SA_SQLAnywhere_Client);con1.Connect("links=tcpip(host=10.11.12.17;port=49153);databasename=ftnode_sa;servername=ftnode_sa","sadb","sadb",SA_SQLAnywhere_Client);con.setIsolationLevel(SA_ReadCommitted);con1.setIsolationLevel(SA_ReadCommitted);cmd.setCommandText("BEGINTRANSACTION");cmd.Execute();std::cout<<"After first BEGIN"<<std::endl;cmd.setCommandText("insertintotest1(x,y)values(1,'red4')");cmd.Execute();cmd.setCommandText("insertintotest1(x,y)values(2,'Blue4')");cmd.Execute();cmd1.setCommandText("BEGINTRANSACTION");cmd1.Execute();std::cout<<"After 2nd BEGIN"<<std::endl;cmd1.setCommandText("insertintotest1(x,y)values(1,'red4')");cmd1.Execute();std::cout<<"After first INSERT"<<std::endl;cmd1.setCommandText("insertintotest1(x,y)values(2,'Blue4')");cmd1.Execute();std::cout<<"After second INSERT"<<std::endl;cmd1.setCommandText("deletefromtest1wherex=1");cmd1.Execute();std::cout<<"Before first Commit"<<std::endl;con1.Commit();std::cout<<"After first Commit"<<std::endl;cmd.setCommandText("deletefromtest1wherex=1");cmd.Execute();std::cout<<"Before 2nd Commit"<<std::endl;con.Commit();std::cout<<"After 2nd BEGIN"<<std::endl;std::cout<<"Transaction completed sucessfully.\n";}catch(SAException&x){std::cout<<"Error : "<<(constchar*)x.ErrText()<<"\n";}return0;

};

I tried increasing the number of max connections using:
set OPTION PUBLIC.max_connections=20

But it had no effect, still hangs on first commit.

I have however managed to successfully open over a dozen dbisql connections and run sql on each connection.

When I start the server the following appears:


$ ./sastart.sh 
SQL Anywhere Network Server Version 17.0.4.2053
Developer edition, not licensed for deployment.

Copyright (c) 2016 SAP SE or an SAP affiliate company. All rights reserved. Use of this software is governed by the SAP Software Use Rights Agreement. Refer to http://global.sap.com/corporate-en/our-company/agreements/index.epx.

Connection limit (licensed seats): 3

So it states that there is a connection limit. Does that mean I the server is limited to 3 connections regardless what max connections is set to ? If so, why am I able to open more than 3 dbisql sessions ?

If the limit is indeed 3 for SQL Anywehere 17 Development Server, and modifying max connections has no effect, does the same apply to SQL Anywhere 16 Evaluation Server, for which a key is needed and an evaluation period of 60 days applies ?

connect to sybase database from remote server and execute the script

$
0
0

Hi,

I am new to Sybase database technologies. I have a requirement to connect to Sybase database from a remote server through command prompt and execute the script on Sybase databse.

Could you please help me with it.

I am using ASE version.

Thanks,

Mandar Bakshi

connection terminated abnormally; client socket shut down

$
0
0

Hello,

We have a few agents running 24/7. Several customers are having the same setup, but slightly different machines / OS or even SQL Anywhere (not prior to version 12).

At this site every night the agents loose the connection to the DataBase. But i cannot figure out whether this is a caused by the DataBase the Application. It seems to me the application looses the connection, but i am not sure.

Can you point me in the right direction. Googling gives me too much info:-)

Regards,

Marc

from database console
---------------------
I. 11/22 00:26:04. Cache size adjusted to 4251432K
I. 11/22 00:26:55. Connection ID 24034: connection "usr" terminated abnormally; client socket shut down
I. 11/22 00:26:55. Connection ID 24034: Disconnected TCPIP client's AppInfo is IP=192.168.96.38;HOST=BG-NLEDI;OSUSER=perry.myname;OS='Windows 2012R2 Build 9200 ';EXE=C:\apps\B2BServerCDW\b2bHandleCDW.exe;PID=0x404;THREAD=0xa40;VERSION=17.0.0.1062;API=ODBC;TIMEZONEADJUSTMENT=60
I. 11/22 00:26:55. Connection ID 24034: "usr" disconnected from database "MYDB"
I. 11/22 00:26:55. Connection ID 24034: Client disconnected
I. 11/22 00:27:04. Cache size adjusted to 4251324K
I. 11/22 00:27:30. Connection ID 25979: connection "reportserver" terminated abnormally; client socket shut down
I. 11/22 00:27:30. Connection ID 25979: Disconnected TCPIP client's AppInfo is IP=192.168.96.25;HOST=BG-NLRP1;OSUSER=BGAS2SA;OS='Windows 2012R2 Build 9200 ';EXE=C:\apps\CDWReportServer\CDWReportServer.exe;PID=0x6c4;THREAD=0xf3c;VERSION=17.0.0.1062;API=ODBC;TIMEZONEADJUSTMENT=60
I. 11/22 00:27:30. Connection ID 25979: "reportserver" disconnected from database "MYDB"
I. 11/22 00:27:30. Connection ID 25979: Client disconnected
I. 11/22 00:28:04. Cache size adjusted to 4251208K
I. 11/22 00:29:04. Cache size adjusted to 4251176K
I. 11/22 00:30:00. Starting checkpoint of "MYDB" (MYDB.db) at Wed Nov 22 2017 00:30

==================================================================

SQL Anywhere Network Server Version 17.0.0.1062

Workgroup Edition


Copyright © 2015 SAP SE or an SAP affiliate company.
All rights reserved.
Use of this software is governed by the SAP Software Use Rights Agreement.
Refer to http://global.sap.com/corporate-en/our-company/agreements/index.epx.


Processors detected: 4 logical processor(s) on 4 core(s) on 4 physical processor(s)
Processor license restriction (Workgroup Edition): all logical processors on all cores on up to 2 physical processors
Processor license restriction (licensed processors): all logical processors on all cores on up to 2 physical processors
This server is licensed to use: all logical processors on all cores on up to 2 physical processors
Processors in use by server: 2 logical processor(s) on 2 core(s) on 2 physical processor(s)
This server is licensed to:
    Administrator
    MyCompany
Running Windows 2012R2 Build 9600  on X86_64
Server built for X86_64 processor architecture
4231168K of memory used for caching
Minimum cache size: 4231168K, maximum cache size: 15095340K
Using a maximum page size of 4096 bytes

Starting database "MYDB" (E:\MYDB\MYDB.db) at Thu Nov 02 2017 22:36
Transaction log: F:\MYDB\MYDB.log
Database "MYDB" (MYDB.db) started at Thu Nov 02 2017 22:36
Database server started at Thu Nov 02 2017 22:36
HTTP listener starting on port 9091
Now accepting requests

======
startup parameters:
------------------
-x tcpip(PORT=4002)
-xs http(port=9091)
-ti 0
-c 4G

ODBC connection error IM014 on windows server 2016 standard

$
0
0

When trying to run the following statement in the command prompt:

dbisql.exe -c "dsn=transfusion;uid=...;pwd=..."

I get the following error:

The specified DSN contains an architecture mismatch between the Driver and Application [IM014]

I did this because our application won't start and the window of the ODBC popsup to enter the correct credentials which are already filled and are correct.

If we run this under the domain administrator account everything is working fine. If we use a normal user account I get the error. If I add the user to the domain user account everything is working fine. Where should we look to solve this issue because I don't want the user to be a domain user account

When we start the application in a session as domain administrator on the server then the users can login and are able to access the database in our application. If the our application is not started users get the windows odbc logon screen. Also tried to add the IP number and the port number in the odbc setting without any success. Firewall is disabled and virus scanner has been removed.

We're running the test environment on a SAP SQL anywhere 12 database machine on windows server 2016 standard. We have the same problems there as well. We both tried to connect through the SQL Anywhere 12 and the SQL Anywhere 17 odbc driver without any difference.

Application for both test and production is running on OS = Windows server 2016 standard Windows ODBC version = 10.0.14393.0 SQL Anywhere 12 driver = 12.00.01.4436 SQL Anywhere 17 driver = 10.00.00.1062

Production SQL Anywhere 12 database is running on OS = Windows 2003 server standard edition 5.2.3790 Service Pack 2 Build 3790 Windows ODBC version = 3.526.3959.0 SQL Anywhere 12 driver = 12.00.01.3873

Test SQL Anywhere 12 database is running on OS = Windows server 2016 standard Windows ODBC version = 10.0.14393.0 SQL Anywhere 12 driver = 12.00.01.4436

TIA

Frank

What is the maximum number of allowed connections to a server

$
0
0

Hello,

  1. What is the maximum number of allowed connections to a server? The documentation doesn't seem to mention this.
  2. Does this change if the server is part of a mirror/high availability group?

Thank you.


can't connect from sql central to server

$
0
0

I have recently installed Developer Edition of SQL Anywhere 17 on a Windows Server VM. I am able to start the db and connect locally. On my laptop, I tried to connect to the database using SQL Central 17 and chose to connect to a running database on another computer. When I click the "Ping" button it is able to ping it, but I'm never able to actually connect to it. Is there a configuration I'm suppose to modify first on the server to allow connections remotely, like in Oracle where I need to change the tnsnames file from "localhost" to the host address?

Error message:

Could not connect to the database.

Database server not found

Ensure that the name in the "Server name" field is spelled correctly, that the network options on the network tab are correct and that the database server has been started. [SAP][ODBC Driver][SQL Anywhere]Database server not found SQLCODE=-100 SQLSTATE=08001

Connection parameters: User=* Password= Host=**:2638 Server=* DBN=*** LINKS=TCPIP

Thanks

Connection terminated abnormally

$
0
0

Hi,

We are using the version 17.0.8.4003 of SQLAnywhere and some of our client have these error message :

I.09/1413:38:38.Connectionterminatedabnormally;errorcode65I.09/1413:38:38.DisconnectedTCPIPclient's AppInfo: IP=192.168.1.96;HOST=Ludovic-CESSAC.local;OSUSER=l.cessac;OS='Darwin17.6.0x86_64';EXE='/Applications/8senssybase/8XRM.app/Contents/MacOS/8XRM';PID=0x1bd;THREAD=0xa983c1c0;VERSION=17.0.8.4003;API=CAPI_SQLAPI;TIMEZONEADJUSTMENT=120I. 09/14 13:26:04. Connection terminated abnormally; error code 60I. 09/14 13:26:04. Disconnected TCPIP client'sAppInfo:IP=192.168.1.132;HOST=Yvan-LARA.local;OSUSER=y.lara;OS='Darwin 17.7.0 x86_64';EXE='/Applications/8sens sybase/8XRM.app/Contents/MacOS/8XRM';PID=0x283;THREAD=0xa98561c0;VERSION=17.0.8.4003;API=CAPI_SQLAPI;TIMEZONEADJUSTMENT=120

I search in the documentation for error code 60 or 65, but I find nothing.

So if someone know what does it mean or the cause of the issue.

Error 08001- possible sources

$
0
0

Hello, all

Is it possible to receive 08001 error for any other reason that network problems? We know that the server is running and sometimes users get this error: ERROR [08001] [Sybase][ODBC Driver][SQL Anywhere]Database server not found

It goes on for a few seconds and then comes back as if there was never a problem.

So, could it be anything else other than network issues? The IT dep tells us (what a shock...) that there are no network problems.

Thank you Arcady

Calling sa_conn_info() always returns only 1 connection when called from app

$
0
0

Hi, version SQL Anywhere 16,

So I'm trying to create a check using database layer/PB app to check if one particular username is already logged in. Upon supplying of userID and pwd and establishing DB connection, I immediately want to check is there another active connection for the same user to see if the user is already connected.

I've been calling sa_conn_info() from ISQL and I get nicely all active connections, sometimes 7, sometimes 10, depends. In fact, I'm not really calling sa_conn_info() itself, but just using the query that is defined within it, which is

select "Number",
"connection_property"('Name',"Number") as Name,
"connection_property"('Userid',"Number") as UserID,
"connection_property"('CommLink',"Number") as CommLink,
"connection_property"('LastReqTime',"Number") as LastReqTime
from "dbo"."sa_conn_list"(null,null);

If I call that from ISQL I see all DB connections. When I try to do the same from PB code (just after our login and DB connection initialisation) by calling a retrieve on datastore with the above, the datastore always returns 1 row for 1 connection of the user just logged in. I immediately run the same query in ISQL - I see many connections.

So I wrote a DB stored function which calls the above query, loops through it and reports number of connections. When I call it from ISQL, I get 7 or 10 or whatever rows. When I call the stored function explicitly from PB code, I get only one row again. How come?

What am I doing wrong? How come a call from PB app always returns only one, that, connection, and a call from ISQL returns all? Or is there an easier way, is there a SYS table which keeps the data rows on active DB connections?

Thanks

JZ00L when simultaneous connection attempts

$
0
0

Hello!

I have some clients running on ASA9 server, and one problem is in bothering. Whenever there are two (or more) simultaneous login requests via JDBC, any of the requests returns a JZ00L exception. I confirmed this behavior in the lab, wrote a program that performs infinite connections to the database, and when I fire the second instance of the program, the JZ00L error is generated in one of the running instances. Is this the expected behavior? Is there a way to resolve this situation?

Thank's

Connection error

$
0
0

When i try to connect to a sql anywhere 16 server, i get the error "No valid host names or addresses given". I searched for this message but nothing found.

The application is hosted in a win10 that uses oledb (dboledb16.dll) to connect.

I have other clients with the same configuration working fine.

Specifying InitString separately from DSN

$
0
0

Hello, all Is it possible that when specifying the Connection string through DSN and adding InitString property to it in code, then the InitString will be taken from the DSN?

We noticed that this DBPARM does not work (the InitString does not happen):

//----------------------

ConnectString='DSN=dsnName;InitString=....'

//--------------------------

If using execute immediate for the same string, the the connection authentication is visible in the connection property.

Thank you

Arcady


Database server not found

$
0
0

Hello, support We are having a continuing problem in our production environment where attempted ODBC connections return error "Database server not found". Usually, in a few seconds, the connections work again. The DB server itself never goes down.

We checked everything that could be checked on the network level, so now we need to know. Are there any known issues with DB server accepting new connections when long update/insert transactions are running? These DBs have ML servers synchronizing data from various locations. Sometimes, the data chunks are very big, it can take up to a minute to commit them.

Thank you Arcady

Usage of disconnect type event

$
0
0

Hello, all I need to log durations and several other properties of all connections to the DB. I thought I would be able to use event type "disconnect", but it does not have parameter login time. Accessing the properties of the disconnected connection is, obviously, not possible.

Can someone tell me how I can do it?

Thank you Arcady

Usage of pooled connections

$
0
0

Hello, all How do I know that connection from the client is being taken from the connection pool and does not create a new one? Is there something in the ODBC log for that?

Thank you Arcady

Failed to connect using JDBC to SqlAnywhere 17

$
0
0

I try to connect to SqlAnywhere 17 demoDB using a tool called DbSchema. The tool is using JDBC connection.

For this I started SQL Central, then I also did dbsrv17.exe -x tcpip -n server1 to start the Tcp/IP service ( this is in the tool Help ).

Then I try to connect as DBA/sql but I get 'failed login'. I tried also creating an user in SQL Central and connect using it, but connectivity still fails. The connection is done like this:

final Properties properties = new Properties(); properties.put( "user","DBA"); properties.put( "password","sql"); driver.connect( "jdbc:sybase:Tds:localhost:2638/demo?LITERAL_PARAMS=true", properties );

The error is java.sql.SQLException: JZ00L: Login fehlgeschlagen. �berpr�fen Sie SQLWarnings zu diesem Fehler, um die Ursache zu sehen. translated Login failed. Check SQLWarnings about this error to see the cause. I don't know how to get the SQLWarnings.

Any suggestion on what should I check ?

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.

Viewing all 98 articles
Browse latest View live


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