SQL Server Login Across LAN - sql-server

I have an Access front-end on physical box A linked to a SQL Server instance in physical box A. When I launch the FE, it automatically connects to the SQL Server database with no issue. However, when I launch the same FE from networked physical box B, I get a "login timeout expired" error. I click "OK" which opens the generic SQL Server Login dialog, I click "OK" and I'm immediately connected. Any ideas? Thanks!

Well, first up, are you using sql logons, or windows logons?
I would on that 2nd machine re-link the tables. And you VERY much want to do make the connection with what we call a FILE dsn. If you do this, then if that instance of SQL server is open and allows incoming connections, then it should work.
So re-link the tables - in fact I recommend that you delete the table links. And AS stated you MUST use a FILE dsn - not machine/user. So, you can setup this link on the dev box that has both access + SQL server - but you REALLY need to use SQL server logons - not windows based logons.

Related

Which server connection is used by query window in Azure Data Studio / SQL Operations Manager

I've recently started using Azure Data Studio (Formerly SQL Operations Studio) instead of SSMS. I can't see an obvious way to tell which query windows relate to which connections.
Example:
I have 2 DB servers, and each has the same DB
server1.db1
server2.db1
Let's say I connect to both and open a query for each and run it. Then I get confused and cant remember which connection is for window SQLQuery_1 and which is for SQLQuery_2.
I can see at the top of each window that they are connected to the DB "db1", but I don't know if it is for server1 or server2. SSMS show's the server name.
Is there a way to make the server visible for a query window?
As in the comments, it's shown in the bottom right hand side of the screen:
For example, in this picture, you can see I'm connected to the server qebui and the database Sandbox.

SSIS - Transfer SQL Server Objects Task - Problems with SMO Connection Manager

I am using SSIS within Visual Studio 2012. I am planning to use the Transfer SQL Server Objects Task in SSIS to, well, transfer (nearly) all objects (schema only) between servers. I am unfortunately stuck at the SMO Connection Manager configuration step. While in the Editor for the task, I click on Source Connection and select <New Connection ...>. I then enter the name of the server I wish to use as the source. When clicking on Test Connection, I get a Failed to Server error message. I am able to connect to the server from SSMS, and I can make a successful connection if I create a Connection Manager in SSIS. I simply cannot successfully connect when using the SMO Connection Manager within the Transfer SQL Server Object Task.
It's probably already too late, but I've realized that if you don't click on Test Connection and leave the Server Name, you can click OK, and when you hit the dropdown on SourceDatabase, the list of DBs appear.
In my case the solution was to enable TCP/IP protocol for instance (I was trying to connect to) in Sql Server Configuration Manager and in Properties of protocol on tab IP Addresses for IPAll set TCP Port to 1433.
I have just came across the same issue one hour ago in VS2012. There is a bug related to Visual Studio, which gives you this error message regardless the network connection when you add SMOServer type of connection and press Test Connection button before pressing OK button.
Therefore, what you need to do is to add SMOServer Connection, select your source and press OK without testing the connection. Then you can test the connection after making a right click and edit on the connection manager. The test works when you do in that way.

How to test MSSQL Database Connectivity outside an application

Sometimes when trying to setup web.config and connectionstrings.config settings for our .NET applications we get DB errors. Many times due to wrong connection info in the config files. Sometimes we need to find out if the app/web server can even see the DB server.
How would you connect to your DB server to test connectivity before getting the app to run?
The answer that I have found is this:
There's a utility built into windows that will test SQL connections.
Here's a simple way to use it.
Create an empty file called anything.udl and double click on it. Click
the Provider tab, and select "Microsoft OLE DB Provider for SQL
Server". Then click the connection tab, populate your connection
details, and hit the "Test Connection" button.
Credit goes to this poster/forum about 3 posts down they post the above information.
So steps to do so are the following:
On your app/web server create a blank file called test.udl
Double-click this file and at least with Windows Server 2008 R2 it will open up a Data Link Properties window.
Insert your connection string information and hit the test button and it should connection successfully. If it doesn't then make sure your DB info is correct and if it is then your server might not be able to see the SQL server.
Hope this is helpful to others!

SSIS - how to make a connection string for your database server?

How do i make a connection string for my database server ? I want to know this so that i can save connection strings in a table and then use them later. Note - All my database servers don't need password and username. I login to a remote "mother" server and access the other remote servers in management studio using 'windows authentication'. So, i don't think my connection string needs to have a user name and password.
Assuming this is for SSIS, create a connection manager, then poke around in it's properties - you'll find the connection string. Take a look here for examples:
http://www.connectionstrings.com/
When connecting to an MS SQL database you require to log in using an account. I am assuming that the windows account you use to connect to the remote server is also the account that is used to log into server is the same account that is used to log into the server. So you can set a connection manager using the same window authentication.
To set up a new connection from BIDS open the solution manager window, then one right hand mouse click on 'Connection Managers' and left hand mouse click on 'New Connection Manager'
The 'Add SSIS Connection Manager' window will appear, this example l have selected and OLE DB connection, next click on the 'Add..' button.
The next screen may already have connections defined as the screenshot shows. Press the 'New..' button to add another data connection.
This final screen is where you provide the details of the database you wish to connect to. The combo box titled 'Server name' when you click on the down arrrow, may contain the server\database instance you want to create a connection for. Otherwise you can enter it manually by typing it directly in the the box. The syntax is as follows [database server name][MS Sql server instance name] eg Yoda\LukeDB. Where 'Yoda' is the name of the server and 'LukeDB' is the name of the database instance you want to connect to. In the screenshot the 'Log on to the server' is set to 'Use Windows Authentication'. However this assumes the windows account on you access the remote server with is the same as the machine running the SSIS package. Once you have entered all the details, press 'Test Connection' to check if a connection can be made successfully.
From a security point of view it would be recommended to set up a SQL account on the database instance which the SSIS package is run against. Then configure that SQL account just the permissions it requires to run the SSIS package.

The request failed or the service did not respond in a timely fashion?

I have the following error while I connect to SQL Server 2008 Management Studio with Windows authentication.
"The request failed or the service did not respond in a timely fashion.
Consult the event log or other applicable error logs for details."
Is anybody tell me why i am getting this error, whereas my SQL Server is running under network service built in a/c????
I googled it but not getting solution..
Thanks
Had the same problem, I fixed it.
Open SQL Server Configuration manager
Click on the SQL Server Services (on the left)
Double-click on the SQL Server Instance that I wanted to start
Select the Built-in account radio button in the Log On tab and choose Local system from the dropdown menu
Click apply at the bottom, then right click the instance and select Start
Above mentioned issue happened in my local system. Check in sql server configuration manager.
Step 1:
SQL server Network configuration
step 2:
Protocols for local server name
Protocol name VIA Disabled or not..
if not disabled , disable and check
.. after I made changes the sql server browser started working
This really works - i had verified lot of sites and finally got the answer.
This may occurs when the master.mdf or the mastlog.ldf gets corrupt . In order to solve the issue goto the following path.
C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL , there you will find a folder ” Template Data ” , copy the master.mdf and mastlog.ldf and replace it in
C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA folder .
That's it. Now start the MS SQL service and you are done.
If you are running SQL Server in a local environment and not over a TCP/IP connection. Go to Protocols under SQL Server Configuration Manager, Properties, and disable TCP/IP. Once this is done then the error message will go away when restarting the service.
If you recently changed the password associated with the service account:
Start SQL Server Configuration Manager.
Select SQL Server Services in the left pane.
Right click the service you are trying to start in the right pane and click Properties.
Enter the new Password and Confirm password.
It was very tedious when I get same problem. When I got this problem, I uninstall my SQL Server 2008 but after installing the SQL Server 2008 again,I got the same problem. I was so tensed plus, I had not gotten any help from any site.
To over come this problem. Simply You Need to go on SQL Server Configuration Manager and then click On Protocols on left panel. If you running Network service just disable 'VIA' Protocol.
And after that try to start your SQL service it will run successfully.
After chasing this issue for some hours, we found an log in the SQL Server Agent logs stating the following:
This installation of SQL Server Agent is disabled. The edition of SQL server that installed this service does not support SQL server agent.
We were using SQL Server Express. After some Googling it appears SQL Server Express does not support SQL Server Agent.
I didn't find a direct piece of Microsoft communications stating that SQL Express doesn't support SQL Server Agent, however this sentiment seems to be echoed across many forums.
In my case, the issue was that I was running two other SQL Server instances which were (or at least one of them was) causing a conflict.
The solution was simply to stop the other SQL Server instance and its accompanying SQL Server Agent.
While I'm at it, I'll also recommend making sure Named Pipes is enabled in your server's protocol settings
I had a similar issue. The next solution is in *case to can't launch the server Locally * and you will see the same error msg.(Image 1)
Imagen 1
Imagen 2
To solve that and have the server working you must have the next steps.
Go to SQL Server Services
Right click to open properties
Go to LogOn tab (By default you will see something like Image 3)
Select the radio button Built-in account (Image 4)
Click on Ok
Go back to SQL Server Services and launch again the server (Image 5)
After that you must be able to see run it.
Image 3
Image 4
Image 5
I hope that works for you or others with similar issues. Follow me for more tips.
Just disable the VIA protocol in sql server configuration manager
I found from event logs that My SQL server evaluation has expired.
I needed to upgrade or needed to use community edition.
For me a simple windows update fixed it, I wish I tried it before.
I think this solution is more appropriate, because it does not prevent you from using TCP/IP access.
To open a port in the Windows firewall for TCP access
On the Start menu, click Run, type WF.msc, and then click OK.
In the Windows Firewall with Advanced Security, in the left pane,
right-click Inbound Rules, and then click New Rule in the action pane.
In the Rule Type dialog box, select Port, and then click Next.
In the Protocol and Ports dialog box, select TCP. Select Specific
local ports, and then type the port number of the instance of the
Database Engine, such as 1433 for the default instance. Click Next.
In the Action dialog box, select Allow the connection, and then click
Next.
In the Profile dialog box, select any profiles that describe the
computer connection environment when you want to connect to the
Database Engine, and then click Next.
In the Name dialog box, type a name and description for this rule, and
then click Finish.
(Source: https://msdn.microsoft.com/en-us/library/ms175043.aspx)
I have SQL 2017 installed and this issue happens when the free trial / evaluation period ends, the solution to the problem is the following:
1 - Go to the windows start button, find the Microsoft SQL Server 20XX folder
2- Then, SQL Server 20XX Installation Center
3- On the left, select the option "Maintenance"
4- Then click on “Edition upgrade”
5- Then in the combox select "developer" option, and then click on “next” button
6- Click on the option "I accept the license terms" and then next
7- Finally, click on "Next" and click on "Upgrade", and wait approximately 15 minutes.
8- After this, restart the SQL Server service in "Services.msc" and open SQL again, it should work.
For more information: watch this video: https://www.youtube.com/watch?v=EVG35ahhjec
If you are still scrolling through the answers, here is one more step you might have missed.
Open SQL server configuration manager with admin access.
Apply the changes first(to local System) and then try to run.
If you are configuring your SQL Server connection using Computer Management under Administrative Tools or SQL Server Configuration Manager in Enterprise or Corporate environment,
make sure you open your Computer Management or SQL Server Configuration Manager as an Administrator or you have
Administrative Privileges
All answers above didn't work for me, but when I run it as Administrative mode, I can now start my SQL Server Agent or SQL Server service.
For me happened similar issue when I did uninstall Microsoft Visual C++ 2015-2020 Redistributable and installed the Microsoft Visual C++ 2017 version
Fixed this issue when re-installed Microsoft Visual C++ 2015-2020 Redistrubutable versions. then services started automatically.
Try changing login from different account:
Open SQL Server Configuration Manager as Admin.
Right click SQL sever and SQL Server Integration Services.
Go to Properties and choose Log on.
Choose Built in account.
Select local service.
Apply and Ok.
Start service again.
This is beacuse your both SQL Servers are using same TCP Port Number i.e. 1433 and only one server could run at this port at a time. You have to change or Remove Port number from below settings;
In SQL Server Configuration Manager Click on SQL Server Network Configration.
Click on required Protocols for SQL...
Double click on TCP/IP then select IP Address tab.
Scroldown to end double click in TCP Port Textbox.
Change Port number from 1433 to other one or remove it.
After save these settings now Start your required server.
Good Luck
https://social.technet.microsoft.com/wiki/contents/articles/52394.sql-server-troubleshooting-logon-failure-the-user-has-not-been-granted-the-requested-logon-type-at-this-computer.aspx
event viewer shows
Logon failure - the user has not been granted the requested logon type at this computer

Resources