Unable to use the different domain credentials in SSMS - sql-server

I can't change the username in the SQL Server Management Studio. It's pointing automatically to my last used username and disabled. Any help would be appreciated

No, you can't change the user name when you select 'Windows Authentication'. It always defaults to the currently logged in user or the security context of the user under which the program is executed.
So, if you want to use another user credential then use the 'Run As different User' option when opening the SSMS. If you right click on the SSMS shortcut you will get this option.

It's pointing automatically to my last used username and disabled. Any help would be appreciated
There is nothing wrong in that, as mentioned in comments, you could only change the user when you change authentication type to SQL Server authentication. If you insist to change the user in Windows Authentication, hold the Shift (in your keyboard) and right-click on SSMS (shortcut), then choose Run as different user

Related

Get windows user from connection string

For a trigger in SQL Server 2008R2 I need to know the user who inserted, updated or deleted the record.
As different users log in with the same connection string I do not know who is really logged in to the server (I use SQL authentication with the same UID and I grant access through the Access database!!).
I would like if possible to add a variable to the connection string such as Application Name=myrealusername but it seems that from Access VBA I cannot add this Parameter.
Does anyone know how to retrieve the real username who's logged in to pass the username to the trigger?
You could try recording the HOST_NAME() to capture the instance the query was executed from. If every user has it's own PC, it's probably one of your best guesses if you don't plan on using Windows Authentication.
More details: HOST_NAME() MSDN Documentation
Obviously the only real solution would be to use Windows Authentication.
You can use windows authentication and try using
select suser_name()

Why won't SQL Server allow creation of a user with SQL Server Authentication?

I've get a fresh install of SQL Server 2012 and do not want to use integrated security. Instead I'd like to use SQL Server authentication, where I create logins in SQL server and assign passwords. However, this option doesn't seem to be available (see screen snapshot below). Every option available to me under "User Type" (other than those that aren't related to accounts at all) want me to map to existing Windows Domain accounts.
In the old days, I'd specify a desired login name and be prompted for a password to go along with it, and I'd be done. Now there's no option to specify a password--I'm forced to map my new login to an existing
windows domain account. Not what I want. What am I missing here? Thanks in advance.
** edit ** New screen snapshots added after RB's comment. I did indeed have an option disabled that would allow BOTH Windows and SQL Server authentication modes, but it's turned on now. After doing so and restarting SQL Server, it is NOT making a difference:
Here is what I am presented with when I try to create a new user. None of these options simply allow me to create a login and password in the context of SQL server (well, one allows creation of a login with no password at all... useless!) All others are linked to existing Windows logins. Ideas?
Let's do this in a way that doesn't require pictures and right-clicking.
CREATE LOGIN [yourUserName] WITH PASSWORD = 'someStrongPassword';
CREATE USER [yourUserName];

How do I sign into the SQL Management area on Azure?

I have created a new SQL Server on Azure, and am trying to sign into their web based Management area.
What credentials do I need to provide?
I created the Database using the Quick Create wizard, and was never asked for a password.
I have tried my Windows Live username and password, this doesn't work. I have also tried the username specified in the connection string you get from Azure with and without the #foo you get afterwards, along with my Live ID password, neither of these work either.
I can't see anything in the portal providing a password.
Am I missing something?
Go to the DB tab and select the DB server that was auto-created. Will have some random letters and numbers as a name.
On the dashboard of the server you should be able to reset the administrator password. On that page it should also give you the administrator login username.
Hope that helps,
Henry
edit: one other thing, you need to add your IP address as a management address. You can do this by going to the DB tab and clicking MANAGE at the bottom, should prompt you to add your IP to the firewall
Ok so I have no idea about the database created by the wizard, but if you go through the 'Custom Create' route on Azure, you have the opportunity to supply your own Username and Password, and these do work.

How do you get SQL Server 2008 Server Agent login credentials?

I would like to learn how to use SQL Server. My school offers the software as part of its enrollment package so I decided to download it and try installing it. Unfortunately, I get stuck at the following installation screen:
No matter what name and password I enter for any of the fields, it comes back telling me that these are invalid. Where and how do I get valid login credentials? Am I supposed to register somewhere somehow?
Any help appreciated! Thank you!
Since this is a local install you can leave it at the default one's OR create a local user account on your box and give it those to use.
If you use the default one's you don't supply them passwords.
The various machine accounts like NT AUTHORITY\NETWORK SERVICE and NT AUTHORITY\SYSTEM do not require you to enter a password, and you shouldn't try to. They already have a preconfigured password which you don't have access to. This is why the password field is disabled in your image.
Leave those accounts set the way they are, and continue with your install. If it refuses to allow you continue, then you have either changed something, or there is something else wrong (not the passwords).

Windows Authentication in SQL Sever 2000 for an account not logged into Windows

An advantage by using Windows Authentication is that I do not need to provide a username and password to log into the server as the user currently logged into Windows. But in a specific case I would like to log into the SQL Server as another user, using the same Windows Authenticated ODBC connection.
So, the question: Is it possible to log into an SQL Server using Windows Authentication, but not as the user currently logged into Windows (without a dialog asking for username and password)?
The simple answer to your question is no, without a dialog being presented, it's not possible to login to SQL Server using another Windows account.
The slightly more complex answer is; You can login as another user (WITH a dialog being presented) by right-clicking the Query Analyser icon and choosing "Run As" (Might require a CTRL or SHIFT key held down to make RUN AS appear.
There's also the RUNAS command line executable which you could look at, so you could create a shortcut that contains the RUNAS command, the credentials and the path to Query Analyser. That would eliminate being asked for a username or password on execution.
No matter what, if you are not using the credentials of the logged in user, you will need to pass other credentials--short of asking for them directly, the only other option is to store them..
And once you are doing that, it may be worth considering mixed-mode authentication and use SQL login/pw for this specific situation.
Runas does not let you provide a password on the command line and will produce a popup to gather it. A little searching let me to an artical on technet that may help out while not it's intended use..
http://technet.microsoft.com/en-us/library/bb727155.aspx
http://blogs.msdn.com/oldnewthing/archive/2004/11/29/271551.aspx

Resources