Red Gate forums :: View topic - MakeDatabase command line - erroring out
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
SQL Packager Previous Versions
SQL Packager Previous Versions forum

MakeDatabase command line - erroring out

Search in SQL Packager Previous Versions forum
Post new topic   Reply to topic
Jump to:  
Author Message
Sue_W



Joined: 04 Feb 2008
Posts: 4

PostPosted: Mon Feb 04, 2008 11:47 pm    Post subject: MakeDatabase command line - erroring out Reply with quote

I am trying to run our sql packager 5.4 executable on a Windows Vista OS with SQL Express 2005 using command line. I ran the same executable successfully on other installations of Vista/Sql Express but not this particular computer. The executable creates the database with username and roles fine: however, an error pops up immediately after saying that the username / login already exists. I know that the login does exist on this machine and is applied to other databases. I tried deleting the login and users from the other databases but I still get the same error message. It almost appears to be a permission issue but I ran the command line with a sql authenication that has sysadmin priviledges.

There is a reference to (sp_grantloginaccess N'UserName') as part of the error.

The windows user is an administrator on their machine.

Does anyone know what else this could be?
Back to top
View user's profile Send private message
Brian Donahue



Joined: 23 Aug 2004
Posts: 6641

PostPosted: Sat Feb 09, 2008 10:56 pm    Post subject: Reply with quote

Hi Sue,

It sounds like the problem that you always have with Packager migrating Windows database users from one machine to another. Packager picks up the difference in the machine names as a difference, but the SQL Server only sees the user names and can't create the login.

My best advice is to exclude all user and role objects from the database and use the SQL Options to ignore all permissions. If the user has no explicit permissions in the database, you can try tracking down the role memberships for the user and remove them as well as the user itself.
Back to top
View user's profile Send private message
Sue_W



Joined: 04 Feb 2008
Posts: 4

PostPosted: Mon Feb 11, 2008 5:10 pm    Post subject: Reply with quote

Hi Brian,

I read your reply and I tried removing the login and user from this sql server and the install still fails. It's not an option for me to remove the login, user, role and permissions from this executable as a general rule we are creating new single databases and need those. The odd thing about this issue is that we successfully installed the same package on another user's machine with the same OS/Sql setup and the user also had pre-existing databases with user, etc already installed.

I appreciate the help.

Thanks!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group