Tag: MSSQL

MS SQL security audit: list all users and their permissions

When you need to find out your DB users and their permissions on DB objects use the following query to list all MS SQL users and their permissions on databases and views and get a report:

Continue reading

How to check permissions in Reporting Services programmatically

get-all-permissions-SQL-reporting-services

One day we found that we need to check users and groups permissions on SQL Reporting Services to understand who has access to what. So the next question is how to get all permissions in SQL Reporting Services programmatically and possibly export them to Excel for future analysis. After some time searching I ended up …

Continue reading

MSSQL Server Error 67 and 17 SQL Server does not exist or access denied

We are running Windows SQL Server 2016 Enterprise on Windows Server 2016. The server has an instance with databases in Always On High Availability group. People connect to the instance mostly from MS Access and MS Excel applications and from time to time they experience the following error: ————————— Microsoft SQL Server Login ————————— Connection …

Continue reading

MSSQL Error – Access to the remote server is denied because the current security context is not trusted

mssql-error-access-to-the-remote-server-is-denied-because-the-current-security-context-is-not-trusted

When trying to load data from  database that is in AlwaysOn High Availability Group from Microsoft Excel the following error occurs: Access to the remote server is denied because the current security context is not trusted

Continue reading

SQL Error – The database owner SID recorded in the master database differs from the database owner SID

When trying to execute Stored Procedures on a particular Database we got the following error: The server principal “domain\user” is not able to access the database “dbXYZ” under the current security context. The database owner SID recorded in the master database differs from the database owner SID recorded in database ‘dbXYZ’. You should correct this …

Continue reading

odbc_log: Unable to retrieve database handle. CDR failed.

I correctly configured ODBC connection on Asterisk server to MSSQL database in Always On cluster. The working configuration was as follows:

Continue reading

SQL SSRS change certificate binding error

show-add-delete-ssl-bindings

While deploying SQL Reporting Services I got the following error: Create certificate binding. We were unable to create the certificate binding.

Continue reading

The target principal name is incorrect. Cannot generate SSPI context.

It is a good practice to use a domain or service account to run the SQL service. However, once you do the right thing and change the SQL Service account, you may start getting the following error message when attempting to connect to the sql server: “The target principal name is incorrect.  Cannot generate SSPI …

Continue reading

Skype for Business. Move Central Management Store

add-database-to-high-availability-group

There is a need to move Central Management Server to a new pool as the existing one is going to be decommissioned. SQL Backend consists of two MSSQL 2014 Servers running in AlwaysOn Cluster. While running Move-CsManagementServer commandlet with –WhatIf key I got an error: Cannot move Central Management Server. The new Central Management Store …

Continue reading