tl;dr: This is a minor bug report for Kamailio, and regarding access to SQL Azure, I'd be happy to finance an Azure SQL database for testing if desired.


The issue is about assumed behavior within the DB_UNIXODBC module.

The behavior in Azure SQL that is atypical, because trying to issue a USE query gives the following error:

USE statement is not supported to switch between databases. Use a new connection to connect to a different database.

I think @nakchak may be using an Azure SQL Server (managed instance) vs an Azure SQL Database (single database). Here's my attempt and error trying to assign a default DB to a login in my Azure database:

Query:

Alter login kamailioRoTest  with default_database = ops-qa-sqldir1

Error:

Keyword or statement option 'default_database' is not supported in this version of SQL Server.

From a purely functional standpoint (i.e. to get Kamailio working with the Azure DB), the solution is to specify the database in the connection string (see the ODBC.ini example in my original post). The request is to have an option to just have the module use the default DB from the connection and not attempt to change to the DB once connected.

Think of it like the following if using MySQL:

bash > mysql -D kamailio
mysql > USE kamailoio;

The second line is superfluous (but not problematic).

For DB_UNIXODBC, setting the DB in the ODBC string WORKS currently. It just clutters the log with errors. Thus, the bug report is not critical.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.