Re: ASP access to SQL Database




Steve,

am still working on this, is difficult to find time to really follow through
at the moment.
Our SBS however was installed before my time here, and I know that some
"fiddling" was done, have already done a lot of work getting things back to
norm and properly functional.

I saw in MS article 306518 a reference to configuring SQL server to use
Standard Security. Ours is showing set to "Windows Only" rather than "SQL
Server and Windows".

Is this normal default for SBS? Would it perhaps make sense to change to
SQL Svr and Windows security?






"Steve Foster [SBS MVP]" wrote:

Ken-T wrote:

Hi,

on SBS premium....
taking some first steps with a test DB in SQL and some ASP pages .
Just need to get one or two things working so can get a better idea if a
project involving a major DB with lookups from Domain users via ASP on IIS
is
worth the effort.
(Yes, I will buy a book and study it properly when I start.... anyone has
and ideas for a really good book for database access via ASP would
appreciate
it).

For first step, an ASP page on IIS with contzent shown below fails with
"no trusted SQL connection.... error with login of user sa" etc.
<%
Dim conn
Set conn = Server.CreateObject("ADODB.Connection")
conn.Open "Provider=SQLOLEDB; Initial Catalog = Northwind; User Id = sa;
Password="
If conn.errors.count = 0 Then
Response.Write "Connected OK"
End If
%>

Am sure it is due to the users set for DB acess on SQL.
In Enterprise, I see only dbo and dbadmin.
IIS is running as default (I think) with IUSR_Sysname as user for
"anonymous"

Would appreciate any help/tips for setup of a correct, read only access
method to db's

The default condition for SQL on SBS is that it is configured for Windows
Authentication only. Since SA is a SQL Login, this fails.

If the plan is to make use of domain user accounts, this is fine, but you
need to configure IIS to impersonate the domain users (ie not use IUSR_*)
*and* to add the domain users to SQL (SQL starts out with only
<domain>\Administrators having access). You need to change the Connection
String to request a Trusted Connection to SQL Server as well.

To configure IIS to impersonate users, either:

a) disable anonymous access in the website/virtual directory properties, or
b) use NTFS security on the underlying files and folders so that the
IUSR_* account doesn't have privileges.

To configure SQL Access for domain accounts, use Enterprise Manager to add
them as Logins, and then specify the database rights for the logins. I
would recommend you create domain groups that mirror the security levels
you wish to create, grant the groups SQL logins, and then place user
accounts in the relevant groups.

--
Steve Foster [SBS MVP]
---------------------------------------
MVPs do not work for Microsoft. Please reply only to the newsgroups.

.



Relevant Pages

  • RE: NOLOCK due to data movement
    ... It is unfortunate that you do not understand that this is an SBS problem. ... The default instance of SQL 2005 is working fine. ... Please understanding our newsgroup is mainly focused on SBS support. ... Microsoft CSS Online Newsgroup Support ...
    (microsoft.public.windows.server.sbs)
  • Re: how do I change the user install wizard to create user folder in different location?
    ... Les Connor [SBS Community Member] ... >> Regarding SQL and Sharepoint, ... >> file where I'm suppose to register the SHAREPOINT instance of SQL Server ... another install which is on just Windows 2003 server and SQL2000 ...
    (microsoft.public.windows.server.sbs)
  • Re: SQL service pack 4 & SBS 2003 premimum version
    ... Thank you for posting in the SBS newsgroup. ... SBS SharePoint with SQL ... whether SQL server is being installed or not. ... it will install the sixteenth instance of MSDE ...
    (microsoft.public.windows.server.sbs)
  • Re: SBS 2003 Std - SQL Eval expired...will un-installing break SBS fun
    ... I agree with Claus that you're able to remove SQL 2005 instances if you did ... you can get SBS R2 which already contains SQL Server 2005 ... Workgroup Edition, and upgrade Sharepoint instance, and install other ...
    (microsoft.public.windows.server.sbs)
  • Re: Hosting, in or out?
    ... But then if they host they're own WebServer in DMZ and the SQL in the LAN, ... The key thing here is that the Application must access the SBS SQL ... to hit the SQL database on SBS also. ... For the Remotely hosted Web App to be secure, ...
    (microsoft.public.windows.server.sbs)