MakeDatabase command line - erroring out

Sue_WSue_W Posts: 6
edited February 11, 2008 11:10AM in SQL Packager Previous Versions
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?


  • Brian DonahueBrian Donahue Posts: 6,590 New member
    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.
  • 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.

Sign In or Register to comment.