Hello,

I think this should be a basic task of a database, so it should be very answer to answer, but I found no way how to do it:

I had no chance to set up a database on computer1 so that user1 on computer2 can access this database. To test this I tried with Sybase Central to set up a database on computer1 and then to access this database with Sybase Central on computer2, but I didn't manage to get it work. I know MYSQL. There I specify a port and bind-adress. And for the user I specify the allowed hosts -> done. I expected that it is similar on sql anywhere, but I found no corresponding options. Also I found no step by step tutorial in the web and also the manual didn't help me. This is really strange, because for MYSQL the web is full of explanations. So please: Can someone here help me with this very basic task?

How do I set up a database for remote access in Sybase Central 6.1.0 step by step?

Thank you! Granni

asked 05 Aug '13, 12:59

Granni's gravatar image

Granni
60114
accept rate: 0%

edited 06 Aug '13, 04:41

Volker%20Barth's gravatar image

Volker Barth
29.6k294444650

1

It is a very good question, and it is ASTOUNDING to me that Sybase Central does not provide an explicit "start the database" menu option. I'm an old-school command-line guy so I hardly ever use Sybase Central... but one would think that at some point in its long history, a GUI tool like Sybase Central would have been put through a usability test by someone from the one single user demographic that MOST NEEDS a GUI tool... a newcomer to SQL Anywhere!

Apparently not... I spent ten minutes looking for it before I came to understand your frustration! [end rant]

(05 Aug '13, 17:44) Breck Carter
1

@Granni: I have felt free to reword the title a bit and to use different tags - as this is really a basic task and not related to SQL Remote or Remote Data Access. I hope this makes finding this very useful question easier - for other newcomers...

FWIW: Here's a doc topic on the same matter: * Connecting to a running database on another computer (Sybase Central or Interactive SQL)

If you have to use such network connections often, it's handy to define a ODBC DSN on the client computer that stores the chosen properties - cf. this doc topic.

(06 Aug '13, 03:25) Volker Barth

@Volker thanks for your tips. I tried now to start in command line like suggested in your link. Perhaps this is the problem: Starting gives an error. Do you see where the problem is? "Direct IO disabled"?

./dbsrv16 -n demo "/root/sybaseTest.db"

SQL Anywhere Network Server Version 16.0.0.1324 Developer edition, not licensed for deployment.

Copyright (c) 2013 SAP AG or an SAP affiliate company. All rights reserved. Use of this software is governed by the Sybase License Agreement. Refer to http://www.sybase.com/softwarelicenses.

Connection limit (licensed seats): 3 Processors detected: 1 Maximum number of processors the server will use: 1 physical processor(s), 1 core(s) This server is licensed to: Developer Edition Restricted Use Running Linux 3.4.47-2.38-desktop #1 SMP PREEMPT Fri May 31 20:17:40 UTC 2013 (3961086) on X86 (X86_64) Server built for X86 processor architecture Direct IO disabled for file '/root/sybaseTest.db' because the file system on which it resides does not support it 8928K of memory used for caching Minimum cache size: 8928K, maximum cache size: 1494584K Using a maximum page size of 2048 bytes Multiprogramming level: minimum:1, current:20, maximum:80 Automatic tuning of multiprogramming level is enabled Resource temporarily unavailable Database server shutdown due to startup error Database server stopped at Tue Aug 06 2013 09:49

(06 Aug '13, 03:45) Granni
Replies hidden

Hm, you're using Linux, and I'm not... - For SQL Anywhere 16, I hope the following link to run the sample database may be of help for Unix platforms:

http://dcx.sybase.com/index.html#sa160/en/dbadmin/da-dbconnections-unix-sample-db.html

If not, the chapter SQL Anywhere database connections should contain further information...

(06 Aug '13, 04:40) Volker Barth

"Resource temporarily unavailable" might be indicating a missing access authorization. You might try moving the database to another path or start the server with root privileges, if you didn't do that already.

(06 Aug '13, 08:00) Reimer Pods

Thanks Reimer, but I tried already as root

(06 Aug '13, 09:47) Granni

Which Linux distro and file system are you using? You may need to disable the write cache.

(06 Aug '13, 09:59) Mikel Rychliski
More comments hidden
showing 5 of 7 show all flat view

For the record, older versions of Sybase Central used a separate version numbering scheme. In this case Sybase Central 6.1.0 means "the Sybase Central that comes with SQL Anywhere 12".

What you want is a network connection, which has nothing to do with the topics "remote data access" or "sql remote"... those are different animals (they're cool, and you might have enjoyed reading about them if you weren't on a quest to get some actual work done).

Here goes; if this doesn't help, just ask more questions...

Step 1: Start your database on computer 1 using the Network Server (dbsrv12.exe) rather than the Personal Server (dbeng12.exe)... the two are functionally identical except dbsrv12.exe supports network connections (and some other minor differences).

Sadly, Sybase Central doesn't give you an explicit "start database" menu option. It only starts databases implicitly, via the "connect" process, and by default it uses the Personal Server.

Here's how to use the Sybase Central "connect" process to start the database with the network server...

Connections - Connect with SQL Anywhere 12, then fill in the dialog box as follows...

image1.jpg

...and click on Connect.

Two things will happen: the database will be started with the Network Server, and Sybase Central will connect to the database. To confirm, click right mouse - Properties on the "ddd" server icon in the left frame to see "Network server" instead of "Personal server"...

image2.jpg

Step 2: Over on computer 2, use Sybase Central to connect as follows...

image3.jpg

The server and database names both default to "ddd" because explicit overrides were not provided when the database was started. The host and port MIGHT be required if the network configuration is "interesting". The host is the ip or machine name running the server, and the port defaults to 2638, but will be different if multiple servers are started on the same computer.

permanent link

answered 05 Aug '13, 17:36

Breck%20Carter's gravatar image

Breck Carter
27.0k424582831
accept rate: 21%

edited 06 Aug '13, 03:17

Volker%20Barth's gravatar image

Volker Barth
29.6k294444650

Thank you for your very detailed answer. But I am sorry... it didn't work. Never thought it could be so hard to start a network server.

First I recognized that it is "dbsrv16" in my system. Then I tried to start as you suggested with "dbsrv16" in field "Start Line" -> no error message. I was happy, but when I looked at the properties like you told me, I saw: "Personal Server"... Arg. Ok, looked into manual for "Start Line" and tried to give the absolute path: "/opt/sqlanywhere16/bin32s/dbsrv16" -> no error message -> But in properties again: "Personal Server"

Have you an idea what could be wrong?

(06 Aug '13, 03:29) Granni

Please look at my answer to Volker in the comments. I got an error on direct start. Perhaps this is the problem. At all an error message would be cool.

(06 Aug '13, 03:46) Granni

IF SOMEONE WOULD BE KIND ENOUGH TO PROVIDE A LINUX TRANSLITERATION, WORLD PEACE WILL SURELY FOLLOW!


For the record, here is a set of Windows commands to create a database (dbinit), start it using the network server (dbsrv12 via dbspawn), and make two connections (dbisql). The first dbisql works locally, or from a nearby computer on the network. The second dbisql explicitly specifies the TCPIP parameters (the host happens to be localhost in this demonstration, and the weird port is the result of the dbsrv12 being the 3rd instance on the same computer). It also used DOBROADCAST=NONE to stop dbisql from hunting around for the server on other computers, if the HOST settings don't work.

"%SQLANY12%\bin32\dbinit.exe"^
  ddd12.db

"%SQLANY12%\bin32\dbspawn.exe"^
  -f "%SQLANY12%\bin32\dbsrv12.exe"^
  -o dbsrv12_log_ddd12.txt^
  -x tcpip^
  ddd12.db

"%SQLANY12%\bin32\dbisql.com"^
  -c "ENG=ddd12;DBN=ddd12;UID=dba;PWD=sql;CON=LocalConn;"

"%SQLANY12%\bin32\dbisql.com"^
  -c "ENG=ddd12;DBN=ddd12;UID=dba;PWD=sql;CON=NetworkConn;LINKS=TCPIP(HOST=localhost:49160;DOBROADCAST=NONE)"

PAUSE
permanent link

answered 06 Aug '13, 09:03

Breck%20Carter's gravatar image

Breck Carter
27.0k424582831
accept rate: 21%

Use the Services Tab on the right side in Sybase Central and create a Windows Service for your database server check the options of dbsrv... (easiest is to start it with -?)

check out the manual, a good starting point is here

permanent link

answered 06 Aug '13, 06:51

Martin's gravatar image

Martin
8.6k114149237
accept rate: 14%

edited 06 Aug '13, 06:53

1

Looks like this is Linux, not Windows, so there's no Services Tab ...

(06 Aug '13, 07:52) Reimer Pods
Replies hidden

Too bad for him ;-)

(06 Aug '13, 12:18) Martin
Your answer
toggle preview

Follow this question

By Email:

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

By RSS:

Answers

Answers and Comments

Markdown Basics

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

Question tags:

×194
×124
×101
×14

question asked: 05 Aug '13, 12:59

question was seen: 6,823 times

last updated: 06 Aug '13, 12:18