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

How are connection numbers assigned?

$
0
0

It sounds impossible, but I just had a sequence of dbping executions that ran the connection number up beyond 400,000 on a SQL Anywhere 16 database. It only takes a few milliseconds for a connect/disconnect so exhausting the INTEGER range is not out of the question.

If the connection number wraps to 1, do new connection numbers step over small assigned values that are still in use?

Do new connection numbers "step over" high-valued connection numbers (events, services, backups, exchanges, etc)?


Deny new connections

$
0
0

Hi.

Is it possible to deny all new connections temporarily in SA12 and/or SA16? This would be great for updating the schema and debugging.

br,

Bjarne Anker Maritech Systems Norway

Why does a local connection use TCP/IP instead of Shared Memory?

$
0
0

I have a locally running database server (12.0.1.4216, 32-bit) on a Windows 7 system running as normal application (i.e. not as a service). When I try to establish a local connection via ODBC (32-bit as well), the connection seems to use TCP/IP unless I explicitly specify "LINKS={ShMem}".

Why is that? I'm not using the v12 HOST connection parameter - which would enforce TCP/IP even for local connections, AFAIK. (I had previously used that parameter but have dropped it now.) Instead I'm just using an ODBC DSN with SERVER= and DBN= and some other options but without any LINKS, HOST or PORT connection parameters.

On a different box with Win 2K3, the same ODBC DSN settings do establish a ShMem connection as desired.

Is that a Windows 7 peculiarity or what may prevent shared memory here?

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

$
0
0

Hello,

I am new to using sqlanywhere and I am seeing this issue. When I try to connect to sybase, I am seeing this error:

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

I can connect with other clients like RazorSQL. I am running this code on a mac and our servers for prod will be Unix. I am just trying to connect at this point. I searched for information on this and I cannot find any.

Thanks in advance

How to test mirroring and login clients to mirrored server while failover

$
0
0

Hi there,

our test-mirroring-system is allready and successfull running and now i have to test different scenarios for initiating a failover, before running in productive area. Is there something i have to consider for testing it? Can u give me some tips for that? I found this http://dcx.sybase.com/1101/en/dbadmin_en11/da-highavailability-s-4980336.html but i don't think this is the only possibility to test the mirror...

Another question: I found this in the documentation of HA (http://dcx.sap.com/index.html#1200/en/dbadmin/database-mirroring-overview.html): "... Any clients that were connected to the original primary server are disconnected, and any uncommitted transactions are lost. Clients must then reconnect to the database on the new primary server to continue accessing the database. When the original primary server becomes available again, it assumes the role of mirror server. "

What does it mean? Can the application use the same databasename at any time or must it be changed in the client application if the connection switched to the mirror server? Our target is, that the arbiter can unnoticed switch to the mirror server, so that the clients can continue working without disconnect and without login again with a different server name.

Thanks in advance and regards from germany Sabrina

Find server by broadcast fails out of a sudden.

$
0
0

Using 16.0.0.2076 running on Windows Server 2012 R2 we experience from time to time the problem, that the db server is not answering broadcasts anymore. After restart of the db server everything is fine again and clients can locate the server using broadcasts.

Has anyone experienced the same, is it a known problem?

Getting list of connections with client name and name of the app

$
0
0

Hello,

i have seen a tool that can list all connections to a sqlanywhere 12 server with name of the client pc and name of the app that has the connection opened at the client. i haven't found a system procedure to list these information. can anybody tell me how to get this information with a sql statement?

kind regards Andreas

Timeouts on connections that have been inactive for a while (Connection terminated abnormally; client socket shut down)

$
0
0

We have a system running on SQL Anywhere 12 which was working fine for long time, but recently we started to get random timeouts on connections that have been inactive for a while. I excluded possibility that client application somehow messes up the connection, and the problem is now reproducible with a simple test program that does this:

  • Open Connection to Sybase server (CT library)
  • Run the loop: wait N minutes, confirm that connection is alive by running simple SQL, double the value of N

When N reaches 64 (minutes), SQL starts to time out on the call to ct_results(). Message callback gets called with the following message:

Client Library error: severity(0) number(63) origin(2) layer(1)
ct_results(): user api layer: internal Client Library error: Read from the server has timed out.

This message gets repeated every 15 seconds for up to several minutes, while ct_results() call is in progress. This is also reflected on the database server, which logs the following message in its own log:

... Connection terminated abnormally; client socket shut down
... Disconnected TCPIP client's AppInfo: PID=NNN;EXE=process[NNN].host

That message is repeated several times. At that point, the connection is still visible to sa_conn_info, but attempts to execute any SQL on it result in the timeout. We have no idle timeout enabled. Server starts with -ti0 option, and liveness timeout doesn't apply to TDS connections, from what I understand.

Server version is SQL Anywhere Network Server Version 12.0.1.3457.

I've seen this bug description: link:http://search.sybase.com/kbx/changerequests?bug_id=743662 which mentions similar problem, but the error message is not exactly the same.

Has anyone run into similar problem ? Is this a bug in the DB engine or client library ?


How to connect IntelliJ IDEA to a SQL Anywhere 16 database

$
0
0

Dear all,

I'd like to test SQL Anywhere 16 in a Java project developed using IntelliJ IDEA 14. It would be usefull to connect the IntelliJ IDEA IDE to the database but there are only options for other RDBMS. As for Sybase I can find only ASE but no ASA options.

Is it possoble to connect IntelliJ IDEA to a SQL Anywhere 16 database?

TIA, Chris Werner

Issue with the getUpdateCount() in UltraliteJ

$
0
0

There seems to be an issue when calling the PreparedStatement.getUpdateCount() in conjunction with calling the Connection.getLastIdentity() method in UltraliteJ. You get different results depending on in which order you call them.

To illustrate using the CustDB app distributed with SA17,

  • change the cust_id column to DEFAULT AUTOINCREMENT
  • then execute the following code
ps.execute("INSERT INTO ULCustomer (cust_name) VALUES('joe')");
Log.d(this.getClass().getName(), "getUpdateCount() = " + ps.getUpdateCount());
Log.d(this.getClass().getName(), "getLastIdentity() = " + _conn.getLastIdentity());

you get the expected output,

getUpdateCount() = 1
getLastIdentity() = 1

  • however if you reverse the calls to GetUpdateCount() and getLastIdentity() as follows,
ps.execute("INSERT INTO ULCustomer (cust_name) VALUES('joe')");
Log.d(this.getClass().getName(), "getLastIdentity() = " + _conn.getLastIdentity());
Log.d(this.getClass().getName(), "getUpdateCount() = " + ps.getUpdateCount());

you get the output,

getLastIdentity() = 1
getUpdateCount() = -1

Note the value of -1. It looks like the call to getLastIdentity() somehow destroyed the value for getUpdateCount().

Obviously I can work around this, but I think it's a bug.

Terry

UltraliteJ 17 - Attempted two active database requests

$
0
0

I'm working on an Android project which makes use of UltraliteJ library for database operations. Previously we are using UltraliteJ 17 (Build number - 17.0.0.1358) library with OpenSSL version of 1.0.1Q. Since play store instructed developers to update the OpenSSL versions prior to 1.0.1r, we asked the SAP support and we got the upgraded version of UltraliteJ17 (Build number - 17.0.4.2053) with OpenSSL version of 1.0.1t. After updating the new UltraliteJ17 (with OpenSSL 1.0.1t), I got the following exception while accessing the connection object.

UltraLiteJ Error[-298]: Attempted two active database requests

I know this error will raise only if we try to submit a database request while another request in progress.

The strange thing is, this error doesn't raised while using the previous UltraliteJ17 (Build number - 17.0.0.1358 with OpenSSL 1.0.1q). And this error appears at random places while accessing the database.

Is there any behavioral changes in the new UltraliteJ17 library (Build number - 17.0.4.2053)?

Is it any code changes need to be done to overcome this issue?

Kindly assist me. Any information will be helpful.

What to deal with Idle connections

$
0
0

Hello everyone,

I have decided to use the SQL Profiler today, and my goal was to identify requests that take longer than 1 sec, for the execution or the blocking. This is the conditions that I have set up for the SA Profiler:

Profiling Options

The profiler has recorded a multiple similar statements with the following properties: Connection Properties

What worries me is the high "Idle" value, plus these requests are called from the multiple connections that are still (I think) alive: Connections

I have found the old thread that says that the idle connections consume memory, and a little CPU when they send "ping" packets: http://sqlanywhere-forum.sap.com/questions/6524/whats-the-performance-downside-to-having-a-lot-of-idle-connections

But I think that this is bad, because it looks like the statement wasn't finished yet (you see, the execution time was still "Unknown") and/or the connection was not returned to the server's connection pool.

A short update. The profiler has also shown me the following warning: Non-default options

Can you please confirm that I am right in my assumption? Because it is only you who can stop me from the creation of the support ticket to people, who developed the server :)

p.s. I am using SA 17.0.4.2053 (Windows 2012R2 Build 9600, 4 cores). Just in case:
Auto multiprogramming level - 1
Current multiprogramming level - 20
Min multiprogramming level - 4
Max multiprogramming level - 80

update #2: I have decided to start demo.db and check it with the SQL Profiler (Profiling options: comprehensive). It showed me that dbisql.exe (I use 64-bit version), gets the number of locks, but probably doesn't close the connection:

dbisql.exe requests

Here you see my simple select:

SELECT @@version;

And then immediately you see the "idle" connection. The source code of com.sybase.saisqlplugin.SAISQLPlugin.getLockedTableCount (I apologize for doing this, but I wanted to know how the "universe" works!) creates the SQL statement object, and then closes it later, but ResultSet is not closed. Am I correct that this is the way where we have the "connection leak" or whatever? Can someone take a look at my observation, are either the profiler, or dbisql, or me wrong? To reproduce the issue, you should simply start the profiler (comprehensive mode), dbisql and execute any SELECT.

Thank you in advance,
Vlad

INT: Exchange, INT: Cleaner connections stall queries

$
0
0

We are currently testing an upgrade from SQL Anywhere 10 to 16, and I've found that certain queries hang up after the appearance of 8 "INT: Exchange" connections. I've asked about these previously, but today, I left it running for a particularly long time, it was using 100% of the CPU and huge gobs of RAM (machine has 32G). I noticed that a connection "INT: Cleaner" appeared. I ended up closing to the connection to try changing the query to create statistics before the choke point and it is again running, and hasn't yet got to the choke point.

So my question is, what exactly is this "INT: Cleaner"??

Does DBISQL give a hint when it has re-connected a dropped connection?

$
0
0

Using 16.0.0.2270, I just accidentally noticed that a DBISQL session had been re-established after a short network problem. (I was not even aware that DBISQL can do that...)

The server log shows the typical "Dropped client connection entry" but DBISQL has not presented a visual sign of the re-connect to me. (If it has shown a message temporarily, well, I was not sitting in front of the machine during the re-connect. - And no, I was no causing the network problem, either:))

I'm asking because I noticed the re-connect simply because a connection variable that had been used before was no longer valid when I ran the next statement, and thereby leading to a different behaviour - in my case an error message but otherwise somesting unexpected could have taken place, as well.


An automatic re-connect may be a helpful feature, but when the re-established connection does not inherit all properties of the original one (because that may be not possible, I'd think, and at least it has a different connection number), a warning should be issued.

BTW: Is that re-connection feature documented?

Native database connection (JDBC driver)

$
0
0

Hi

I am still trying to get a running (working) native JDBC database connection to a SQL Anywhere 17 database. I tried with the following URL and Driver settings on Windows Server (2008 R2) and OS X 10.11.5. On both platforms, a SQL Anywhere version 17.0.4.2129 is running. It's a standard install done by the installer (wizard). Unfortunately I have no success on making a connection on either OS.

In the database server connection fields URL and Driver, I use:

URL: jdbc:sqlanywhere:DSN=<database>;Links=tcpip(host=<ip-address>;port=2638);
Driver: sybase.jdbc4.sqlanywhere.IDriver

This settings are based on my older thread about JDBC database connections. Read thread here if appropriate: http://sqlanywhere-forum.sap.com/questions/16414/jdbc-driver-for-oracle-data-modeler

Using following settings works with jconn3.jar on both platforms:

URL: jdbc:sybase:Tds:<ip-adress>:2638?ServiceName=<database>&CHARSET=utf8
Driver: com.sybase.jdbc3.jdbc.SybDriver

What settings and driver files are other people using? Where are they located?

I still have hope to get the native connection run. The motivation for me is that as far as I understood it is a (much) faster connection.

Regards, Robert


Loosing Connections to DataBaase

$
0
0

Good afternoon,

Starting about a month ago some users (random) of our application loose, a few times a day, the connection to the DataBase and they get a (S1000) error. We also have a few applications (agents) just manipulating data, e.g. inserting a row in a table from an xml file. Also these applications sometimes loose the connection. Did not find any logic in time, events a.s.o., it seems random. Personally I think this is a network issue, but i want to (must) exclude the DataBase as an option.

The Database (@@version 12.0.1.4155) is running on a dedicated Server (windows 2008 R2) Users run the application on Citrix The agents run a local application Number of connections ~450 Connection DataBase through ODBC

At this time wireshark is running on a client running an "agent". I can also run it on a citrix server?

Starting a DataBase trace from Sybase Central costs too much performance and i am afraid it won't show the actual error, because it is only tracing/logging "succesfull" requests?

Windows updates have been installed, but more settings have been changed within the network:-(

Moving the DataBase to a new server could be the solution, but any ideas on finding the cause? What must i do to exclude the DataBase, a successfull validition is scheduled weekly.... could it be memory or a lack of memory, consuming queries, too much connections???

Thanks in advance,

Marc

connection can not be opened

$
0
0

I am trying to connect sql anywhere12 database to my .net project but while connecting to the database but the connection can not be opened

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using iAnywhere.Data.SQLAnywhere;

namespace myproject1
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void btncon_Click(object sender, EventArgs e)
        {
         string connetionString = null;
         SAConnection connection = new SAConnection();
         SACommand command;
            //string sqla = null;
         connetionString = " ENG=demo12;UID=dba;PWD=sql;DBN=sql;LINKS=TCPIP";

         //  sqla = "INSERT INTO  Student(Rollnumber,Name) values('" + textBox1.Text + "','" + textBox2.Text + "')";
           // sqla = "SELECT * FROM Contacts";
            connection = new SAConnection(connetionString);
            try
            {
                connection.Open();
                command = new SACommand("SELECT * FROM Contacts", connection);
                command.ExecuteNonQuery();
                command.Dispose();
                connection.Close();
                MessageBox.Show(" ExecuteNonQuery in SqlCommand executed !!");
            }
            catch (Exception )
            {
                MessageBox.Show("Can not open connection ! ");
            }

        }

        private void Form1_Load(object sender, EventArgs e)
        {

        }
    }
}

please help me why this things are happening inside the program im just a beginner in sql anywhere

Drop connection on webrequest http with clr hangs complete db

$
0
0

Hi all,

We have the following situation : (running SQlAnywhere 17)

From device A we have a Webrequest to a webservice on sqlanywhere. In this webrequest we have a CLR call. For testing purposes this clr call is a very simple call which just returns the number 1. The webrequest has a http_session_timeout of 30 minutes. When we check sa_conn_info the request is listed. It remains there until the timeout. In process explorer we see that the clr environment is loaded. So far so good.

When we launch an interactive sql and try to do a drop connection on the connection above the complete database freezes. All connection attempts fail.

If we skip the CLR call in the webrequest all works fine.

We've been struggling with this problem for over a week now. Anyone experienced the same problem?

Connection A : Http request with CLR call Connection B : Drop connection A -> HANG

Has anyone a solution for this ?

Regards, Roel Schlijper

identify port

$
0
0

How do I find out what port I should connect with to a SQL Anywhere 17 database running on Linux 64 bit?

Assuming I have access to the database server and I can query any view?

ip address is not listed

$
0
0

Hi

I am attempting to create a TCP listener for an existing running database using SQL Central. The ip address for the machine is 10.11.12.17:

$ ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: enp0s3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 08:00:27:9a:55:ef brd ff:ff:ff:ff:ff:ff
    inet 10.11.12.17/24 brd 10.11.12.255 scope global enp0s3
       valid_lft forever preferred_lft forever
    inet6 fe80::a00:27ff:fe9a:55ef/64 scope link 
       valid_lft forever preferred_lft forever
$ cat hosts
127.0.0.1   localhost
10.11.12.17     sa

I can successfully ping the machine either as "ping sa" or "ping 10.11.12.17", but the IP address and host do not appear in the drop down when attempting to create a TCP listener using the SQL Central Listener wizard:

"Only the following address: 127.0.0.1 (localhost IPv4)"

Any suggestions of how they could appear?

Viewing all 98 articles
Browse latest View live


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