infor.com
concierge
infor u
developer portal
Home
Groups
VISUAL - Enterprise Customer Community
Upgrade to VMFG 6.5.4 and SQL 2008
unknown
I just set up a new server, Server 2008, with SQLServer 2008 and Visual 6.5.4. This was upgraded form SQL2000 and VMFG 6.4.1. I have been able to copy over a valid database and been able to connect using SYSADM but none of the other users can connect. I am not showing any orphans and if I delete a user then recreate the user I can then connect. The problme with is that I then have to go thorugh everyone (60 user) and reset thier secruity setitng in Visual.
Any ideas were to look for this 19005 error?
Thanks
Find more posts tagged with
VISUAL - Enterprise General Discussions
Comments
unknown
We get this situation every time we copy a database (like to our training instance) on SQL Server 2005. The logins (and security privileges) still exist but have been orphaned from the database. We eventually wrote the procedure at the end of this message to fix it--this can only be used with SQL server user accounts, it has no effect on Windows domain accounts if you are using those instead. Once the procedure is created simply run USE (new db name) followed by EXEC GP_FIX_ORPHAN_LOGINS from a sql manager query window. There might be slight changes for SQL Server 2008 but it should be pretty close.
The following link discusses the routine used in the procedure:
msdn.microsoft.com/.../aa259633(SQL.80).aspx
/****** Object: StoredProcedure [dbo].[GP_FIX_ORPHAN_LOGINS] Script Date: 04/05/2010 10:25:34 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROC [dbo].[GP_FIX_ORPHAN_LOGINS]
AS
DECLARE
@USER_ID
VARCHAR(25)
DECLARE LOGIN_CURSOR CURSOR FOR
SELECT sys.syslogins.NAME FROM sys.syslogins JOIN sys.sysusers
ON sys.syslogins.NAME = sys.sysusers.NAME
WHERE sys.syslogins.SID <> sys.sysusers.SID
OPEN LOGIN_CURSOR
FETCH NEXT FROM LOGIN_CURSOR INTO
@USER_ID
@FETCH_STATUS
<> -1
BEGIN
EXEC sp_change_users_login 'update_one',
@USER_ID
,
@USER_ID
FETCH NEXT FROM LOGIN_CURSOR INTO
@USER_ID
PRINT
@USER_ID
END
CLOSE LOGIN_CURSOR
DEALLOCATE LOGIN_CURSOR
unknown
Thanks for the help. I have another question as I am new with SQLServer.
I ran the script in a Query window for the database and still have the same problem and the script says it ran successfully.
I did notice that when I ran the script a second time I got the following error message which does make some sense since it has created the item in the script:
Msg 2714, Level 16, State 3, Procedure GP_FIX_ORPHAN_LOGINS, Line 18
There is already an object named 'GP_FIX_ORPHAN_LOGINS' in the database.
I ran the script than ran:
USE VMFG_2000 (the DB)
EXEC GP_FIX_ORPHAN_LOGINS
1) I did not notice any but are there parameters in your script I need to change for my set up such as user names or DB names
2) I noticed that when Visual Creates a new user it adds a username with # after it and did not know if this had anything to do with it
Sorry for all the questions but I have followed a number of different ways for making the database from the "copy" command to the Restore and still have the same issue so it does seem to be an issue between SQL and the database. If I delete a user and remake them it works fine.
Thanks again for your help
unknown
I have also encountered this problem. The MS SQL server logins are stored in the 'master' database. If you have a backup of the 'master' database it can be restored to a different server, but I don't know how well it works when upgrading. I have only restored it to the same version of MS SQL.
unknown
Sorry, I'm not sure what the problem is then. There are no additional parameters to change, and the script handles the # accounts as well as the normal ones. Was there any output to the messages pane in SQL Management Server when you ran EXEC GP_FIX_ORPHAN_LOGINS? When I run it the pane fills with the name of each user account as it is fixed (this is why the PRINT command is in the procedure), for example:
SHUTH
SHUTH#
NGUENTHO
NGUENTH#
ASELK
ASELK#
DHESSER
DHESSER#
etc...until all users are handled.
We always restore a backup of our live database to another instance, then run the EXEC command. Maybe it doesn't work if you used copy rather than restore at the beginning?
Also, since you're using SQL Server 2008 make sure you are running in 8.0 compatibility mode. Visual requires this, and it's probably not related to the current issue, but you never know.
unknown
Well, after dealing with another issue, I have found out that Visual when converting from SQL2000 to SQL2005, and 2008, does not carry over the users so they need to be deleted prior to the conversion and then re-created after conversion. Thanks for the suggestions given. I have followed their suggestion and had no issues other than the time to re-create users and security settings.
Quick Links
All Categories
Recent Posts
Activity
Unanswered
Groups
Help
Popular Tags
Infor Lawson Human Resources Group - Discussion
Infor Lawson Technology Group - Discussion
VISUAL - Enterprise General Discussions
Infor Lawson Supply Chain Management - Discussion
Process Automation (IPA) - General Discussions
Pegasus - Partner General Discussions
**General Discussion**
Infor Lawson Supply Chain Group - Discussion
Infor Lawson Financials Group - Discussion
Infor EPM Discussions