RE: Sql Server Access Denied
From: Steve S (SteveS_at_discussions.microsoft.com)
Date: 08/09/04
- Next message: Big Kahunna: "VB.NET Errors when inserting into old version of Foxpro"
- Previous message: Steve S: "RE: Timeout Expired for no apparent reason"
- In reply to: anonymous_at_discussions.microsoft.com: "RE: Sql Server Access Denied"
- Next in thread: Erland Sommarskog: "Re: Sql Server Access Denied"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 9 Aug 2004 00:31:01 -0700
OK. From your interactive login, you need to run the osql utility.
If you have MSDE installed, the easiest way is to get a command prompt (cmd),
then use
osql -S. -E -d xyzzy
-S. says use local machine, -E says use 'Integrated Authentication'.
xyzzy is your database name.
You then get a '1>' prompt.
Now you can type the sp_grantlogin command, hitting Enter at the end,
then type GO and hit enter (your prompt will be '2>' at this point.
Now type the sp_grantdbaccess command in, again, hitting Enter at the end,
then type GO and hit enter (your prompt will be '2>' at this point.
Finally, type QUIT and hit enter, and your osql session should stop.
Steve S
"anonymous@discussions.microsoft.com" wrote:
> Hi Steve, Thank you so much for your reply. I did not
> specify any password for 'sa' while I installed the Sql
> Server. I am a newbie in Sql Server and this is my degree
> project. I ma not sure where to specify sp_grant access
> and grant login. Could you please be more detailed. I
> would apprecaite it. Thank you shanthi
> >-----Original Message-----
> >1. If you're using "Trusted Connection", then the user
> you connect as must
> >have database access rights to the appropriate database.
> >
> >2. If you don't use "Trusted Connection", then the
> server must be running in
> >mixed-mode security. You would then need to
> supply "UID=name;PWD=password;"
> >within the connection string.
> >
> >It works with your laptop probably because you're
> running from the same
> >interactive login you used to install MSDE, so you'll
> have dbo rights.
> >
> >You can check if it's using mixed mode by looking at a
> couple of registry
> >keys, depending on whether it's a named instance or the
> default one.
> >
> >If it's the default instance, then look in
> >
> >HKEY_LOCAL_MACHINE\Software\Microsoft\MSSqlServer\MSSqlSe
> rver
> >
> >for a value named "LoginMode". If this is 0 or 2, you
> are running in mixed
> >mode, if not, then you are running in Windows
> Authorisation mode only, which
> >means you HAVE to use trusted connections.
> >
> >As I'm not an ASP guru, I couldn't tell you which user
> it runs as, but I bet
> >someone around here knows :)
> >
> >When you installed, did you have to specify a password
> for "sa"? If not,
> >it's probably the case that you only have trusted mode
> on.
> >
> >You would need to use
> >
> >sp_grantlogin 'machine\account'
> > and
> >sp_grantdbaccess 'machine\account' 'account'
> >
> >to allow the user to connect.
> >
> >Steve S
> >
> >"shanthi" wrote:
> >
> >> I am getting the error "Sql server does not exist or
> >> access denied" when I connect an asp application and
> sql
> >> server through an oledb connection. The connection
> string
> >> is as follows:
> >>
> >> Set cnnStoredProc = Server.CreateObject
> >> ("ADODB.Connection")
> >> cnnStoredProc.Open "Provider=SQLOLEDB;Initial
> >> Catalog=name of the database;Data Source=server
> >> name;Trusted_Connection=yes"
> >> The same string works fine in my laptop when I try
> >> connect asp and msde on my laptop. I also tried to
> change
> >> the connection staring with various parameters for
> >> example I tried to use IP address instead server name
> and
> >> tried specifying the port number too(1433), I tried
> using
> >> Trusted Connection value to be True/False/No. Nothing
> >> seems to work. Pls help me .
> >>
> >> Thanks in advance
> >> Shanthi
> >>
> >.
> >
>
- Next message: Big Kahunna: "VB.NET Errors when inserting into old version of Foxpro"
- Previous message: Steve S: "RE: Timeout Expired for no apparent reason"
- In reply to: anonymous_at_discussions.microsoft.com: "RE: Sql Server Access Denied"
- Next in thread: Erland Sommarskog: "Re: Sql Server Access Denied"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|