Home > Forum > Data sources > Errors when using <Current BPS Connection>

Errors when using <Current BPS Connection>
0

After upgrade to version 2022.1.4.174 I get errors on some querries that use <Current BPS Connection>. Error occurs when querying another database directly or using join, etc from SQL COMMAND or choose field querry.
I found that this is related to change described in https://community.webcon.com/download/changelog/117?q=cf05b90, associated with using bps_user on SQL COMMANDS.

Is there any way to deal with it at SQL server level by proper configuration or should I change <Current BPS Connection> to configured connection to current database and this is the only way to get it works?
I have almost 3k querries that use <Current BPS Connection> and at least 600 that have joins and should be corrected :-/

Is there any drawbacks on using dedicated/configured connection vs <Current BPS Connection>?

Thanks for any suggestions.

MVP

Hi Jacek,

there was a time before the <Current BPS Connection> connection existed. It was introduced at some point and than the bps_user was introduced.
It's more secure but adds a little problem like the one you found.
I encountered the same message when trying to read data from a separate attachment database. Since it's a local user, it doesn't have access to the other database.

Options I found so far:
- Creating a view in the current database and grant permissions to it.
This is not really an option, I don't want to change the queries.

- Add Module signing
I have not really understood it. Maybe it creates a new object in the current database which is allowed to access data in another database. Regardless if this correct or not, the sql statement would need to be modified.
https://dba.stackexchange.com/questions/193259/access-view-based-on-table-in-another-database-without-account-in-that-other-dat

So I switch to an own database connection with a readonly sql user to the necessary databases. It's easier to switch the connection than to modify the query.
It may even be possible to change this with an update statement. But I haven't tested it.

Best regards,
Daniel