how do i connect to SQL server in SQL Server Mgmt Studio with SSPI Integrated Security - sql-server

i have an asp.net web app that has this in the web.config file in the project
server=[server],15001;Integrated Security=SSPI;Database=DB_NAME
how do i connect to this database from Sql server mgmt studio since there is not use or password in the connection string. i am connecting from a remote machine

When you connect using "Integrated Security", it uses the current Windows credentials of the process - in the case of connecting to SSMS, it will use your current Windows user. If your Windows user has rights to the SQL Server, then you can connect using Intergrated Security.
If you need to connect to the SQL Server using Integrated Security, but as another user, you'll need to do a "Run As..." on SSMS to load it as the different user.

Related

Problems with connecting to SQL Server instance on multiinstance computer

I have a computer with several SQL Server instances installed - 2008, 2012 and 2016. From this computer there is no problem to connect to any of them using Windows Authentication.
Now I try to connect to the SQL Server 2016 instance from another computer. On the server computer I've created the appropriate Windows user and SQL Server login. But when I try to connect to this instance from the different computer, the login fails.
Finally I've managed to connect to SQL Server 2016 database engine using following server name:
TCP:ALEXMWIN81,49602
But when I try to connect to the SQL Server 2016 Analysis Services, the login again fails.
Can anybody give some advice on how to connect? All instances are very important and re-installation is a problem.
Thanks in advance. Alexander Mitchenko
When you say
On the server computer I've created the appropriate Windows user and SQL Server login.
This makes it sound like you are creating a local windows login on the server machine. It should be noted that in order to use Windows authentication both your connecting machine and the server need to be on the same domain.
Creating a SQL login is a separate authentication process called "SQL Server Authentication". When you use this methodology you connect with a username and password only. For this process you would connect by putting the login credentials into a connection string.
Do you have multiple domains? This can cause problems.
Cross Domain SQL Server Logins Using Windows Authentication
Does the SQL instance expose all the required ports to the internal network?
https://msdn.microsoft.com/en-us/library/cc646023.aspx
Is the server running a Windows Firewall?
What software are you connecting from?

Cannot connect to SQL Server Express with SSMS and SQL Server Authentication

I've been using SQL Server Express with Windows authentication for many years with no problems. However, for a different application I need to use server authentication. I'm running SQL Server 2008 R2 Express.
Here is what I've done so far in SSMS:
Enabled "SQL Server and Windows authentication mode" in the "Security" section of Server Properties
Created a new server Login with 'public' and 'sysadmin' server roles
Created a new database user with the above login and assigned it db_accessadmin, db_datareader and db_datawriter.
When I try to connect to the server using SSMS and SQL Server authentication I get the "Login failed..." with 18456 error.
I'm definitely providing a correct password.
Is there anything else that needs to be done for the server authentication to work?
Thanks.
It is required to restart SQL Server after enabling the SQL Server authentication mode.

Can't conect to a SQL Server Express from a remote computer

i need to establish a conecction to a SQL Server Express from remotes pcs. But i can do it, only can establish it from the pc where is the SQL. Thank you for your help.
If you are using Integrated Security (Windows Authentication) and a local user account (from the PC with SQL installed), such account can only be authenticated on that PC.
For database account (SQL Server Authentication) you'll need to create a database login and enable Mixed authentication (http://msdn.microsoft.com/en-us/library/ms188670.aspx)

Connecting to remote SQL Server

I have installed SQL Server 2005, the SQL Server instance name is SOSO, the machine name is HERO, I tried to connect from another computer using SQL Server Management Studio:
Server name: HERO\SOSO
Authentication: Windows Authentication
But I didn't succeed.
SQL Server is enabled to be connected remotely.
So what is the problem?
Windows Authentication uses the Active directory user from the connecting machine to authenticate with the database. Does it have the right permissions to access the database? Maybe try authenticating with a SQL Server database user first. Maybe you've created a SA user on installation, try connecting with that.
But as the other replies also tell, first check network / firewall connection and please provide us with the error message.

Cannot connect to "local" (SQL Server 2008)

I have some database problems.
I have SQL Server Developer installed on my local machine. When I open SQL Server Management Studio and log in with windows authentication there is no problem. I have created a new database there and added a new user. The new user is owner of the database.
When I disconnect from my windows session and try to log in with the newly created user in SQL Server authentication mode I get the 'cannot connect to (local)'
Please help!
Have you enabled SQL Server authentication? (During installation and/or afterwards)
If not, connect using windows authentication, right-click on the server instance, go to properties and change auth mode...

Resources