SQLAnywhere, Windows XP

I have two databases running under the same database server, and I am attempting to set up a remote server with a proxy table. Both databases have matching users and passwords set up in them. (For reference, db where I'm doing the setup is data-dashboard, db I am trying to see data on is data-warehouse)

In the data-dashboard warehouse, I set up a remote server named "remoteWarehouse" in Sybase Central as read-only, SQL Anywhere, JDBC connectivity with connection info "localhost:2638/data-warehouse" (I also tried this without specifying the other database name at the end). I also tried setting it up as an ODBC data source using my system DSN: "DSN=data_warehouse_webCentral". In both cases, when I press the "Test Connection" button it reports that the connection is successful (but either way, later in the process I get the same error I detail below).

Then I set up a proxy table to go with it. I opened the properties of this table and went to the "Miscellaneous" tab, just to see whether it could see how many rows were in the table. When I press the Calculate button, this is the error I get:

"The table's row count could not be obtained from the database. Server 'remoteWarehouse': [Sybase][ODBC Driver][SQL Anywhere]Syntax error near '-' on line 1 [Sybase][ODBC Driver][SQL Anywhere]Server 'remoteWarehouse': [Sybase][ODBC Driver][SQL Anywhere]Syntax error near '-' on line 1 SQLCODE: -660 SQLSTATE: HY000 SQL Statement: SELECT COUNT(*) FROM "dba"."inventory_item_setup_dimension_proxy"

I also get this error for any other type of query I do, whether in ISQL or in some Java code. In each case I can clearly see there that there aren't any '-' characters in my query. When I look at the "remote location" it says "remoteWarehouse;data-warehouse;dba;inventory_item_dimension"

Since there is a hyphen in the remote database name (data-warehouse), could there be a bug handling hyphens in database names? Should I be looking somewhere different for the problem?

asked 10 May '10, 19:02

Jen's gravatar image

accept rate: 0%

Just wanted to add that setting up another remote server to a database that does not have a hyphen in its name works fine for me and I can both see the rowcount from "Miscellaneous" and query its data elsewhere without error.

(10 May '10, 19:22) Jen

Hmmm, actually, now I'm wondering if this is a bug in the wizard or I misunderstood what I was doing. When I use the statement "CREATE SERVER remoteWarehouse CLASS 'saodbc' USING 'driver=SQL Anywhere 10;dbn=data-warehouse';" my remote server and resulting proxy tables work just fine. The "location" property of the proxy table is different, though; it looks like "remoteWarehouse;;dba;inventory_item_dimension"

(10 May '10, 19:33) Jen

Have you tried trapping the SQL generated with request level locking and seeing if its not being constructed properly?

(11 May '10, 12:05) Justin Willey

Another attempt to "debug" remote access is to use the cis_option database option, cf. http://dcx.sybase.com/1101en/dbadmin_en11/dboptions-s-5821452.html. I.e. you use something like "SET OPTION PUBLIC.CIS_OPTION = 7" and then check the server log file ("-o Filename") for further messages.

(11 May '10, 14:17) Volker Barth
Be the first one to answer this question!
toggle preview

Follow this question

By Email:

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



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:


question asked: 10 May '10, 19:02

question was seen: 7,031 times

last updated: 10 May '10, 19:02