Tagged Questions

The tag has no wiki summary.

learn more… | top users | synonyms

1
vote
1answer
70 views

Copy SQL Logins and Permissions From One Server to Another

I need to duplicate all Logins and their associated database-level permissions from one server to another. I am using SQL Server 2008 R2 for Server A and SQL Server 2012 for Server B I am able to find ...
1
vote
1answer
60 views

Handling user logins while using a multiple schema design to support multi-tenancy

I'm creating a web application (in PHP and PostreSQL) that will be used by organisations and their staff and I want to use multiple schemas to support multi-tenancy. There will be one database and I ...
0
votes
0answers
268 views

Login failed for user 'x'. Reason: Could not find a login matching the name provided

I get this error Login failed for user '****'. Reason: Could not find a login matching the name provided. [CLIENT: 10.4.3.5] Right around 3 AM ish but the application connecting to sql server ...
1
vote
1answer
30 views

SQL Server Builtin Logins Migration

I am in the process of scripting existing SQL Server 2008R2 logins for migration to a new server instance. I see that the existing logins contain the below... Windows Groups: ...
3
votes
2answers
208 views

Database User not reported as orphaned after Windows login dropped

I have dropped a SQL Server Windows Login. I then ran the below code to check for orphaned database users. However, the database user corresponding to the dropped Windows login does not appear as an ...
1
vote
2answers
64 views

ownership of users

Two related questions: Using SQL Server 2012, how does one find out who/what owns a user, and how can you set the ownership for users, if at all? To add a couple of questions: 'how to' for both of ...
1
vote
2answers
5k 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 ...
1
vote
0answers
30 views

Querying number of tries since last successful log, checking IP as well as user

I asked this question before on stackoverflow, but it might fit better here, since it is mainly about database performance. The actual question With performance in mind, how would you go about ...
2
votes
1answer
201 views

Cannot Login to Fresh Installation of SQL Server 2012

I just deployed a fresh installation of SQL Server 2012 on a Windows Server 2012 Datacenter R2 environment. The installation completed with 0 warnings and 0 failures. During the installation I ...
1
vote
1answer
462 views

Why do connections to my database fail, but only sometimes?

I am having some trouble diagnosing the cause of a problem I am having with Microsoft SQL Server 2008 R2. There is an application written in C#.net that connects to the database. Occasionally the ...
1
vote
1answer
97 views

Create USER and LOGIN permissions

What permission should I give to a user or role so that it can Create Login or Create User in database.
3
votes
1answer
328 views

SQL Script to Drop old AD logins, Inactive SQL Logins and all related Users

Related Question: SQL Server script to delete accounts no longer in Active Directory Whilst the above question points out the rather handy sp_validatelogins procedure, i'd like to extend this ...
1
vote
1answer
89 views

What is the purpose of a user's default database?

As I understand it the default database is specified so that in case you don't specify one in the connection string, it will know where to start. Is this correct? I've never seen a connection string ...
1
vote
1answer
210 views

sp_setapprole and creating users / logins

We have set up SQL Server and our Application in such a way that an SQL Server login has … well no permissions when accessing the database using any tool, except our application. This is needed ...
4
votes
2answers
322 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 ...
0
votes
1answer
907 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 ...
2
votes
2answers
2k views

Unable to access sql database with login and password [closed]

I'm writing Windows Service in C# and inside of it I'm unable to connect to the database. This is the question I've asked recently: SqlException: Cannot open database "path\db.mdf" requested by the ...
2
votes
2answers
70 views

How to revert multiple impersonations?

When there are nested impersonations (as in exec as user = 'user1'; exec as user = 'user2'; exec as user = 'user1';), is there a way to revert all of them without having to use the revert command ...
1
vote
1answer
614 views

Mysql Getting Access denied for user 'root'@'localhost' (using password: YES) constantly in log

I have MonYog running and it is monitoring my DB Server. It gives me constant alerts that the number of refused connections has exceeded the threshold etc. Looking in the LySQL.Log I can see constant ...
1
vote
2answers
2k views

SQL Server db user mapped to windows login not in SQL Server logins

I am on a SQL Server 2008 where i login with DOMAIN\USER_A On my database i can see this login is mapped to the user dbo of that database. What i don't understand is that DOMAIN\USER_A is nowhere to ...
2
votes
1answer
582 views

Are passwordless logins like ##MS_SQLResourceSigningCertificate## , ##MS_AgentSigningCertificate## a vulnerability?

I'm new to MS SQL Server. Colleagues working in IT security, have run an scan showing come DB users with null password. Some of them are ( # included ) ##MS_SQLResourceSigningCertificate## ...
1
vote
0answers
149 views

how can Audit All Login To SQL Server BY ODBC Connection

I MAke Report By Access Form On SQL database I make ODBC Connection For login To Update the data From Database Now I want Audit All logins To know who make Update today Or who make Update Now ? ...
0
votes
1answer
1k views

Add user to sql server with the required permission

In my sql server express 2008 r2 i have about 15 login account. Now i want some about 5 users have full permission while some other 5 users with limited access to some database, and other users only ...
-1
votes
1answer
157 views

Back up my ASPNETDB

I want to back up my database but I got this error: Cannot open database "ASPNETDB" requested by the login. The login failed. Login failed for user 'My-laptop\user'. I'm using SQL Server Express ...
6
votes
1answer
6k 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 ...
3
votes
1answer
445 views

SQl Server 2008 R2 - sa can login but not access database

Up until this morning I had no problems accessing our database. This morning, something has changed and I can no longer access our database (called EMS_Main) using the sa login. I can log into the ...
6
votes
4answers
3k 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 ...
0
votes
2answers
347 views

Remote database connection problem?

I have two systems with Windows XP. I have installed SQL Server 2005 on a system and tried to use SQL Server Management Studio Express on both to use the database. I am able to use the database on ...
2
votes
2answers
375 views

How to login in database if we have lost password? [duplicate]

Possible Duplicate: gain admin access to sql express 2008 Is there any idea if we lost our password to login in database using sql express management studio? Is there any place where ...
4
votes
1answer
1k 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 ...
4
votes
1answer
25k 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 ...
5
votes
2answers
3k 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 ...
7
votes
1answer
9k 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 ...
4
votes
2answers
607 views

Integrated Security Success on Master, Fails on Other Database

I'm a bit perplexed as to why my connection string is selectively succeeding on the master database in SQL Server 2005. Here are the details of my app. Any ideas where to look? I'm clearly missing ...
6
votes
4answers
3k 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?