Replication Snapshot login failure - sql-server

I am attempting to run a snapshot for replication using the following settings.
-Publisher [CUST-5NSA] -PublisherDB [Ticketing] -Distributor [CUST-5NSA] -Publication [TicketingBase] -ReplicationType 2
-DistributorSecurityMode 1
When this runs I get the following error:
Connecting to Distributor CUST-5NSA The replication agent had
encountered an exception Source: Replication Exception Type:
Microsoft.SQLServer.Replication.ConnectionFailureException Exception
Message: Login failed for user 'CUST-5NSA\Administrator' Message Code:
18456
The strange thing is that the event viewer shows that the error is actually that the administrator account doesn't exist which is impossible since I can log in with it.
But even more important there is no setting that I can find that uses the administrator account for replication. We have another account that we use for all the replication settings.
Can anyone point to where this login is coming from?

Go to Replication/Local Publications. Right click on your publication and select Properties. In the Publication Properties dialog, from the left panel, select Agent Security.
Now you can check security settings of Snapshot Agent ( and also Log Reader Agent ) by clicking on the associated Security Settings button. After clicking that button, you see a dialog that by selecting 'Using the following SQL Server login', you can provide the credentials of a SQL Server account on the Publisher that has enough permissions to access the Publisher database or just select 'By impersonating the process account' to use Windows Authentication.

Related

Why does create a user fail

I have restored a database but the owner is 'dbo'; I wish to change the owner to 'dba'.
I have tried: sp_changedbowner dba,true; it run successfully but I can't login as dba.
I then tried:
open the database
expand security
right click, choose 'New', then choose 'User'
Entries Under General tab are:
User type is: SQL user with login
User name: dba
Login name: dba
Default schema -> left blank
I did NOT make any other entries on the remaining tabs.
When I click ok, I get this message:
TITLE: Microsoft SQL Server Management Studio
Create failed for User 'dba'. (Microsoft.SqlServer.Smo)
For help, click: https://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=16.100.47021.0&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Create+User&LinkId=20476
ADDITIONAL INFORMATION:
An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)
The login already has an account under a different user name. (Microsoft SQL Server, Error: 15063)
For help, click: https://docs.microsoft.com/sql/relational-databases/errors-events/mssqlserver-15063-database-engine-error
BUTTONS:
OK
I am confused by this message: "The login already has an account under a different user name.".
How do I resolve this?
Thanks
I tried to create a 'dba' user in the restored database but was unable to do so.
See above

Tombstone cleanup failed with the exception "The current operation could not be completed because the database is not provisioned for sync

Tombstone cleanup failed with the exception "The current operation could not be completed because the database is not provisioned for sync or you not have permissions to the sync configuration tables."
I got this Error while doing sync on Azure SQL database in Database Sync Group Action.
I solved this issue in the following way
Go to Your Database Sync Group Page, then follow these steps:
https://i.stack.imgur.com/VsI8g.png
"Click on Database"
https://i.stack.imgur.com/DeUcx.png
"Click on Hub Database"
https://i.stack.imgur.com/bqOnx.png
"Enter Your SQL Server Username and Password and Save"
Go to Your Database Sync Group Page, then follow the below steps:
1. Click on Database
2. Click on Hub Database
3. Enter Your SQL Server Username and Password and Save

SSRS Report run in Chrome isn't using Windows credentials

Our setup:
Server A is where the database lies that holds the report information.
Server B is where the report is saved.
The report uses a stored procedure that grabs data from the DB on Server A.
The report was designed with Microsoft SQL Server Report Builder (15.0.900.71).
The report's data source is set to use Windows credentials.
Users connect to a database by an AD group (lets call it the "everyone" group) for basic report reading. So even though we haven't created a login/user for each employee on the server/DB, this group should be handling that.
For the server, I gave the "everyone" group the public server role and for the user mapping I selected the option for the DB and gave it db_datareader and public roles.
For the securables I inserted the server name and selected the option for "Connect SQL".
For the DB,I gave this group the role db_datareader. I didn't give any securables or extended properties for this user.
I can't think of a time when we had this issue with a previous version of Report Builder (version 10.50.1600.1) and this is the only report that is giving this issue. Chrome keeps giving this error to the end user:
An error has occurred during report processing. (rsProcessingAborted)
Cannot create a connection to data source 'SQL01'.
(rsErrorOpeningConnection) Login failed for user 'NT
AUTHORITY\ANONYMOUS LOGON'.
It seems as though when making the report using the new version of Report Builder it isn't correctly passing the user's credentials. Is there something different that needs to be done for this new version of Report Builder or am I doing something wrong elsewhere?

SQL Server Management Studio - cannot log in with an account I know should work

Our business has just changed Active Directories and the domain changed, from "YMS" to "YMSNET". So I used to be able to log in with "YMS\tkol" and I can now log in with "YMSNET\tkol" (these usernames and domains are faked for the purpose of example), but when I log in as that now, I can't actually expand any of the databases or look at any of the tables, I can just see a list of the database names. When I try to expand a database in the UI it says "This database is not accessible (Object Explorer)."
Now I have another user, called "sqluser", and I keep trying to use that user to log in as well by changing the Authentication Method to SQL Server Authentication rather than Windows Authentication. But I get Microsoft SQL Server, Error: 4064
Now I know this sqluser user exists and the password is correct, because I can authenticate to the server and successfully interact with the tables from an external process on a separate computer on the same network (node.js, package mssql). And I used the query on the accepted answer on this question, and found my sqluser is there, with roles db_accessadmin, db_ddladmin, db_owner. And yet it still won't let me log in with that user in the SQL Server Management Studio UI
How can I get this working again and log in with my sqluser account? Or add the appropriate permissions for my YMSNET\tkol account?
--- edit ---
My first idea is that, because I can log into the UI with YMSNET\tkol, but I can interact with the databases externally with sqluser, that there is some query or command I can run with sqluser that will add permissions for YMSNET\tkol so that that user can now look at all the databases and tables. I don't know which commands I'd run for that.
It can be because your account's default database is mapped to some another db which is not available for you, for instance, you have no permissions there, or that database not exists anymore etc.
Your organization DBA can fix it by:
ALTER LOGIN [sqluser] WITH DEFAULT_DATABASE = [rightDB]
Default db name can be checked by:
select default_database_name from sys.server_principals
where name = 'sqluser'
This property can be overridden by opening "Options" of SSMS connection window and specifying it explicitly:

SQL SSAS - Deploying error

When I start deploying, I get this error:
Internal error: The operation terminated unsuccessfully.
Errors in the high-level relational engine. The database operation was cancelled because of an earlier failure.
Errors in the OLAP storage engine: An error occurred while the dimension, with the ID of 'Dim Customer', Name of 'Customer' was being processed.
OLE DB error: OLE DB or ODBC error: Login failed for user 'NT Service\MSSQLServerOLAPService'.; 28000; Cannot open database
"AdventureWorksDW2012" requested by the login. The login failed.; 42000.
What's wrong? and how can I fix it?
Had the same problem and Daniel's Meresa answer was helpful. The detailed resolution in may case was to run SQL Management Studio and in Object Explorer select Security - Logins - Right click - "New Login...". Fill in the following login name "NT Service\MSSQLServerOLAPService" and check sysadmin in Server Roles. It should be enough.
The error says, you need to add 'NT Service\MSSQLServerOLAPService' user to "AdventureWorksDW2012" database. You can do this in SSMS. Connect to your "AdventureWorksDW2012" database. Under Security-> User, add new user 'NT Service\MSSQLServerOLAPService' with db_datareader, db_owner(Optional) property [Membership, Owned_Schemas tab]
Have a look at the impersonation options on the data source you defined in analysis services that holds the source data of the customer dimension. There you can configure what credentials SSAS should use to connect to the data source.
MSDN entry on impersonation options
make sure you add the user 'NT Service\MSSQLServerOLAPService' into the database and assign the appropriate role read...also make sure to select use service account option under impersonation option in the cube source.

Resources