Fresh install of Windows 10 with latest update on a new workstation and I couldn't get SQL Server 2016 Developer to install as it kept showing error:-
There was an error generating the XML document.
Error code 0x84B10001
Thought this was a bit strange as never noticed this before. I wondered if it was a permission issue, but all was fine as I was local admin. As I work remotely I checked and noticed my VPN to work was not connected. So I reconnected it and the install completed correctly. Therefore it looked like it was an issue due to not being able to contact the domain Active Directory (wish it would have just said that).
Tried to install Microsoft SQL Server 2012 on a Windows 2012 R2 and had the following error:-
The following error has occurred:
Error while enabling Windows feature : NetFx3, Error Code : -2146498298 , Please try enabling Windows feature : NetFx3 from Windows management tools and then run setup again. For more information on how to enable Windows features , see http://go.microsoft.com/fwlink/?linkid=227143
OK simple enough I thought, so I just used PowerShell and ran:-
Install-WindowsFeature –name NET-Framework-Core
but that got to about 68% and failed. OK maybe it needed the media (DVD/ISO) of the original VM creation. So again tried the following PowerShell:-
Install-WindowsFeature –name NET-Framework-Core –source Z:\Sources\SXS
but again got to about 68% and failed - very odd as never had issues installing .Net 3.5 before on a modern server. Looking around the internet it seemed if you had any of the following KB's installed from the Windows update it was a good idea to remove first:-
But I didn't have these installed as a fairly new server build.
The fix was fairly simple. On the Server open Group Policy and open the following:- Local Computer Policy -> Computer Configuration -> Administrative Templates -> System
Find the Setting that says:-
Specify settings for optional component installation and component repair
Click Enabled and tick the box that says:-
Download repair content and optional features directly from Windows Update instead of Windows Server Update Services (WSUS)
Click apply and OK, then back in PowerShell run:-
Install-WindowsFeature –name NET-Framework-Core
And thankfully .Net 3.5 will now be installed.
Using latest Entity Framework 6.1.3 with Visual Studio 2015 and connecting to SQL Server 2016 developer edition, I had the following error:-
Could not determine storage version; a valid storage connection or a version hint is required.
In Visual Studio Solution Explorer.
Right Click over the Entity Framework .edmx
Open with and select XML Text Editor
Search for "ProviderManifestToken=" and either you will have XXXX or in my case I had 2012 in this value. So I changed it to 2008 and now my code works.
Whilst trying to do a simple query in Microsoft SQL Server Management Studio e.g.
SELECT TOP 10 * FROM dbo.DatabasePerInstance
I was getting the following error:-
An error occurred while executing batch. Error message is: Invalid attempt to GetBytes on column 'DateAdded'. The GetBytes function can only be used on columns of type Text, NText, or Image.
Thought it was a bit strange as is a really basic type of T-SQL. However I running Management Studio 2005 and this SQL Server I was connecting to was SQL Server 2008 r2.
Run the same version or higher Microsoft SQL Server Management Studio to do the T-SQL. Once I loaded up 2014 Management Studio no more errors.
Had a SQL Server 2005 FULL Backup failure each night for the largest database (around 45GB). Looking at the SQL Server Logs I notice the following error:-
BackupMedium::ReportIoError: write failure on backup device 'D:\BACKUP\SERVER_DATABASE_FULL_20160103_202215.bak'. Operating system error 665(error not found).
Looking at possible solutions:-
- Backup HD drive is heavily fragmented, but as this is a SAN then that is not really possible.
- Drive is compressed
Checking the drive and yes it was compressed so the network guys turned this off and bingo all we managed a full nightly backup.
Trying to create a new SQL Server 2005 Reporting Services subscription and keep getting the following error:-
Failure sending mail: At least one of the From or Sender fields is
required, and neither was found.
I've checked and the To and Reply-To fields have a full email extension e.g. MyName@Company.com
The fix is quite an easy one:-
Look in the RSReportServer.config file usual located in:-
C:\Program Files\Microsoft SQL Server\MSSQL.1\Reporting Services\ReportServer
Search under the <RSEmailDPConfiguration> for <From></From> here I noticed it had the server name so <From>ReportServer1</From>.
I changed this to be <From>Support@Company.com</From> and now the subscription works fine.
Tried to connect to a SQL Server using Microsoft SQL Server Management Studio 2005 and got the following error message (plus the databases wouldn't show):-
Index was outside the bounds of the array. (Microsoft.SqlServer.Smo)
Check the SQL Server version and it was a SQL
Server 2012 SP1 CPU5 Enterprise Edition.
I just used Microsoft SQL Server Management Studio
2012 and all is well
Had a strange error with SSRS 2005 on Windows 2003 Server running IIS6. Trying to load the Web Reports Manager for SSRS 2005 at http://localhost/reports and I would get the following error:-
Server Error in '/Reports' Application
The resource cannot be found
Description: HTTP 404.
Ok but I can load up:-
So I thought the Default content page wasn't set - nope it was?
OK so what is going on, only different is Asp.net 4.0 was installed. Saw some articles saying maybe the Asp.net version wasn't set correctly for that Web Applications, but again checked and it was still set to
Seemed like the root web
properties (Default Web Site Properties in this instance) was set to Asp.Net 4.0.
OK so changed this back to Asp.Net 2.0 and restarted IIS. Bingo no SSRS 2005 http://localhost/reports works again.
I came across an issue today in SQL Server Management Studio. On a particular database I right clicked and selected properties and was presented with the following error:-
Cannot show requested dialog. (SqlMgmt)
Property Owner is not available for Database
''. This property may not exist for this object, or may not be retrievable due to insufficient access rights. (Microsoft.SqlServer.Smo)
So I ran sp_helpdb
And sure enough under the database the owner was NULL
Just run the following command on the database without
an owner, here I am using sa but you can use whichever owner you want:-
EXEC sp_changedbowner 'sa'
First time I've come across this. Imported some data from Excel 2010 into SQL Server Table. Tried to match against some other data already in SQL Server and notice certain values where not matching even though to the naked eye these look exactly the same and the
field is the same varchar.
So did a quick HexEdit check (thanks Visual FoxPro for this handy tool) and found the following:-
like in Excel or in the import process a space (last 3 characters) has been translated into:-
Normally I see space in SQL as:-
So a quick REPLACE(Field, CHAR(160), CHAR(32)) and now the values match.