Install SQL Server 2014: Series Index

Microsoft SQL ServerI thought I had posted this a while ago, but it seems not. This is a short series on the installation of SQL Server 2014 as it would need to be installed for Microsoft Dynamics GP.

System Requirements For Microsoft Dynamics GP 2015 Now Available

Microsoft Dynamics GPThe System Requirements for Microsoft Dynamics GP 2015 are now available from CustomerSource (login required).

The stand out items for me is that support has been dropped for several older versions of Windows, SQL Server and Office:

  1. Windows:
    • Windows XP all editions
    • Windows Vista all editions
    • Windows Server 2003 all editions
  2. SQL Server:
    • 2008 all editions (including R2)
  3. Office:
    • Office 2007

The only surprise on the above list is that some of the software listed as no longer supported was also listed as no longer supported with Dynamics GP 2013; in fact only SQL Server 2008 is new to the list.

Apart from the above retired software, the recommendations look pretty much the same as Dynamics GP 2013; Windows 8.1 and SQL Server 2014 have been added as supported.

SQL Script To Add A Linked Server

Microsoft SQL ServerAfter doing a little work linking databases together for a report, I ended up creating a script to be used within a stored procedure to quickly and easily re-add the linked server (which is required after a reboot of the SQL Server.

To run the script, change the three highlighted fields (server-name, username and password) and click Execute in SQL Server Management Studio:

DECLARE @Server AS VARCHAR(50)
DECLARE @Username AS VARCHAR(50)
DECLARE @Password AS VARCHAR(50)

SET @Server = 'server-name'
SET @Username = 'username'
SET @Password = 'password'

CREATE TABLE #linkedservers
	(SRV_NAME VARCHAR(50)
	,PROV_NAME VARCHAR(50)
	,SRV_PROD VARCHAR(50)
	,SRV_DATA VARCHAR(50)
	,SRV_STRING VARCHAR(50)
	,SRV_LOC VARCHAR(50)
	,SRV_CAT VARCHAR(50))

INSERT INTO #linkedservers
EXEC sp_linkedservers

IF (SELECT COUNT(*) FROM #linkedservers WHERE SRV_NAME = @Server) < 1
	EXEC sp_addlinkedserver @Server, 'SQL Server'

DROP TABLE #linkedservers

EXEC sp_addlinkedsrvlogin @Server, 'false', NULL, @Username, @Password

Change SQL Server From Windows Authentication To Mixed Mode

Microsoft Dynamics GPA while ago I was setting up SQL Server for a test system, I obviously wasn’t paying enough attention because when I tried to launch Microsoft Dynamics GP Utilities I received the below error:

Microsoft Dynamics GP Utilities: This login failed. Attempt to log in again or contact your system administratorMicrosoft Dynamics GP Utilities: This login failed. Attempt to log in again or contact your system administrator

Continue reading “Change SQL Server From Windows Authentication To Mixed Mode”

Deployment Server Has Exceeded The Maximum Request Length Error Deploying Reports To SSRS

Microsoft Dynamics GPWhen Reporting Tools Setup is used t deploy the reports to SQL Server Reporing Services an error be produced if the default configuration of SSRS has not been amended (I thought I’d blogged about this error before, but when trying to find it to send the post to someone I couldn’t find it).

The error produced is the following:

Microsoft Dynamics GP - The deployment has exceeded the maximum request length allowed by the target server. Set maxRequestLength="20690" in the web.config file and try deploying again.Microsoft Dynamics GP – The deployment has exceeded the maximum request length allowed by the target server. Set maxRequestLength=”20690″ in the web.config file and try deploying again.

Continue reading “Deployment Server Has Exceeded The Maximum Request Length Error Deploying Reports To SSRS”

SQL Server Cannot Start Following Maintenance

Microsoft SQL ServerI’ve just finished doing some maintenance on one of my development servers and encountered a problem where I could not restart the SQL Server. The development server was a virtual machine running on VMWare which had a second virtual HDD installed for SQL Server to store the database and log files. This disk had been provisioned at 200GB and over time had acquired a lot of files, such as database backups, which became unnecessary and had filled the 200GB.

I needed to get some of the space back on the VM host so I stopped the SQL Server, copied the SQL mdf and log files to a new HDD, deleted the SQL HDD and then set the drive letter of the new HDD to that of the old one.

I then tried to start SQL Server and received the following error:

Windows Event Viewer - FCB::Open failed: Could not open file E:\SQL208RTM\Live\DYNAMICS.mdf for file number 1. OS error: 5(failed to retrieve text for this error. Reason: 15105).Windows Event Viewer – FCB::Open failed: Could not open file E:\SQL208RTM\Live\DYNAMICS.mdf for file number 1. OS error: 5(failed to retrieve text for this error. Reason: 15105).

Continue reading “SQL Server Cannot Start Following Maintenance”

SQL Script To Locate Columns With Different Collation

Microsoft SQL ServerA while ago I posted about a problem with a collation conflict on a couple of columns in the Tax table. It seems I posted about how to fix the problem, but it seems I didn’t post how I found the problem columns.

I did this with a fairly simple SQL script:

DECLARE @Collation SYSNAME SET @Collation = 'SQL_Latin1_General_CP1_CI_AS'

SELECT
   TABLE_NAME AS 'Table'
   ,COLUMN_NAME AS 'Column'
   ,DATA_TYPE AS 'Data Type'
   ,COLLATION_NAME AS 'Collation Name'
FROM
   INFORMATION_SCHEMA.COLUMNS
WHERE
   DATA_TYPE IN ('varchar','char','nvarchar','nchar','text','ntext')
AND
   COLLATION_NAME <> @Collation

Review of Microsoft Dynamics GP 2013 Implementation by Victoria Yudin

Microsoft Dynamics GPVictoria Yudin, the longest serving Microsoft(R) Most Valuable Professional for Microsoft Dynamics GP, has just released Microsoft Dynamics GP 2013 Implementation via Packt Publishing.

This is an update of the Microsoft Dynamics GP 2010 book she wrote a few years ago, which has been updated for Microsoft Dynamics GP 2013:

Microsoft Dynamics GP 2013 Implementation by Victoria Yudin

In brief this book covers:

  • Plan, install, and implement Microsoft Dynamics GP 2013 with real-world advice from a Microsoft Dynamics GP MVP
  • Learn how to set up the core modules in Microsoft Dynamics GP effectively following detailed, step-by-step instructions
  • Discover additional tools and resources available for your Dynamics GP

Continue reading “Review of Microsoft Dynamics GP 2013 Implementation by Victoria Yudin”

Error Granting Database Access In SQL Server Management Studio

Microsoft SQL ServerI’m currently involved with a couple of projects where we have needed to migrate databases from one SQL Server to another and needed to do so more than once.

Prior to the first copy, we used a script to load the users into SQL Server and then restored the databases and had no problems.

Later on, after changing some of the permissions to databases we had need to remigrate some of them over. However, we found that users could not access some databases and when we tried to add them we got the following error;

Msg 15023, Level 16, State 1, Line 1
User, group, or role 'pidev' already exists in the current database.

It was looking very like we would need to go through each database and remove access and then regrant it all; a labourious process. A quick Google found me a page from Julian Kuiters which introduced me to the ALTER USER command. The following code will run against the selected database and tie together the SQL Server user with the user in the database without any other work;

USE [GPNL]
GO

ALTER USER pidev WITH LOGIN = pidev
GO

The first highlighted element needs to be changed to the database you want to update the user on and then the following two entries are the usernames which need to be linked (these should be set to the same value).

Update: if your usernames contain a space (e.g. I Grieve) then wrap them in square brackets: e.g.

Error Restoring SQL Database

Microsoft Dynamics GPI was in the process of building a virtual machine to do a test upgrade of Microsoft Dynamics GP for a client when I got this error message;

Restore failed for Server. (Microsoft.SqlServe.SmoExtended) Additional information - System.Data.SqlClient.SqlError: Directory lookup for file "e:\SQL Server\Data\GPSGPNLDat.mdf" failed with the operating system error 3(failed to retrieve text for this error. Reason 15105). (Microsoft.SqlServer.Smo)

I know things go wrong and I don’t mind error messages telling me that they have gone wrong; in fact, a good error with details is a good thing to see when there is a problem. But I do mind when the error message doesn’t actually tell me anything (one company I worked with produced error code 0 for every single error which everyone hated but it took about five years before the error handler got fixed to return the real error).

I did a little digging and it turned out to be a nice easy fix; when the VM was created the HDD space allocated hadn’t been big enough for the size of the databases being restored to it. I added a new (larger) virtual HDD to the VM and was able to restore the databases without further error.