I have sql server 2008 installed on my dev machine. How I figure out things like, the name of the server, do I connect to it using windows auth or using sql auth. If I connect using sql auth what is my account information. I set it up a while back and I dont know how to read all the sql server install and configuration information. I am trying to install Vault and its trying to connect to sql server and I dont know things like sql server name, login credentials on my machine.
Your local machine can be specified as (local) or localhost or even just . (a period) as the SQL Server (machine) name.
If you can connect to SQL Server using Windows auth - that's probably the easiest way to go. So just try if that works, and if it does - perfect!
Otherwise, you need to find out what your sa (system administrator) account on your local server uses as a password - that's your key to everything, basically. If you don't know that password anymore.... you might need to reinstall SQL Server to get that password back.
Related
I have a user with SSMS installed locally who wants to be able to access the SQL Db on a remote server over SonicWall SSL VPN.
He can connect to the VPN just fine, RDP to SQL server (as a test) just fine, but cannot connect with SSMS to the server.
So far I've tried:
Enabling Trust for the connection as it was at first presenting an SSL error. Now we just get "login failed for user" errors.
Tested his user with Windows Authentication on the server directly, it works fine.
Enabling names pipes and TCP/IP in server configuration manager.
Testing logging in with a SQL authentication user over VPN - This also works fine.
I am sure the domain\username and password are correct and verified them in several other ways.
Checked the SQL server properties and Allow remote connections is enabled with no timeout.
Opened up everything in the sonicwall from the SSLVPN to the SQL server as a test, changed nothing.
Attempted disabling the local and SQL windows firewall, changed nothing.
Probably some other stuff, but I don't remember right now.
This is SQL Server 2014. He is using SSMS 2017, but I've tried it on the SQL Server with 2017 and it works fine and as mentioned he can log in over VPN with a direct SQL Server user. All other users just RDP to SQL server and connect that way so this has never come up again, but they don't want the new employee having RDP access to the SQL Server.
The exact settings on his SSMS I'm using are Active Directory - Password and under connection properties encrypt connect and trust server certificate are checked.
No special or changed ports on SQL Server, everything is basic installation defaults.
In this example, I'm editing the NT Service\MSSQLSERVER user.
However, when you edit the user/s in question and navigate to User Mapping as can be seen below:
Is the Database they are allowed to access selected?
Also, while the Database is selected, did you tick the permissions to the Database, as stipulated above?
If not, please try this and advise if it worked?
I am trying to connect to a remote SQL database.
I have the access and the sql server is configured for remote login.
I can login to the server from another machine (B) but not from my machine (A).
Both the machines (A and B) are on same domain. None have their IP white-listed.
In short, I do not think there is an issue on sql server side.
On my side,
I tried modifying DTC and firewall properties. (Not sure if the modifications are correct).
Could anybody please help.
Are you trying to connect through software? You said "SQL Server" so I'll assume you're talking about using SSMS to connect to a server?
You said that you can login to the SQL server from the box that the server is on but not from a remote computer. This sounds like a permissions problem to me.
Is the account you created setup for Windows authentication? Should you be using a local SQL server account instead?
Some more information could help everyone troubleshoot.
you set blind address in the sql server config?
While making web.config, I tried to connect local SQL Server database with the web
<add key="DSN" value="server=localhost;uid=test_demo;pwd=1234;database=DB_PRE"/>
However using "DSN" with value server = localhost does not successfully connected to the local SQL Server database. And I'm not sure with creating uid and pwd I want to know how to use "DSN" to connect to the local.
I'm using SQL Server 2008, IIS Express 7.
So it was port number problem at first, designating the initial(base) port number for the Database server, and the password policy should be turn off.
Password policy required me to change password regularly after some amount of time, and this was the error which is really hard to find
I built a window application in visual studio 2010. It is working fine at my computer.
if i have a pc that works with windows server 2008 and i install a sql server on it , how to make my application connect to database in the sql server that instaled in the server pc .
my pc connected to the server domain .
thanks
Assuming your application is already configured to use a Sql connection string, you'll just need to configure it for the Sql Server instance you're connecting to.
For example, if your database is called MyDatabase, and your windows server on your domain is called myserver.local, and you've installed Sql Express with the default SQLEXPRESS instance name, you could create your connection string (assuming ADO.NET) something like this:
Integrated Security=true;Initial Catalog=MyDatabase;Data Source=myserver.local\SQLEXPRESS
This configuration would be for Windows Authentication (Integrated Security=true): so your domain user accounts would need to be granted LOGIN rights on the server, and those Logins associated with USERS and ROLES in your database. If you wanted to use Sql Logins instead (generally requires extra configuration when setting up your Sql Server), there are different connection strings settings for specifying username and passwords. There are many options available for the connection strings as documented here: https://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlconnection.connectionstring(v=vs.110).aspx. However, with Windows Authentication the only 3 you absolutely need are the ones shown above.
You can test connectivity to your Sql Server from your PC on the network using Sql Server Management Studio, which will enable you to verify the instance name and the authentication is working as expected if you can connect to the database.
My desktop machine has SQL Server installed. I can connect to it (using my desktop machine) using the following server name:
localhost\SQL_Express
Windows Authentication
If I want to connect to it using my Laptop, I try to do the following (ACER_ASPIRE is my computer name):
ACER_ASPIRE\SQL_Express
SQL Authentication (acerAspireUserName, acerAspirePassword)
I get an error saying the server wasn't found. How can I go about connecting to my desktop machine's SQL Server from my Laptop?
To connect to a Sql Server you need to specify two things.
1 - Server name
In this section you are suppose to provide [ServerName\InstanceName]
Server Name is the Machine Name where your sql server Instance lives. And obviously since sql server can have multiple instances on one machine you need to provide the instance name that you want to connect to.
There is an exception for Instance name if you are connecting to the Default Instance you dont need to provide full [ServerName\InstanceName] you can only use the machine name to connect to the default instance on sql server on that machine.
One thing you need to know is
localhost == . == MachineName == ServerName
These are all different ways you can tell sql server , the server name that you want to connect to.
2 - Authentication
You have two ways to authenticate yourself when connecting to sql server,
Windows Authentication.
Sql Server Authentication.
In 1st section ServerName you told sql server that which machine and what instance you want to connect to.
Now in this Authentication Section you will have to tell sql server how you will be Authenticated.
When using Windows Authentication Sql server will use your windows credentials to identify you. This has nothing to do with the Server/Machine name it is to do with the Operation system of the machine, in your case it is windows and you can use your windows credentials.
On the other hand if you use Sql Server Authentication you will have to use a Sql Server Login' andPassword`. In this case sql server will not care what operating system you have on your machine. (mostly used when you are working on operation systems other than windows like Linux, Unix, Mac). It will only take consideration the login and password you pass.
Authentication Mode
What Authentication Mode you can use? this depends on your sql server configuration when you were installing, You can set your sql server to Only Allow Windows Authentication or Mixed Mode (i.e Windows Authentication and Sql Server Authentication).
Your Case
In your Case regardless of what Authentication Mode you are using. You can use any notations in sql server SERVER Section as long as they point to your machine like
local, localhost, . , ACER_ASPIRE
But for Authentication if you are using Sql Server Authentication Make sure you are using a Valid Sql Server Login and Password.
Open the query window, and inside it execute the following:
EXEC sys.sp_configure N'remote access', N'1'
GO
RECONFIGURE WITH OVERRIDE
GO
This option is not enabled by defauld on Express edition.
By default, SQL Express doesn't support LAN Connections, only from local machine.
To use it you must configure to listen to network ports also. You can do that on the SQL Server Surface configuration tool.