on 2015 Mar 06 6:14 AM
Using ASA 16.0.0.2076
I have the following setup:
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" CLASS 'SAODBC' USING 'DRIVER=SQL Anywhere Native;UID=dba;PWD=sql;Server=myServer1;DBN=test1;ASTART=No;host=myhost1:2638' READ ONLY;
The test connection from Sybase Central works.
If I create the server like this:
CREATE SERVER "Utility_dbRemote" CLASS 'SAODBC' USING 'DRIVER=SQL Anywhere Native;UID=dba;PWD=sql;Server=myServer1;DBN=utility_db;ASTART=No;host=myhost1:2638' READ ONLY;
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 SQLCODE: -660 SQLSTATE: HY000 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?
Request clarification before answering.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
52 | |
8 | |
5 | |
5 | |
5 | |
5 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.