Having the graphical logon dialog appear might not be acceptable for automating compiles from a background process such as a command file. There is a way to supply the logon information by setting an environment variable and pointing the variable at a text file that contains the logon ID and password. To do this, set the environment variable SQLPASS.TXT to the name of the text file that contains the logon ID and password. For example:
SET SQLPASS.TXT=D:\BATCH.TXT
Then in the file batch.txt, specify the logon ID and password in the format id.password. For example:
MyId.Mypassword
If the security system used to validate your logon ID and password is case sensitive, you need to specify id.password in the correct case in this text file.