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 meHi
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
<arfanameer@.hotmail.com> wrote in message
news:1103900360.199670.188710@.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|||arfanameer@.hotmail.com (arfanameer@.hotmail.com) writes:
> 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
If you get exactly the same error message if you specify "-U sa", then
the server is not configured for SQL authentication.
It would help if you posted the exact error message.
--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp
No comments:
Post a Comment