Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [logins]

For questions about login credentials and accounts used to access a database resource, typically at the server or instance level.

2
votes
1answer
27 views

How to get the SQL-server login name of an integrated security account?

Let's say I'm a user in windows domain DC (DataCenter). My user-name is DC\Somebody I'm in group DC\Developers Now SQL-Server has the login group called DC\Developers, and with that, I can login on ...
0
votes
1answer
25 views

Mapping an MSSQL Login to the secondary replica in a High Availability Group

I'm trying to map a login to a user in a database on the secondary replica of a two node High Availability group. Obviously this fails since the replica is offline. Is there a way for me to create ...
0
votes
2answers
29 views

sql server: get all the databases in which a login is being used

I'm creating a few migration scripts to generate a sql server database from scratch. In my '0005-create_login.up.sql' script I have something like: CREATE LOGIN [mylogin] WITH PASSWORD=N'xxx=', GO ...
1
vote
1answer
42 views

Delete orphaned SQL Users

I have a Microsoft SQL Server that had a database called SQLDATABASE. It also had a user called SQLUSER. The SQLDATABASE was deleted but not SQLUSER. SQLUSER only belonged to SQLDATABASE. I want to ...
0
votes
1answer
83 views

Cannot open database “dbname” requested by login.The login failed.Login failed for user 'DOMAIN\Windowsusername'

I had a database which i dropped using the below command. USE master; GO ALTER DATABASE dbname SET SINGLE_USER WITH ROLLBACK IMMEDIATE; GO DROP DATABASE dbname; Now when i refresh the connection in ...
1
vote
1answer
31 views

Server Principal SID showing as NULL and name as empty string

In my SQL Server 2016 server,i set up a user logins Audit for Login successful and Login Failed action. Here is the script. USE [master] GO CREATE SERVER AUDIT SPECIFICATION [...
0
votes
0answers
16 views

SQL Server login accounts while configuring SQL Server Reporting Services

I configured reporting server in a new app server for my .NET application and, since I am new, I looked at the old app server reporting service config and did the work. So after installation, I ...
0
votes
2answers
97 views

User and login mapping after an SQL Server restore

I need to restore a DB from an SQL Server instance to another and I am well aware that the DB users will be transferred but the logins won't. I have created a script to be able to create the logins on ...
0
votes
1answer
128 views

Login failed for user NT AUTHORITY\IUSR

I have some developer colleagues in my office that are having a problem similar to this one: db connection uses an anonymous logon instead of the domain user the connection string (he is working on ...
0
votes
0answers
22 views

Can I enable Login when I can't connect to the instance? [duplicate]

I have a cloned a customer machine to a Virtual machine. I had access from my code (SqlConnection) to the database through a database-Login where I could use window autentication. I disabled my ...
0
votes
1answer
62 views

How do I add a directory, or bulk, of users to Microsoft SQL Server permissions

I have a front end program in Visual Basic that is using SQL Server as a "back end". The only way I can get permission for login to use the SQL server is by adding each name or computer individually ...
0
votes
0answers
43 views

init_connect not executing

From this question I was able to make my init_connect = "CALL mydb.Warnings()", but a user login in does not triggers the SP. the SP is like: CREATE DEFINER=`root`@`localhost` PROCEDURE `Warnings`...
1
vote
2answers
62 views

Default phpMyAdmin Login Credentials

I downloaded and installed phpMyAdmin 4.8.5 on my windows. Upon opening it in the browser, it immediately asks for a Username and Password. I tried to submit root for username while leaving the ...
0
votes
1answer
37 views

How to use 'mysql -uroot -pXXXX' on Debain 9.8?

My apologies for this lame question. Debian 9.8 changed some things and mysql is broke but I can't seem to fix it. I installed MySQL on Debian 9.8, which now installs MariaDB 10.1. After install I ...
0
votes
1answer
47 views

how to get complementary information from sp_readerrorlog

when auditing what are the failing logins in one of my server, using the sp_readerrorlog procedure I get the following result, when running the following query: EXEC sp_readerrorlog 0, 1, 'Login ...
10
votes
5answers
2k views

How to deny access to SQL Server to certain login over SSMS, but allow over .Net SqlClient Data Provider

We have a situation where Developers do not have any UPDATE permissions, BUT they work with applications and see connection strings -> they know passwords from some SQL accounts (example SQLLogin1) ...
0
votes
1answer
68 views

Naming Convention for Login, User and Roles? [closed]

What are the Naming Conventions for a Login, A database User and a Database role? Is there any best practice to follow?
0
votes
0answers
29 views

SQL Server login error while revalidating the login on the connection [duplicate]

Recently we started seeing the below error in our environment. Failed to open the database ‘XXXX’ configured in the login object while revalidating the login on the connection. Any suggestions?
4
votes
3answers
202 views

Create login with SID as string

I'm trying to create a login as follows: CREATE LOGIN [Test] WITH PASSWORD='Test123', SID=SID_BINARY(N'S-1-5-21-408552231-458724953-3089381293-513') But no matter what it looks like SID only accepts ...
1
vote
1answer
71 views

Privileges on SQL Server

I come from Oracle Database and now I am trying learn SQL Server and I don't undestand why may I viewer others databases, like the master for example, with a common user without privileges in this ...
1
vote
1answer
74 views

Connecting to SQL Express Server 2017 with SQL Server Authentication Remotely

I have two systems that are on the same network. I am able to ping back and forth between these systems with their IP address and with their system names. I have enabled the TCP port 1433 inbound and ...
-2
votes
3answers
61 views

Determine which data a SQL login account has access to?

I am a new DBA and am trying to do some documentation on the SQL estate that I am responsible for. Currently I have no documentation on anything so this is all from scratch. I am hoping to find out if ...
1
vote
1answer
503 views

Oracle - Can't login with “/ as sysdba”, but can with “sys as sysdba”

I've been working on setting up a docker container running Oracle DB XE 18.4.0. I have the container built from Oracle's dockerfiles and it is working fine, except that I cannot login using connect / ...
1
vote
1answer
49 views

Query of sys.login_token doesn't include particular windows group while connect within workgroup

I had two SQL Server Logins which correspond to two windows groups: MachineName\MyAppAmdin MachineName\MyAppUser And I use select principal_id, name, [type], usage from sys.login_token where ...
5
votes
5answers
266 views

How to tell which windows group login I used when logging in via windows authentication

I created two SQL Server Logins which correspond to two windows groups: MachineName\MyAppAmdin MachineName\MyAppUser Then in the database, I created two users with the same name and mapped them to ...
1
vote
0answers
445 views

Switching users in PgAdmin

I'm looking for a way to enable switching between users in pgAdmin 4. I'm aware of the possibilty to change user from the properties-dialog before connecting. However this isn't useful when I'm ...
2
votes
2answers
417 views

Pass data from a table row into a create login statement using dynamicSQL [closed]

I have a lab exercise that involves creating a script that uses dynamic SQL and a cursor to loop through each row of a table and then create a loginID and more. We've done NO work concerning cursors/...
2
votes
1answer
157 views

SQL Server - Remove all logins that they are asossiated with orphan users

I have an SQL Server 2008R2 that had lots of databases. The procedure was that a logins were created and users were mapped to databases. Most of these databases have been removed from the server ...
1
vote
0answers
23 views

Unlink Windows login from database user in SQL Server contained database

I'm migrating databases from SQL Server 2012 to Server Server 2017, and switching SOME of them to partially contained. I've done SQL Server backups and restores to actually move the databases, and ...
1
vote
1answer
87 views

The current security context cannot be reverted

Msg 15199, Level 16, State 1, Line 29 T he current security context cannot be reverted. Please switch to the original database where Execute As was called and try it again. execute as login=...
2
votes
1answer
2k views

Logon failed for login due to trigger execution

I have been trying to login using one of my sql server logins but I am getting the error message below: General Error Message Copy Message Text TITLE: Connect to Server -----------------------------...
3
votes
1answer
513 views

How to script out the grant view on login permission?

I create the following login without any permissions. USE [master] GO IF NOT EXISTS (SELECT * FROM sys.server_principals WHERE name = N'Radhe') CREATE LOGIN [Radhe] WITH PASSWORD=N'...
1
vote
1answer
41 views

Changing the “default database” opton in login

I am looking for a way to change the option of "default database" to master for all the logins on my instance from current user database in order to maintain the consistency. Application code logins ...
4
votes
2answers
645 views

Azure SQL Server Database Error: 18456, Severity: 14, State: 1

Why can't I login to my SQL Server database on Azure, and how do I correct this? No one in our company has changed the password of our Azure SQL Server database administrator user, yet I'm getting the ...
2
votes
3answers
80 views

Cleaning up specific domain logins on about 50 servers and therefore the users

There is a specific need to clean up logins from the SQL Servers after migration from one domain say abc to new domain foo. After migration as we still have those old logins and users under naming of ...
1
vote
1answer
210 views

Cannot add Network Service as User/Login

I want to setup ProGet on a 2016 server with SQL Express and IIS. Both the service and IIS web runs under the Network Service user. None seem to be able to access the Database on a local SQL Express ...
0
votes
1answer
89 views

Is Query Slower When There Are More Columns in one Table?

I'm trying to build a login function and was wondering: Does more columns in a table mean the longer (and slower) the query takes to return a result? I'm asking because I'm debating on whether to ...
1
vote
0answers
22 views

Ideal and Efficient Way of Handling User Logins with Multiple Types (i.e. Employee, Client, etc.)?

I'm developing a database where I will have two types of users: Employee and Client. I'm thinking it would be ideal to just have one big USERS TABLE with a user_ID as PK and Type column to ...
2
votes
2answers
2k views

SQL Server Error while creating User

I tried creating a user with all privileges but I am getting this error: Microsoft SQL Server Management Studio Create failed for User 'Hru'. (Microsoft.SqlServer.Smo) Additional ...
2
votes
3answers
1k views

Login lacks connect endpoint permission in SQL Server - Error 18456, State: 149

I have a fresh database I've setup, which I can connect to and perform operations like normal via the SQL Server Management Studio. I have two accounts I created for my application to use, and both ...
0
votes
1answer
204 views

SSIS Transfer Login Task Error

I have created an SSIS Transfer Logins Task. I have selected the SourceConnection and DestinationConnection and both valid and active. I have selected certain Windows group accounts to transfer ...
3
votes
1answer
96 views

Get notified when user with administrative privileges logs in

I have less than a handful of users that have sysadmin role membership. I would like to be notified (emailed) when one of them logs in. Is creating a trigger the best way or is there some kind of ...
0
votes
3answers
721 views

How to Audit Successful Logins for certain logins only?

I need to setup auditing (logging) of successful logins on SQL Server (date, time, who), not for all logins on a server, but only for a small group of logins (developers) In short, me only ...
1
vote
3answers
764 views

help in connecting the sql server 2017 developer edition

I have installed the sql server 2017 for non production environment in my PC. It has installed successfully. when connect using sqlcmd it was throwing an error login failed for login sa. it didn't ...
0
votes
0answers
229 views

Error authenticating proxy

I'm trying to schedule an SSIS packages through SQL Server Agent and am aware that a proxy account may need to be created to simulate an AD user with the relevant permissions to access any given file. ...
2
votes
2answers
245 views

Unable to connect to localhost with mysql utilities

I installed mysql utilities on my ubuntu server today, so I could use mysqldbcompare, but I just cannot connect to the mysql server with it (localhost). I created an entry into the .mylogin.cnf, using ...
0
votes
1answer
26 views

Preserving existing logins during database refresh

I am trying to do database refresh within Sql server 2014 instances from lower env to production for making it to golive. All the required logins exist on current prod and as far as I understand while ...
0
votes
1answer
1k views

The SELECT permission was denied on the object 'configurations', database 'mssqlsystemresource', schema 'sys' (Error 229)

Window account is getting the below error when trying to connect into the SQL instance via management studio 2014. The SELECT permission was denied on the object 'configurations', database '...
0
votes
0answers
15 views

One of the DB Roles Not Showing Up Under A Login

Upon a request that I received, I have queried out the all the database roles under a particular login. To make sure that the result is correct, I opened up that particular login and went over to ...
0
votes
0answers
914 views

Login failed for user '<mysqllogin>'. Reason: Failed to open the explicitly specified database. [CLIENT: <local machine>] issues

Over the last 10 days or so, I've started to get 'Login failed for user ''. Reason: Failed to open the explicitly specified database. [CLIENT: ]' entries nearly every 5 mins in my SQL 2008 logs and I ...