Error After Copying Database From Live Server To Test Server

Microsoft Dynamics GPThis particular error is one I have seen a number of times after a client, or inexperienced consultant, has copied a database from the live server to the test server and run the scripts from the Microsoft Knowledge Base and thought everything was fine after logging in with the sa account (which is another good reason for not using sa as it hides a multitude of errors.

However, as soon as a user tries to log in, they receive the error message shown below:

Microsoft Dynamics GP: A get/change operation on table 'syUserDefaults' failed accessing SQL data.

Microsoft Dynamics GP

A get/change operation on table 'syUserDefaults' failed accessing SQL data.

The cause of this error is quite simple; the SID (Security Identifier) of the Server Login ID and of the Database User are different.

There are two ways of fixing it:

  1. Use SQL Server Management studio (SSMS) to delete the server login and database users and then save the user with a new password from within Microsoft Dynamics GP.
  2. Use SSMS to run an ALETR USER command on the database user to link it to the Server Login.

The latter option is by far the quicker, and there are two methods you can use to do this:

  1. Alter each user individually, which is only feasible if you have a small number of users.
  2. Alter all users in Microsoft Dynamics GP using a SQL script, which is by far the easiest method.

Removing Analytical Accounting from Microsoft Dynamics GP

Microsoft Dynamics GPI recently posted a script to remove the Fixed Asset Management tables from Microsoft Dynamics GP. I wrote that script for a client who wanted to start using Fixed Asset Management, but it turned out the module had been installed at some point in the past and then removed and the client wanted to reintroduce it.

We’ve just had a similar instance come up with a client upgrading from Microsoft Dynamics GP 2013 SP2 to 2016 R2 where Analytical Accountijng has been installed at some stage and removed and was stopping the upgrade from going through.

In this case though, there was (operative word was) a Knowledge Base article from Microsoft on how to remove Analytical Accounting which is no longer available (hopefully it will be back as I understand Microsoft are moving to a new KB system).

The script was available when we had the issue, but a couple of weeks later, the question was asked by one of the other MVPs. By the time I saw the question, they’d been emailed the scripts by one of the others.

However, when my colleague downloaded the scripts they had also saved a copy of the web page, which meant I could grab the download links for the scripts.

  1. Company Database Script
  2. System Database Script

After running the Microsoft scripts, you’ve downloaded using the above links, run the below script on the system database to remove the Analytical Accounting entries from the upgrade tables:

DECLARE @PRODID INT = 3180

DELETE DB_Upgrade WHERE PRODID = @PRODID
DELETE DU000020 WHERE PRODID = @PRODID

As always before running scripts, make sure you have a good backup of your databases.

UPDATED 20/01/2018: Download links updated to working ones

How To Install Microsoft SQL Server 2016: Installing SQL Server Management Studio

Microsoft SQL ServerThis is a short series of posts on how to install Microsoft SQL Server 2016; the series index can be found here.

In previous versions of Microsoft SQL Server, SQL Server Management Studio (SSMS) was always part of the standard install, but it seems this has changed with SQL Server 2016.

Instead SSMS is now available as a separate download. I’d recommend downloading the GA rather than any release candidate which might be available:

Download SQL Server Management Studio (SSMS)

Continue reading “How To Install Microsoft SQL Server 2016: Installing SQL Server Management Studio”

How To Install Microsoft SQL Server 2016: SSIS Configuration For Named Instances

Microsoft SQL ServerThis is a short series of posts on how to install Microsoft SQL Server 2016; the series index can be found here.

In the last post, I installed SSIS, but if you are using a named Instance of SQL Server, there is a configuration step required.

To make the change, there is a file called MsDtsSrvr.ini which, for SQL Server 2016, is located in C:\Program Files\Microsoft SQL Server\130\DTS\Binn. The ServerName needs to be changed to include the full SQL Server Instance Name (as highlighted below):

MsDtsSrvr.ini file in Notepad

Once the full SQL Server Instance Name was added and the file saved, SSIS is ready to use.

How To Install Microsoft SQL Server 2016: Installing SQL Server Integration Services

Microsoft SQL ServerThis is a short series of posts on how to install Microsoft SQL Server 2016; the series index can be found here.

When I started the installation of the Analysis Cubes for Microsoft Dynamics GP as part of my Hands On with GP 2016 R2 series, I knew I needed SQL Server Analysis Services (clue was in the name), but I didn’t initially realise that I was going to need SQL Server Integration Services (SSIS) although in retrospect it should have been obvious too.

The reason SSIS is needed, is that the Analysis Cubes in SSAS are populated by integration jobs from SSIS (scheduled using SQL Server Agent).

So I had to come back and install SSIS. You do this by launching the SQL Server setup utility and, under Installation click on New SQL Server stand-alone installation or add features to an existing installation:

SQL Server Installation Center

Continue reading “How To Install Microsoft SQL Server 2016: Installing SQL Server Integration Services”

How To Install Microsoft SQL Server 2016: Installing SQL Server Analysis Services

Microsoft SQL ServerThis is a short series of posts on how to install Microsoft SQL Server 2016; the series index can be found here.

I typically don’t install SQL Server Analysis Services (SSAS), but decided to this time as I was installing all of the Microsoft Dynamics GP additional products for my Hands On with Microsoft Dynamics GP 2016 R2 series.

To install SSAS, launch the SQL Server setup utility and click on Installation and then on New SQL Server stand-alone installation or add features to an existing installation:

SQL Server Installation Center

Continue reading “How To Install Microsoft SQL Server 2016: Installing SQL Server Analysis Services”

Microsoft Dynamics GP January Hotfix Released

Microsoft Dynamics GPI don’t usually post about releases, except for major version releases. However, the January Hotfix release caught my eye with a few of the included features in the 2016 R2 one.

As well as having the US Payroll updates there are updates to the following which would be of benefit to clients in the UK:

  • VAT Daybook

    • VAT Daybook Summary reports may not show correct data in boxes 1, 6 and 7 if you voided a transaction.
    • VAT detail report may show incorrect figures if you have 2 or more tax codes on a transaction.
  • General Ledger

    • The Excel copy and paste function may not calculate the credit/debit column correctly when using an allocation account.
  • Fixed Asset Management

    • Tax values may not update properly if a user marks to create multiple fixed assets in the Fixed Asset Purchase Order additional information window.
  • Bank Reconciliation

    • You may experience performance issues with the Checkbook Register Inquiry window after you install GP 2016 R2.
  • Project Accounting

    • Ability to change line distributions for time and material projects in revenue recognition.
    • Fee Accounts not available in line distributions button.
    • Purchase Receiving’s not reflecting WIP account edits from Purchase Order for non-inventory items.
  • System Manager

    • Fixed issues with Uncollated printing.

The hotfixes for Dynamics GP 2013 R2 and 2015 R2 only contain US Payroll fixes.

The post from the Dynamics GP Support and Services blog contains the download links.

How To Install Microsoft SQL Server 2016: Configuring SQL Server Reporting Services

Microsoft SQL ServerThis is a short series of posts on how to install Microsoft SQL Server 2016; the series index can be found here.

In the last post, I installed the SQL Server Database Engine and the Reporting Services, but I did not configure Reporting Services. I mentioned that I have had problems before when doing this, so always do it separately.

To configure SQL Server Reporting Services (SSRS), launch Reporting Services Configuration Manager from the Windows Start menu.

Select the Report Server Instance to connect to and click Connect:

Reporting Services Configuration Connection

Continue reading “How To Install Microsoft SQL Server 2016: Configuring SQL Server Reporting Services”

How To Install Microsoft SQL Server 2016: Installing SQL Server Database Engine

Microsoft SQL ServerThis is a short series of posts on how to install Microsoft SQL Server 2016; the series index can be found here.

In this post, I am going to step through the installation of the Microsoft SQL Server 2016 Database Engine. As most of my work is with Microsoft Dynamics GP, there will be a little focus on the installation required specifically for Dynamics GP, but the basic install is the same regardless of whether it is for Dynamics GP or not.

Launch the SQL Server setup utility (setup.exe), select Installation and click on New SQL Server stand-alone installation or add features to an existing installation:

SQL Server Installation Center

Continue reading “How To Install Microsoft SQL Server 2016: Installing SQL Server Database Engine”

How To Install Microsoft SQL Server 2016: Series Index

Microsoft SQL ServerA new version of SQL Server came out last year, and I’ve been creating some new demo machines for use at work. It has become habit to screenshot everything I install or configure, so I decided I might as well post a small series on how to install Microsoft SQL Server 2016 and it’s component parts.

The posts will be made over the coming days and show in the series index, below:

How To Install Microsoft SQL Server 2016
Installing SQL Server Database Engine
Configuring SQL Server Reporting Services
Installing SQL Server Analysis Services
Installing SQL Server Integration Services
SSIS Configuration For Named Instances
Installing SQL Server Management Studio

The installation of SQL Server has been broken down into different posts, as I don’t install all components all of the time, but only install the ones which are required at the time.