I've got a SQL script to create a database and populate it with the necessary tables, views and stored procedures. I've also added what I thought would be the necessary SQL code to create 2 new logins. But whenever I run this on a machine, I always get this error (I'll show just one error, but it's the same for the other login):
'intake' is not a valid login or you do not have permission.
Now, as it so happens, I always create these installations with the logged in user having administrator rights on that instance of SQL 2008 R2 Express, so I don't believe they don't have enough permissions. I'm doing this on Windows 7 Professional machines.
I'm beginning to wonder, would I be better off writing a SQL script to create the 2 logins, run that first, and then run the SQL script to create the database?
Connect with me on LinkedIn