I'm trying to move to a new hosting provider and I'm having real difficulty getting my web site to run. It uses Hangfire on application startup to run some background jobs, whilst also serving web pages on the main thread.
The website seems to work for the very first page load and then subsequent accesses fail to run a reasonably complex Entity Framework search query.
Here's the server's configuration on the existing machine, via SQL Server's select ##version command:
Microsoft SQL Server 2017 (RTM-GDR) (KB4583456) - 14.0.2037.2 (X64) Nov 2 2020 19:19:59 Copyright (C) 2017 Microsoft Corporation Standard Edition (64-bit) on Windows Server 2016 Standard 10.0 <X64> (Build 14393: )
Shared operating system (not sure what this is)
SQL Server 2017 - Standard Edition
.NET Framework 4.8
Hangfire using SQL Server storage, with table's using the Hangfire schema
Other application tables, with tables using the dbo schema
Here's the server's configuration on the new machine, via SQL Server's select ##version command:
Microsoft SQL Server 2019 (RTM) - 15.0.2000.5 (X64) Sep 24 2019 13:48:23 Copyright (C) 2019 Microsoft Corporation Express Edition (64-bit) on Windows Server 2019 Standard 10.0 <X64> (Build 17763: ) (Hypervisor)
Windows Server 2019
SQL Server 2019 - Express edition
.NET Framework 4.7,. (according to Plesk, although I've installed 4.8)
On the new server I have full RDP access, so can install whatever software I like on this machine. However, SQL Server Standard edition is extremely expensive for a little website like mine.
Is there something that is preventing the Entity Framework query running on the new Windows Server 2019 machine, with SQL Server Express? Does that combination not allow multiple schemas for the database, or is there some other restriction from this combination that I might not be aware of?
Running the website with SQL Server Express on my local Windows 10 machine runs fine.
I'd really appreciate any help with this, as I'm pulling what little hair I have left out of my head!
Thanks for trying to help, but in the end the problem was a lot simpler than I'd anticipated. I thought this was a permissions issue, but actually it's just a simple performance issue.
Running SQL Express on the new server failed because the machine didn't have enough RAM. It only had 4GB of RAM, and with Plesk and other software installed by the hosting provider, the free RAM was down to just a few hundred MBs.
Some simple queries that would take milliseconds to return on the old server could take over 2 minutes to return on the RAM limited new server.
Increasing the RAM to 8GBs fixed most of the issue, although using SQL Express is still significantly slower than the SQL Standard edition on the old server, and SQL Standard is alarmingly expensive to run just for this one website (the old server has a shared SQL Standard edition installation).
Related
Lately, I've noticed delays in our sql server database when using the SQL Server management Studio GUI, when executing simple queries, and with web apps that interact with the DB.
For example, we have an asp.net application that uses this database. The web app and the sql server database are located in the same server. Lately, I've been seeing several The Wait operation timed out with different webforms in the page, and I know that the stored procedures invoked are not time-consuming. I don't want to increase the timeouts because I know it's not the stored procedures.
Another example: I use SQL Server management Studio. If I want to expand the Tables node, it takes an unusually long time to display all the tables. A few times I've gotten time out issues here.
Is there a way to see what the delays are? We have sufficient memory in the server and I've restarted the sql server installation and the server.
Our installation: Microsoft SQL Server 2016 (SP2-CU17) (KB5001092) - 13.0.5888.11 (X64) Mar 19 2021 19:41:38 Copyright (c) Microsoft Corporation Standard Edition (64-bit) on Windows Server 2019 Standard 10.0 (Build 17763: )
I'm running this version of SQL Server on an Azure instance:
Microsoft SQL Server 2017 (RTM) - 14.0.1000.169 (X64) Aug 22 2017 17:04:49
Copyright (C) 2017 Microsoft Corporation
Web Edition (64-bit) on Windows Server 2016 Datacenter 10.0 <X64> (Build 14393: ) (Hypervisor)
Per the description for the instance ('SQL Server 2017 Web on Windows Server 2016'):
This image contains the Web edition of SQL Server 2017 on Windows Server 2016. This provides a low-cost database solution for medium-size web applications. It includes the core database engine and Management Studio for integrated administration and development. Also includes basic versions of Reporting Services for web reports, Integration Services for moving and transforming data, and Analysis Services for data mining. We recommend that you use a virtual machine size of DS12 or higher.
When I attempt to connect / configure using the 'Report Services Configuration Manager', I'm unable to 'find' the Report server instance in the 'Reporting Services Configuration Connection' dialog. I.e. the 'Report Server Instance' had not values to choose from.
I installed Microsoft SQL Server 2017 Reporting Services (note three editions were available - Eval, Developer, & Express - tried each edition - uninstalling each version before trying the next)
When I went to configure the Reporting Services using the 'Report Server Configuration Manager' I got to the 'Change Database' tab. At the point that I am assigning the database engine to the reporting services I get the error:
The database engine instance you selected is not valid for this edition of report server
Note I'm running the Web edition of SQL Server, but I'm not seeing an option to select that in the installation of the report services
Thoughts re what I'm missing?
I Ended up reverting back to SQL 2016 to go around the issue
I have been having a similar issue. I tried to get the SQL Server key from a PowerShell script as well, but they didn't work for SQL Server 2017 Web Edition.
So the solution was much easier than I expected.
Go to the C: drive of your VM. You will find SQL Setup there.
Run the setup to start a new standalone installation. When you will be on product key page it will display the License Key.
Copy that key and put it into your Reporting Services Installation.
I hope it will help someone.
The error is basically saying you cannot use the edition of your SQL Server Engine (in this case, Web edition) for SQL Server Reporting Services 2017. Can you try a different edition of SQL Server?
Update:
You can learn more about supported editions of Database Engine you can use for each different type of edition of Reporting Services 2017 at https://learn.microsoft.com/en-us/sql/reporting-services/reporting-services-features-supported-by-the-editions-of-sql-server-2016. While some of the content may not be applicable for SSRS 2017, the bits which are applicable are still accurate.
I am trying to install SQL Server Data Tools - Business Intelligence for Visual Studio 2012 on my currently installed SQL server.
I get the following error during installation : same architecture installation
The error message does not make sense, these are my specifications
I am using the following exe to install Business Intelligence tools
I had the same error.
In this case, in Installation Type section, you need to choose
Perform a new instance of SQL Server
instead of the
Add features to an existing instance of SQL Server
Otherwise, the installation fails with "Same architecture installation".
In all likely hood you have a 64-bit SQL Server application installed on your box. You can check the CPU architecture type of your SQL Server installation by firing following query:
select ##VERSION
On my machine which has a SQL Server 2008 installation returns below string:
Microsoft SQL Server 2008 R2 (SP2) - 10.50.4000.0 (X64) Jun 28 2012 08:36:30 Copyright (c) Microsoft Corporation Developer Edition (64-bit) on Windows NT 6.1 <X64> (Build 7601: Service Pack 1)
Here the initial part of the query output Microsoft SQL Server 2008 R2 (SP2) - 10.50.4000.0 (X64) suggests that my SQL Server installation is a 64 bit application. To make an upgrade or adding new feature I'll always have to run 64-bit installer.
You are trying to run x86 (aka 32-bit) CPU architecture installer to add new features.
Though you are not at fault. This link details the trail of events as to why Microsoft never released x64 CPU architecture installer for this specific case of SQL Server Data tool - Business Intelligence for Visual Studio 2012. The available setup is only 32-bit as Visual Studio 2012 (Shell) is 32-bit only.
Quoting from the link I've mentioned above:
Make sure you choose the "New Instance" option (strange as that might
seem). Otherwise, you'll get an error that says the following: Rule
"Same architecture installation" failed.
This will effectively create a new 32-bit named instance on your computer and install all the desired features and data tools on top of it.
Update: I've faced the same issue even while installing SQL Server Management Studio 2014 on top of an existing SQL Server 2014 (x64) Instance. In fact, in this case I faced the issue even when I was running 64-bit installer of SSMS 2014. Solution remains same to go past the error.
I use this command on both express and developer addition
select ##VERSION
Express server result is below
Microsoft SQL Server 2008 R2 (RTM) - 10.50.1617.0 (Intel X86)
Apr 22 2011 11:57:00
Copyright (c) Microsoft Corporation
Express Edition with Advanced Services on Windows NT 5.1 <X86> (Build 2600: Service Pack 3)
and developer result is blow
Microsoft SQL Server 2008 (RTM) - 10.0.1600.22 (Intel X86)
Jul 9 2008 14:43:34 Copyright (c) 1988-2008 Microsoft Corporation Developer Edition on Windows NT 5.1 <X86> (Build 2600: Service Pack 3)
When I try to attach the MDF file from my Express edition to my developer edition, I get this error:
An exception occurred while executing a
transact sql statement or batch the
database 'example' cannot be opened
because it is version 661. This
server supports version 655. A
downgrade path is not supported could
not open new database 'example' create
database is aborted. Microsoft Server,
Error: 948
Since your version of Express is newer than your version of Developer, you will not be able to migrate directly, but you have a few options, in my order of preference:
Upgrade to SQL Server 2008 R2 Developer Edition - by far the simplest approach
Use a third party product to replicate schema and then the data (e.g. Red Gate SQL Compare / SQL Data Compare - I blogged about several other options here).
Use a manual script, such as this one from Jonathan Kehayias
Use the import-export wizard from Developer Edition to pull the data/schema from Express
This is the problem of your sql version. You have created database in another version and the version in which you are trying to attach is different and old.
What you can do is create a backup file, and create new empty database and then restore that backup in it.
Note: While restoring, after providing backup file, see on left side, there is "options", click it, and then in there, you must select overwrite option, other wise it will give you structure error that the database backup that you are trying to attach has different structure than the database in which the backup is being restored.
Since SQL Server does not allow downgrading you can create a backup of your database in SQL Server 2008 instance and use third party tools, ApexSQL Diff and ApexSQL Data Diff to restore the backup from an older to a newer version of SQL Server.
You can read detailed explanation of the process in this article:Restoring SQL Server database backup to an older version of SQL Server
Hope this helps
Disclaimer: I work for ApexSQL as a Support Engineer
I have to copy a db from a remote server to my local dev machine.
What is the best way to do it.
Last night I made a script for the remote db using xSQL Object and ran it on the local server. the script gave a bunch of errors. Below is the select ##version output for the 2 servers. is there a reason the script is not working
The remote server is using SQL server authentication, the local one is using windows authentication
Microsoft SQL Server 2008 (RTM) - 10.0.1600.22 (X64)
Jul 9 2008 14:17:44
Copyright (c) 1988-2008 Microsoft Corporation
Enterprise Edition (64-bit) on Windows NT 5.2 <X64> (Build 3790: Service Pack 2)
Microsoft SQL Server 2008 (RTM) - 10.0.1600.22 (Intel X86)
Jul 9 2008 14:43:34
Copyright (c) 1988-2008 Microsoft Corporation
Express Edition with Advanced Services on Windows NT 5.1 <X86> (Build 2600: Service Pack 2)
It would be helpful if your provided some of the errors your script produced.
I notice you're using Enterprise and Express editions - these two editions have differing features, described here: http://www.microsoft.com/sqlserver/2008/en/us/editions.aspx. Perhaps you're using a feature that Express edition doesn't support, or your database is too big.
Not sure if the functionality is exactly the same in 2008, but in 2005, you can open up SQL Management Studio, right-click on the dbase you'd like to copy, and then click on Export Data.
This will guide you through a wizard, allowing you to export the data to another SQL dbase, including one that runs on your local machine. Used it many times - works great.
Why don't you just do a backup and restore?