PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Forums Hébergement > Forum Hébergement serveur > comp.db.ms-sqlserver > connect string problem
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
connect string problem

Réponse
 
LinkBack Outils de la discussion
Vieux 21/09/2007, 22h22   #1
Daniel Loose
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut connect string problem

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
  Réponse avec citation
Vieux 21/09/2007, 22h46   #2
Daniel Loose
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: connect string problem

....perhaps I could get out if I knew where exactly to find really
exact error log?! =) ole db status and whatever... thanx again!!
  Réponse avec citation
Vieux 21/09/2007, 23h32   #3
Erland Sommarskog
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: connect string problem

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/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx
  Réponse avec citation
Vieux 22/09/2007, 01h00   #4
Daniel Loose
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: connect string problem


|
|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 me out? where to find them?
where to get more details? thanx again!!!!


  Réponse avec citation
Vieux 22/09/2007, 11h10   #5
Erland Sommarskog
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: connect string problem

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 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 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/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx
  Réponse avec citation
Vieux 22/09/2007, 12h21   #6
Daniel Loose
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: connect string problem

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 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!
  Réponse avec citation
Vieux 22/09/2007, 15h14   #7
Erland Sommarskog
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: connect string problem

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/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx
  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 01h55.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,14942 seconds with 15 queries