Hi
You will need to post db1.sql to be certain. Try using the command without
specifying the file and see what it says. If you are not connecting to the
default instance/database then specify the server -S flag (it may be better
to do this regardless!) and database -d flag as well. If you are not an
administrator (or the BUILDIN\Administrators group has been removed from the
logins) then specifying -U sa -P<sa password>.
John
<ar********@hotmail.com> wrote in message
news:11**********************@z14g2000cwz.googlegr oups.com...
I have to create database usign OSQL. i am usin a command like this
C:> osql -E -i db1.sql
But it doesnt create database and returns error saying user login
failed for administrator whereas I have no user for SQL server n it
uses by default . I also tried with sa username by entering it with -U
switch in command but still it gaves same error. Can anyone help me