logo
Welcome to our new AbleCommerce forums. As a guest, you may view the information here. To post to this forum, you must have a registered account with us, either as a new user evaluating AbleCommerce or an existing user of the application. For all questions related to the older version of Gold and earlier, please go to AbleCommerce Gold forum. Please use your AbleCommerce username and password to Login. New Registrations are disabled.

Notification

Icon
Error

Options
Go to last post Go to first unread
Joe Payne2  
#1 Posted : Thursday, April 29, 2021 5:16:30 AM(UTC)
Joe Payne2

Rank: Advanced Member

Groups: HelpDesk, Developers
Joined: 11/9/2018(UTC)
Posts: 564

Thanks: 122 times
Was thanked: 26 time(s) in 25 post(s)
I feel the upgrade needs a little more checking on permissions for tables when doing upgrades.

Here's the scenario:
You have one SQL server
You make a backup of the Gold db.
You create a new SQL db with new SQL user.
You restore that backup to the new SQL database. This new db will be used by the AC9 test site.

The Gold db had most of the tables set to schema of dbo, but the tables that were added back in Gold R10 or R11 (not sure which) got created with schema set to the sql user, not set to dbo. For example in my case, ac_ProductGroups should have a schema of dbo, but instead it's schema is 'wa_shopuser' which is the SQL user configured in the Gold R12 database.config.


Now you fire up AC9, point the install to the restored db and run the install. The install fails with permission errors on specific tables. Why?

The tables with non-dbo schema were restored with the non-dbo schema still assigned, but that schema isn't valid in the restored db for the newly created separate sql user. The result is the sql user for the AC9 install will not have permissions to all of the tables in the db.

A simple fix (in my opinion) is to run a query in the install Step 1 area. The query checks all tables in the restored db to look for any that are not assigned to dbo schema. Then throw up a list of warnings like "Table ac_ProductGroups not assigned to dbo schema, upgrade may fail without proper schema assignments".

I don't think you need to check read/update/delete perms on every single table in the database. While that would be a complete test, it seems overkill. If the install could just let the user know 'hey, you've got a permissions issue here that's going to impact things down the road'...that should be enough.

Wanna join the discussion?! Login to your AbleCommerce Forums forum account. New Registrations are disabled.

Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.