Questions tagged [logins]

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

Filter by
Sorted by
Tagged with
97
votes
2answers
234k views

Connect to SQL Server with Windows Authentication in a different domain

I am trying to connect to a remote SQL Server on a VPN in a different domain. When I enter the Server name on the SQL Server and choose Additional Connection Parameters to add some extra stuff needed ...
33
votes
3answers
85k views

The login already has an account under a different user name

When I execute this SQL: USE ASPState GO IF NOT EXISTS(SELECT * FROM sys.sysusers WHERE NAME = 'R2Server\AAOUser') CREATE USER [R2Server\AAOUser] FOR LOGIN [R2Server\AAOUser]; GO I get the following ...
25
votes
8answers
113k views

Login failed for user - Error 18456 - Severity 14, State 38

Message that SQL Server Log File Viewer shows: Login failed for user [User] Error: 18456, Severity: 14, State 38 What it actually means: Failed to open the explicitly specified database My ...
22
votes
8answers
84k views

A query that lists all mapped users for a given login

When looking at the properties of a particular login, it's possible to see a list of users mapped to that login: I profiled SQL Server Management Studio (SSMS) and I see that SSMS connects to every ...
16
votes
1answer
12k views

Does sys.sql_logins.is_policy_checked mean that the policy has been checked?

When I look in sys.sql_logins, I see a column called is_policy_checked. Can I trust that my password policy has been checked for all of the logins where this column value is 1?
15
votes
2answers
53k views

How can I map a login to a database using T-SQL (not SSMS)

I'm writing a program that requires me to assign all permissions and everything in code. I have gotten stuck in this part: I just want to do the equivalent of clicking the little box under "Map" for ...
14
votes
1answer
180k views

ODBC Data Source SQL Server Connection - Login Failed For User

I have moved my database from an SQL 2005 to a server with SQL 2008. I am now trying to create an ODBC Data Source. I am using "With SQL Server authentication using a login ID and password ...
13
votes
4answers
27k views

Logins aren't syncing across Availability Groups

We have 2 servers in an AlwaysOn group. While the user accounts within each synchronized database exist on both servers, the database instance level logins only exist on one of the servers. Ie ...
12
votes
6answers
5k 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) ...
12
votes
3answers
2k views

Determine whether mixed mode auth is enabled without logging in?

Is it possible in SQL Server to determine whether mixed mode authentication is enabled without logging on to SQL Server?
12
votes
1answer
64k views

Where are the username and password stored in postgresql?

I'm using the PostgreSQL database. In it I create users. So I want to know Where are the User name and Password stored? Whether the Password is stored as plain text or encrypted data? Whether root ...
11
votes
3answers
14k views

Is there a way to find out who changed the password for a login?

I am trying to find out who changed the password for a login in SQL Server 2008 R2. I have already checked default trace - and it does not log that event. The default trace will include these ...
10
votes
3answers
41k views

Cannot log in using SA with SQL Authentication

I can not log in to SQL Server 2008 using SQL Server authentication. I can only log in using Windows Authentication Mode. I chose only defaults while installing SQL Server 2008 R2.
9
votes
3answers
11k views

What would cause an orphaned ##MS_PolicyEventProcessingLogin##?

This morning I noticed my SQL Log was filling with the following message: The activated proc '[dbo].[sp_syspolicy_events_reader]' running on queue 'msdb.dbo.syspolicy_event_queue' output the ...
9
votes
2answers
3k views

enable query log for single database

I am having many database schema in mysql 5.6 server, now the problem over here is that I want to catch the queries for one schema only. I can not enable query log for entire server as one of my ...
8
votes
1answer
29k views

How to change the login for a database's dbo user?

I just finished a successful install of SQL Server 2014 Express, onto a domain-joined VM instance of Win8.1. During setup which I ran under DOMAIN\Admin I accepted the default configuration of adding ...
8
votes
4answers
11k views

SQL Server script to delete accounts no longer in Active Directory

We have a SQL Server 2000 that will shortly be migrated to SQL Server 2005. It has years of Windows Authentication accounts created that no longer exist in Active Directory, which prevent the Copy ...
8
votes
2answers
23k 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 -----------------------------...
7
votes
2answers
22k 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 ...
7
votes
3answers
3k views

Property class Length Annotation PersistedResolvableAnnotation

I am trying to deploy an ssdt project using sqlpackage.exe utility. I get the following error (in German): Fehler bei der Erstellung des Bereitstellungsplans. Die Bereitstellung kann nicht ...
7
votes
1answer
19k views

Sql Server Fix Users

I Create a user in my database with following command : CREATE USER Test WITHOUT LOGIN I created a login with the Test Name. I want to link Test user with Test Login. When I use following command :...
7
votes
1answer
23k views

NT SERVICE\SQLTELEMETRY User

I've noticed that SQL Server 2016 installations include a new default login called NT SERVICE\SQLTELEMETRY. I'm aware that for the free editions of SQL Server 2016 you agree in the license to allow ...
7
votes
1answer
8k views

How to link users and logins in an Availability Group?

I've got an Availability Group going and need to map some logins to database users on an active secondary replica. (Node2) Unfortunately, when I try to exec sp_change_users_login or alter user with ...
7
votes
2answers
9k views

Rebinding a SQL Server user to its login after a restore with this user

After performing a restore of a SQL Server (v12.0.2000) database, I figured that a user needs to be remapped to its login (this issue seems to be known as orphan users). And one of the simplest way to ...
6
votes
5answers
3k 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 ...
6
votes
1answer
21k views

How to lock a sql login after N unsuccessful login attempts

Consider I have login called sql_login. Can I lock sql_login login after 5 unsuccessful login attempts. When we create a login we can see there is option called password policy check the image. But ...
6
votes
3answers
59k views

script to show all the permissions for a table

inside my database I have a procedure called spGen2_tblIE_SchedProcess_Update. when I run this script select * from sys.objects where name = 'spGen2_tblIE_SchedProcess_Update' Inside the same ...
6
votes
1answer
983 views

Disable multiple logins in one step

Is there a way to disable multiple sql logins based on a set of users in a table? For example: ALTER LOGIN (Select userid from tbl_user) DISABLE;
6
votes
2answers
3k views

How to monitor history of database usage if login auditing is not enabled?

I have a number of databases on multiple servers that don't seem to be used any longer. I'd like to drop these databases, but I'm uncertain if they are actually in use. I can't find their owners, ...
6
votes
1answer
3k views

Azure: Many Failed Login Attempts Logged

I run a SQL Server on an Azure Virtual Machine. I have noticed in the Event Logs of the server lots of failed SQL Login attempts using a ton of different usernames (none of which exist): Login ...
6
votes
1answer
674 views

how to stop using sql server login credentials in a linked server?

I have a linked server based in Italy server_italia that connects to a server based in Oregon USA ORDB1 we are on different but trusted domains. The connection from server_italia to ORDB1 is made ...
6
votes
2answers
4k 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 ...
6
votes
2answers
7k views

How to change default database to all logins?

I'm bit new to SQL Server and I'm trying to script out Microsoft SQL Server (2005-2014) post installation activities and I got bit stuck on altering logins. Corporate policy states that none login ...
6
votes
4answers
12k views

T-SQL command to log in as a different user?

Is there a T-sql command, like the Oracle "Connect" which lets me change the user that I am logged in as?
6
votes
1answer
569 views

SQL Server - How does contained database user password expiration work?

I've recently started working with contained databases and I do not understand if/how contained database users have passwords that expire. MSDN documentation says they do - With a SQL Server login, ...
6
votes
1answer
8k views

How do you list all logins for Sql Azure?

What queries can I use to list all logins for a server and database in SQL Azure? I tried running select * from sys.sysusers but I'm guessing that's just showing the users
5
votes
3answers
444 views

SQL Server Logon Trigger Implications - are there any side effects possible in my scenario?

Some of developers on my team know passwords from SQL accounts that have extended permissions We would like to track and be alerted whenever any of developers are using any of those SQL accounts to ...
5
votes
3answers
3k views

Who is the person using a SQL login?

Is it possible to find out who used a SQL-Server login? Let's assume we suspect a person to abuse a SQL login that is supposed to be used by an application only to logon to SQL-Server. Is the domain ...
5
votes
2answers
14k views

Create a user with privileges to create users

For our software we need a MySQL user who is able to create other MySQL users. This is possible with the MySQL root user but we do not want to use the root user in our software application. Is there a ...
5
votes
1answer
79 views

What would cause newly restored SQL Databases to show tables, but display an 'Invalid Object' error when trying to view table data?

Problem: As an untrained and involuntary SQL DBA, I'm taking a set of SQL 2008R2 databases and restoring to a new SQL 2008R2 server in another environment. The restore process goes fine and gives no ...
5
votes
2answers
28k views

ORA-01017: invalid username/password;logon denied

There were other similar questions asked, but none that were able to tell me why I can't connect using a C# .NET web site I've stood up. While I know this forum is more for DBAs connecting to ...
5
votes
1answer
2k views

How to create a login and user that can only access one schema in one database

I have executed the following: USE [MyDatabase]; GO CREATE LOGIN [MyDomain\MyAccount] FROM WINDOWS WITH DEFAULT_DATABASE=[MyDatabase]; CREATE USER [MyDomain\MyAccount] FOR LOGIN [MyDomain\MyAccount]; ...
4
votes
3answers
2k views

How can I fix "Login failed for user sa" error in SQL Server?

I can access my databases through SQL Server Management Studio (SSMS) by using my Windows account no problem. I have two issues though: I want to enable sa and then try to log in using sa and the ...
4
votes
3answers
7k views

Login lifespan for password on SQL Server

What is the "lifespan" for a login with the option Enforce Password Expiration Enabled? Where can I find configuration/option to change the time?
4
votes
2answers
6k views

Handle expired SQL login's passwords in SQL Server

Is it possible to change the password for a login with an expired password using SQL Server Management Objects (SMO) programming? Many times during working hours I got this message from a production ...
4
votes
2answers
2k views

Why and how and where to use user without login

I've been trying to find why, how and where to use Users Without Login and I didn't find my exact question or anything that gets closer. Where I did my research (I also read other posts, saw Youtube ...
4
votes
2answers
722 views

Query to retrieve SQL Server login password length

I've been asked by corporate security to review our Azure SQL Databases and find out if there are any SQL Logins which have "short" passwords. I am not aware of a way to achieve this - I ...
4
votes
2answers
3k views

Why shouldn't a pre-hashed password be used with CREATE LOGIN all the time?

(For the purpose of this question, assume that I only need to support SQL Server 2008 and higher. Or to future-proof this question, let's say recent, current, and near-future versions.) The ...
4
votes
2answers
800 views

create sql server login for own domain account

I have a working SQL Server instance to administer. I do not have a SQL Server login and do not know any other logins. I do have a Windows domain login to the server as a local admin. How can I add ...
4
votes
2answers
1k views

SQL server Principal and Mirror logins and permissions Issue

In a mirroring setup where server A is my principal and server B is my mirror, I had some issues related to logins and permissions at the time of fail-over. During fail-over Server B became my ...

1
2 3 4 5
7