In order to post questions, answers, or comments, you now need a validated email address. Details on how to validate your address are in the FAQ.

SQLAnywhere 10.0.1.4051, 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 May 10 '10 at 19:02

Jen's gravatar image

Jen
80235

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.

(May 10 '10 at 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"

(May 10 '10 at 19:33) Jen
1

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

(May 11 '10 at 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.

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

Are you providing an answer to the original question, or making a comment on the question or an answer? If you are making a comment please do not post a new answer. Click "Add new comment" on the question or answer instead. If you are responding to a previous comment, click on the "reply" icon (    ) for that comment.

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 (indent for sublists):
    1. Foo
    2. Bar
  • bullet list (indent for sublists):
    * Foo
    * Bar
  • to add a line break, add two spaces to where you would like the new line to be.
  • Code blocks should be indented by 4 spaces. SQL code should begin with ":::SQL" on the first line.
  • basic HTML tags are also supported

Tags:

×50
×37

Asked: May 10 '10 at 19:02

Seen: 1,743 times

Last updated: May 10 '10 at 19:02

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link: [text](http://url.com/ "title")
  • image: ![alt text](/path/img.jpg "title")
  • numbered list (indent for sublists):
    1. Foo
    2. Bar
  • bullet list (indent for sublists):
    * Foo
    * Bar
  • to add a line break, add two spaces to where you would like the new line to be.
  • Code blocks should be indented by 4 spaces. SQL code should begin with ":::SQL" on the first line.
  • basic HTML tags are also supported