Thanks,
You tracked me down. SAS does not give any erros messages. I thought that it should give an error message if my schema database doesn't exist. I tried this in Oracle:
libname o oracle user=&user pw=&pw path=some_path dbprompt=no schema="not_existing_database";
No error messages in log though there is a typo in the database name. Why? Database queries to "existing_database" don't work, of course.
libname o oracle user=&user pw=&pw path=some_path dbprompt=no schema="existing_database";
No error messages in log. Database queries to "existing_database" work.
In SQL Server the following statement does not point libname SQL to "existing_database" and database queries to "existing_database" don't work. The actual LIBNAME statement does not give any error messages. The connection to the server succeeds, however.
LIBNAME SQL ODBC DSN="server" user=&user pw=&pw schema=existing_database;
35 LIBNAME SQL ODBC DSN="server" user=user pw=pw schema=existing_database;
NOTE: Libref SQL was successfully assigned as follows:
Engine: ODBC
Physical Name: existing_database
I couldn't get schema definition to function. I just must create a new data source (DSN) for every database by using Microsoft ODBC Administrator. It is not very handy while then I have many SQL Server drivers for one server connection. I thought that I could create only one data source in ODBC Administrator, define default database and use SAS schema definition to make queries to other databases.