The remote procedure call failed with on MSSQL Server 2008 - sql-server

Recently, I have installed MSSQL Server 2008 Express.
Every time I try to enable "SQL Server Agent (SQLEXPRESS)", I got this error message:
WMI Provider Error: "The Remote procedure call failed".
I have tried to search for a solution but I have found some solutions and tried them all but It is still not working. Do you have know a good solution for this?
In addition, what is SQL Server Agent? do we really need it?

This is a bit strange.
One of the restrictions of the free SQL Server Express (compared to the bigger editions) is that it has no SQL Server Agent.
So you shouldn't even be able try to enable SQL Server Agent, because your edition doesn't support it!
However, I have SQL Server 2008 Express installed as well, and I never cared to take a look if the SQL Server Agent service is listed on my machine.
I just looked on my machine: it is there, it's called "SQL Server Agent (SQLEXPRESS)" exactly as yours, and I'm even able to start it.
I didn't expect that!
But it's not visible in SQL Server Management Studio, so I can't create any jobs (and I expected that).
Apparently Microsoft restricted the use of SQL Server Agent in the Express edition not by omitting the service at all, but by making it invisible in Management Studio.
So my actual answer is this:
Don't waste time by trying to start SQL Server Agent.
You don't need it to run the database, and you can't use it anyway even if you can get it to run.

SQL Server Agent is used for Job Scheduling, amongst other things.
If you don't know what it is, you probably don't need it ;) It's not necessary for the standard SQL Server RDBMS functionality.
I can't speak specifically to the error you're seeing.

Related

Significant performance differences between Access on Windows Server 2008 R2 and Windows Server 2019

In our company we have to support a large legacy system built on Microsoft Access 2010 as frontend and SQL Server 2008 R2 as backend. The backend SQL server runs on Windows Server 2008 R2. Currently our users works on Terminal Server sessions on a Windows Server 2008 R2. A couple of days ago we started to test Windows Server 2019 and Notebooks with the latest version of Windows 10. We recognized a big performance difference while executing the same Access databases on the different environments.
For instance the creation of a report takes 27 seconds (new environment) instead of 7 seconds (old environment). The database.accdb is identical, the backend is identical (still Windows 2008 R2 Server with SQL Server 2008 R2 and SP2), only the execution environment (Windows) changed.
Does anyone of you have an idea how to explain this?
In Access 2010 the SQL server tables are linked using System-DSN data sources. On the old environment ODBC is used (Driver: SQL Server, Version: 6.01.7601.17514).
On the new environment I tested the following drivers:
ODBC Driver 11 for SQL Server (2014.120.5543.11)
ODBC Driver 17 for SQL Server (2017.173.01.01)
SQL Server (10.00.17763.01)
SQL Server Native Client 10.0 (2009.100.4000.00)
SQL Server Native Client 11.0 (2011.110.5058.00)
I created a new System-DSN using the different drivers and updated the linked tables in Access. But in any case the performance is still bad. I also tested the latest version of Access which comes with Office 2019, but again it is slow.
Sounds like your terminal sessions are getting throttled. Despite the fact that you have a SQL Server back end, Access is still doing a fair bit of thunking with the result sets, so any resource throttling differences between your Server 2008 and Server 2019 policies could be choking Access in the new server.
I think your answer is going to be found in Windows System Resource Manager. The page says it's not being maintained, but following the "Recommended Version" link leads to a generic Server 2019 page. Here's another article about how WSRM might be throttling sessions: Using WSRM to control RDS Dynamic Fair Share Scheduling.
Compare the Weighted_Remote_Sessions policy in 2008 and 2019 servers. There's either been a change to the default settings or behavior or the 2008 server policy was modified in the past to get to the current performance level.
Ok, a number of things to check.
First thing to check:
Launch the ODBC manager and check if SQL log tracing is on. I don’t know why, but I see sql logging turned on.
You NEED to be 100% sure it is turned off.
You MUST launch the ODBC manager from the command line or start menu, since the one in the control panel is for the x64 bit version, and you are using Access x32 (I assume).
So launch this version:
c:\Windows\SysWOW64\odbcad32.exe
So VERY important to launch the x32. It is assumed you are using a FILE dsn. So check these two settings:
(Make sure they are un-checked).
Next up?
Link access using the IP address of the sql server.
So, place of say:
myServer\SQLEXPRESS
Use:
10.50.10.101\SQLEXPRESS
(Of course use the IP address of sql server, not the above “example” IP).
The above things are quite easy to check.
Still no performance fix?
Then disable the fire wall on your new Terminal server (I seen this REALLY cause havoc).
And, disable windows defender on the new TS server if running.
The above tips should fix your issues.
If above don’t work, then next would be to check the priority settings for the TS server (GUI over server).
However, I am betting the above checks should restore your performance.

SQL Server Management Studio 2008R2 with SQL Server 2017-- compatibility?

I am working on a project where I will be provisioned a SQL Server 2017 database server. However, the only version of SQL Server Management Studio available to me is 2008R2. I could request a newer version but this may take 1-2 months before it is finally installed on my machine.
Am I going to run into compatibility issues? Are there any database settings in SQL Server 2017 I would need to set in order to use this?
I am pretty unfamiliar with the MS suite of database tools so sorry for my ignorance in this! Thanks
In response to comments:
I have a managed system so I am not able to install or run software that has not been "approved". I have tried the portable version of VS Code but that did not work for me. I am going through the process of requests SSMS 2017 but like I said in the question this will not be available for 1-2 months. In the meantime will SSMS 2008 work?
As unlikely as this may be, I happen to have two, and only two, versions of SSMS installed on my machine; 2008R2 and 2017. I'm in the midst of an upgrade project.
I opened SSMS 2008R2 and was to connect to and generally poke around on a SQL Server 2017 server and the related databases. I didn't do anything too complicated (a few SELECT statments & an UPDATE), but they worked. The objects I expected to be visible were visible. And I didn't have to do anything to make it work. It just worked.
Mostly.
Except that every time I right clicked on a table, an error box opened with this message:
Index was outside the bounds of the array. (Microsoft.SqlServer.Smo)
But if I hit the OK button, the box cleared and the desired right click menu opened and functioned. That will get irritating, but if you poke around in the Options menu, there might be a way to make it stop. I invested no minutes trying to do that.
At the very least, you should be able to work while you're waiting for your upgrade.
For what it's worth, I work for a government contractor and have the same level of security constraints you do, so I feel your pain.
Another approach is to run sqlcmd, which would have been installed with SQL Server 2008R2. I was able to connect from sqlcmd to a SQL Server 2017 Docker container (external/internal ports 1433). I did not encounter any errors/warnings when creating a database and table, and running some light queries.
Interestingly, I was unable to connect to the same server using SSMS 2008R2. Perhaps the protocol used or the security required (e.g., TLS 1.2) for the underlying connection was different. Clearly it works based on Eric Brandt's results.

Configure remote connections without sql server installation?

We have an application called IpSwitch Whatsup and it's installed in a machine that I can connect to remotely as administrator. This is all in our intranet.
We need to connect to the sql server database being used by IpSwitch Whatsup, but this particular machine doesn't have sql server installed. On the other hand, in sql server configuration manager there is indeed a sql server installation for whatsup (the entry says SQL Server (WHATSUP)).
So, two questions:
How does one go about in connecting to this database? I'm pretty sure I know the name of the database and I already know the server name and instance, so I would like to connect to this DB from a sql server installation in another machine.
How does one configure a sql server installation to receive remote connections if it doesn't have sql server installed?
Thanks.
For the first question, you just type in (or browse) the appropriate instance name and authentication options using SSMS - which is the GUI tool used to manage sql server instances. Note - the term "sql server installation" can mean different things so it is not a useful reference.
As for the second question, review the information here. Note that any task you do in SSMS can be done via tsql - you can see the appropriate commands using the script button in the SSMS dialog windows.
And you can also (and probably should based on these questions) install SSMS on the same machine as your server instance so you can do "anything" "anywhere". Now would probably be a good time to review your disaster recovery options (and start backing up your databases regularly).

How do I create an SQL Server?

I have a very fundamental and basic SQL question. Using Microsoft SQL Server Management Studio Express, how do I create my first Server? For that matter, how would I create it using any other required software tool?
I took a look at Sql Server Configuration Manager and I saw SQLEPRESS running as a SQL Server. But when I added that in to the start up widow for MSSM Studio Express, as the server name, it threw an error saying it cannot be found or does not exist. It seems that this is not the right kind of server.
To connect to the local instance of SQLEXPRESS, you will need localhost as the server name.
This is a fairly comprehensive guide on how to create a database once you have connected. All the steps won't apply to using SQL Express, but the gist of it is there.
In Object Explorer, connect to an instance of the SQL Server Database
Engine and then expand that instance.
Right-click Databases, and then
click New Database. In New Database, enter a database name.
To create
the database by accepting all default values, click OK; otherwise,
continue with the following optional steps.
Based on this comment:
Trying .\SQLEXPRESS in SQL Server Management Studio Express throws an error that says that "This version of Microsoft SQL Server Management Studio Express can only be used to connect to SQL Server 2005 servers". So this is the problem, I think.
.\SQLEXPRESS is the correct server name, but you have the wrong version of client tools (SQL Server Management Studio). To find out the version of SQL you are connecting to, there are a number of suggestions here: https://www.mssqltips.com/sqlservertip/1140/how-to-tell-what-sql-server-version-you-are-running/
But since you can't connect yet the easiest thing to do is go searching for sqlserver.exe, right click, properties, version. If you have multiple version you need take note of the folder that it's in and check the SQLExpress one. You can also check in services.
Once you've worked out the version, download and install just the management tools for that version.

SQL Complains that Management Tools are not installed, but they are

When I try to create a new Maintenance Plan in SQL Server, I get the following warning:
The action you attempted to perform on
a remote instance of SQL Server has
failed because the action requires a
SQL Server component that is not
installed on the remote computer. To
proceed, install SQL Server 2005
Management Tools on the remote
computer, and then try again. For more
information, see "How to: Install SQL
Server 2005 (Setup)" in SQL Server
2005 Books Online, or find the article
on MSDN at
http://go.microsoft.com/fwlink/?LinkID=57083
. (ObjectExplorer)
However, the tools are installed, AFAIK. I'm connecting to the local machine. Here's a screenshot of both the error message alongside SQL Server telling me it won't install the management tools because they are already there.
(previous step here)
Any ideas?
Ah - nevermind on this. The response is simply a bit misleading. It's only complaining about part of what I was asking to install. When I decided to progress, it did in fact install some things.

Resources