connect string problem
am 21.09.2007 22:22:21 von Daniel Loose
hello,
i use ms sql server 2005 evaluation version. i just want to get an asp
project to work. not to edit, just to work, on my local machine. for
that i use asp studio 2005. (which processes the asp files). i am
almost done, asp is processed, runs, even server connection is up.
but for hours, i cannot establish a working connection, i cannot login
to the ms sql server from the asp scripts. i try and try, nothing
works. i always get [note: this is my own translation from german, not
the actual english error msg] 'error when logging in user bla. this
user isn't assigned to any trusted sql connection.'
i am absolutely new to ms sql and asp. i myself actually develop in
php/apache/mysql. i don't have time to go deeper - i just want to run
this project, for viewing only. *please can anyone tell me what and
where exactly i have to set in ms sql server management studio 9.0*
???!!!
what i did so far:
- set the auth mode to "sql server and win";
(however the manager is connected through win auth because of that
very error)
- my conn string currently is
PROVIDER=SQLOLEDB;DATA SOURCE=DANIEL; Initial Catalog=dbo; User
ID=bla;Password=fasel; (dbo is the database name, DANIEL is the mssql
server name)
- in managemnet studio, in security>auth (?, anmeldungen), where sa
etc is, i created bla, with password=fasel; and in databases>dbo i
added bla to users (i hope so/it looks like).
i also tried integrated security =true or =sspi, instead of user and
pw, resulting in a different error: like "error while processing a
multistep ole db thing, check out the ole db status values. " i would
really like to do that - if I knew how and where! =)
sorry i dont understand all these options and dont want to - just
desperately wish to get this blo*** =) asp project to work. isnt there
any simple solution? any simple setting to do...??!! thanx such a
lot!!!!!!!
daniel
pps win xp pro sp2
Re: connect string problem
am 21.09.2007 22:46:45 von Daniel Loose
....perhaps I could get out if I knew where exactly to find really
exact error log?! =) ole db status and whatever... thanx again!!
Re: connect string problem
am 21.09.2007 23:32:23 von Erland Sommarskog
Daniel Loose (no@reply.de) writes:
> but for hours, i cannot establish a working connection, i cannot login
> to the ms sql server from the asp scripts. i try and try, nothing
> works. i always get [note: this is my own translation from german, not
> the actual english error msg] 'error when logging in user bla. this
> user isn't assigned to any trusted sql connection.'
>
> i am absolutely new to ms sql and asp. i myself actually develop in
> php/apache/mysql. i don't have time to go deeper - i just want to run
> this project, for viewing only. *please can anyone tell me what and
> where exactly i have to set in ms sql server management studio 9.0*
> ???!!!
>
> what i did so far:
>
> - set the auth mode to "sql server and win";
> (however the manager is connected through win auth because of that
> very error)
> - my conn string currently is
> PROVIDER=SQLOLEDB;DATA SOURCE=DANIEL; Initial Catalog=dbo; User
> ID=bla;Password=fasel; (dbo is the database name, DANIEL is the mssql
> server name)
> - in managemnet studio, in security>auth (?, anmeldungen), where sa
> etc is, i created bla, with password=fasel; and in databases>dbo i
> added bla to users (i hope so/it looks like).
In Management Studio, in the Object Explorer, right-click the server
itself, and select Properties. Find Security to the left. On the top
of this page, you have two choices for Server authentication. Select
SQL Server and Windows Authentication mode, the second option. You
need to restart the server for it to take effect.
Once you've done this, use the connect string with User ID and Password.
Windows authentication is usually the recommended means of authentication,
but I believe that for ASP and ASP .Net solutions, SQL authentication
is preferred.
--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downlo ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books .mspx
Re: connect string problem
am 22.09.2007 01:00:30 von Daniel Loose
|
|In Management Studio, in the Object Explorer, right-click the server
|itself, and select Properties. Find Security to the left. On the top
|of this page, you have two choices for Server authentication. Select
|SQL Server and Windows Authentication mode, the second option. You
|need to restart the server for it to take effect.
|
|Once you've done this, use the connect string with User ID and Password.
|
thank you. actually i had already done this. i now also added a login
name u1 with pass p1 to server>security>anmeldung (in english? login?
authent?), and somehow fortunately managed to let u1 appear in
server>dbo>security>users, i.e. below my database. my connstring now
is
PROVIDER=SQLOLEDB;DATA SOURCE=DANIEL;DATABASE=dbo;User
ID=u1;Password=p1
(DANIEL is the mssqlserver name, dbo the database name).
note that from the original project the connstring was
PROVIDER=SQLOLEDB;DATA SOURCE=xyz;UID=xxx;PWD=yyy;DATABASE=zzz
i also tried uid instead of user id and pwd instead of password, which
i assume are just aliases?, that is, i now use the same structure as
in the original project, the objects mentioned in the connstring seem
to exist, the sql auth seems to work since now the server manager
after restart logs in with sql auth, using u/p = u1/p1 -- but, it
still doesnt work. but, the problem appearance slightly differs now:
still, ie takes 5 minutes to "load" the page - but then, no error
message at all appears anymore, nor does the page itself - just a
blank screen. whats up??
i guess, only error logs could still help me out? where to find them?
where to get more details? thanx again!!!!
Re: connect string problem
am 22.09.2007 11:10:42 von Erland Sommarskog
Daniel Loose (no@reply.de) writes:
> i also tried uid instead of user id and pwd instead of password, which
> i assume are just aliases?, that is, i now use the same structure as
> in the original project, the objects mentioned in the connstring seem
> to exist, the sql auth seems to work since now the server manager
> after restart logs in with sql auth, using u/p = u1/p1 -- but, it
> still doesnt work. but, the problem appearance slightly differs now:
> still, ie takes 5 minutes to "load" the page - but then, no error
> message at all appears anymore, nor does the page itself - just a
> blank screen. whats up??
>
> i guess, only error logs could still help me out? where to find them?
> where to get more details? thanx again!!!!
If you get blank page in your browser, I would suspect that there is a
problem with the HTML sent to the broweser. For help to debug that part,
you may be better of in an ASP forum.
If it takes five minutes before you get that far, I would guess this is
because it takes five minutes to run the query. You can verify in Mgmt
Studio that you are connected by running sp_who2. You should be able
to identify your process.
As for why it takes five minutes to run the query, that it's impossible
to tell with the meager information given.
--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downlo ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books .mspx
Re: connect string problem
am 22.09.2007 12:21:56 von Daniel Loose
thanx again!
|If you get blank page in your browser, I would suspect that there is a
|problem with the HTML sent to the broweser. For help to debug that part,
|you may be better of in an ASP forum.
It's rather the five minutes, and *then* blank screen. the asp is
simply the 3 connect lines.
|
|If it takes five minutes before you get that far, I would guess this is
|because it takes five minutes to run the query. You can verify in Mgmt
|Studio that you are connected by running sp_who2.
sorry for my stupid question: *where* to run sp_who2 and how? =)
But apparently a connection is not established.
You should be able
|to identify your process.
|
Please also see my new posting where I just discovered that all user
status > sql server auth are disabled, and I dont know why - since for
the server , sql server auth *is* enabled ("sql server auth and win
auth")
thanx again for you efforts!
Re: connect string problem
am 22.09.2007 15:14:26 von Erland Sommarskog
Daniel Loose (no@reply.de) writes:
> It's rather the five minutes, and *then* blank screen. the asp is
> simply the 3 connect lines.
Not that I know much ASP, but if all you do is to connect, I would
not expect much output...
In any case, since you have not posted any code, and have given a very
vague description of what you are doing, don't execpt very accurate
guesses.
> sorry for my stupid question: *where* to run sp_who2 and how? =)
From a query window in Management Studio.
--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downlo ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books .mspx