Please be aware that the content in SAP SQL Anywhere Forum will be migrated to the SAP Community in June and this forum will be retired.

Using ASA

I have the following setup:

  • pc1
  • myServer1 (dbsrv16)
    • test1.db
    • ....
    • testN.db
  • pc2
  • myServer2
    • testMain.db

I am trying to create an event on testMain.db in myServer2 that connects to myServer1, calls sa_db_info() and then does something with that information. I have been able to create a remote server that connects to the test1.db on myServer1 and also calls the sa_db_info(). What I would like to do is to connect to the utility_db, instead of connecting to test1.db (as I am not sure test1.db will always be there).

myServer1 is started with "-su sql" so a password for accessing the utility_db is set.

If I create the server like this:

CREATE SERVER "Test1Remote" 
USING 'DRIVER=SQL Anywhere Native;UID=dba;PWD=sql;Server=myServer1;DBN=test1;ASTART=No;host=myhost1:2638' 

The test connection from Sybase Central works.

If I create the server like this:

CREATE SERVER "Utility_dbRemote" 
USING 'DRIVER=SQL Anywhere Native;UID=dba;PWD=sql;Server=myServer1;DBN=utility_db;ASTART=No;host=myhost1:2638' 

I am getting an error when I test the connection from Sybase Central:

[Sybase][ODBC Driver][SQL Anywhere]Server 'Utility_dbRemote': [Sybase][ODBC Driver][SQL Anywhere]Permission denied: you do not have permission to execute a statement of this type
SQL Statement: SELECT FIRST table_name FROM dbo.sp_remote_tables( 'Test1Remote', NULL, NULL, NULL, 1 ) ORDER BY 1

What do I need to do to make this work?

asked 06 Mar '15, 06:14

Christian%20Hamers's gravatar image

Christian Ha...
accept rate: 42%

You cannot make it work because SELECT ... FROM is not one of the allowed statements for the utility database.

The underlying reason is this: There is no physical database associated with the "utility database", and without a physical database you don't have any stored procedures or tables.

However, the answer to your question "How to create remote server to utility_db" is this: You have already created the remote server, and it works, otherwise you wouldn't be getting that error message.

permanent link

answered 06 Mar '15, 07:52

Breck%20Carter's gravatar image

Breck Carter
accept rate: 20%

edited 06 Mar '15, 07:55

Your answer
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]( "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: 06 Mar '15, 06:14

question was seen: 1,986 times

last updated: 06 Mar '15, 07:55