developer deployment and authentication

Jun 1, 2011 at 4:50 PM

I  downloaded a project I will be working on with someone and am able to open the project and see the structure of the db and have the same directory mappings on my end. When I try to Run_Create_Scripts.bat  in deployment targets SourceDB_dev I get an error "Cannot open database "SourceDB" requested by the login. The login failed." Seems to be using windows authentication. Does this need to be setup differently on the SourceDB, so I have permissions in the db or what must I change?

Thanks for any assistance

Jun 2, 2011 at 4:40 AM

Hey mate,

Very possibly the CreateDB.sql script is failing.  Double click on it, and check that the path names for the .mdf and .ldf files are correct.  Very often these are different on different development machines.

Otherwise, you can create a new Deployment target.  When creating a new Target, you will be asked whether you are using SQL or Windows Auth.  Once this is created, simply right-click on "Deployment Targets", and say "Write Targets".  Choose the "No" option when asked to refresh the data.

Have fun,

- Nathan

Jun 2, 2011 at 4:03 PM

Nathan Thanks.

 My issue is as a developer, someone creates the db, I get a project with source code for the db. I can indeed change the db path in CreateDB.sql but I get a login error when trying to run the Run_Create_Scripts.bat presumably because the db was checked in with windows authentication, not sql authentication. Seems not to be my deployment target but my ability to run the bat with windows authentication. Is that possible? Or change the authentication method for the db?

Jun 7, 2011 at 9:36 AM

Hey mate,

The batch file is just a simple DOS .bat file. 

You can easily copy just one line of this file and run it in an ordinary command prompt. 

There are two types of entries in this file : sqlcmd or data loading entries.

Have you tried using sqlcmd from the comand prompt manually ?  Have a look on the web for some help-files for sqlcmd.  Once you can execute a script file using sqlcmd, then check that the parameters you are using are the same as the ones in the run_create_scripts.bat file.

Have fun.

- Nathan.