Open mohamednazar opened 6 years ago
I am almost certain this has nothing to do with TinyTDS but rather the permissions of the user in the database. For example, connecting as sa
would almost certainly work. You will need to make sure the user that you are connecting with has the permissions needed to do the SQL/DDL required.
Environment
Operating System
Windows 2016
TinyTDS Version and Information
Gem Version
PS C:\opscode\chef\embedded\bin> .\gem --version 2.6.11
Description
I am executing a sql query using tiny_tds, the query executing fine if I manually execute and not when execute via chef-client this issue is not permanent and sometimes same query is working and sometimes not. I am unable to find what causing the issue.
Below is the various kind of errors:
Error1:
TinyTds::Error: ruby_block[Model-DB-Recovery-Simple] (SqlServer::Model-DB line 20) had an error: TinyTds::Error: User does not have permission to alter database 'model', the database does not exist, or the database is not in a state that allows access checks.
Error2:
[2018-06-05T18:37:55+00:00] FATAL: TinyTds::Error: ruby_block[Additional_Configuration] (SqlServer::Additional_Configuration line 20) had an error: TinyTds::Error: User does not have permission to perform this action.
In both error it says "User does not have permission to perform this action." In same time other queries working via tiny_tds. Please help me to resolve it.
Regards, Mohamed Nazar