What are the challenges you face when working across database platforms? Take the survey
Options

Bypassing user creation when user is mentioned in SPs

rafaelsrafaels Posts: 2 New member
edited January 26, 2017 5:35AM in DLM Automation
Hi,

I was hoping you could help me with a problem I have in one of my build plans. I have already created plans for building different databases using DLM 1, and they all work well. However, one of them is failing and I'm not sure how to resolve the matter.

The Database has an owner db user (dbo) and within the stored procedures, there are many references to it (i.e. select * from dbo.TABLENAME where .... ). I normally exclude users from my build plans, but if I do that for this particular DB, the build fails showing many of these: "The multi-part identifier "dbo.LoginSession.PlayerID" could not be bound." However, if I allow the user to be considered for the build, then I get an error saying: "User, group, or role 'dbo' already exists in the current database. Error executing the following SQL: CREATE USER [dbo] FOR LOGIN [********]". I believe the second error occurs because we request the build to be done in our Development environment, which already has all the users created there. We do the build there because there are many linked server definitions that force us to use a predefined server and so we send the parameter 'temporaryDatabaseServer' to the build command.

I'm hoping that there is a straight-forward way to ask the build not to attempt creating the user or to avoid validating the user in the stored procedures.

Please let me know if you need anything else.

Many thanks

Comments

Sign In or Register to comment.