Re: SQL Server Express



Andrea Montanari wrote:
hi Ken,
Ken Allen wrote:

<snipped />
you can get the full documentatiom, BOL , from http://www.microsoft.com/downloads/details.aspx?FamilyID=BE6A2C5D-00DF-4220-B133-29C1E0B6585F&displaylang=en

Thanks. This helps.

<snipped />
SQLExpress installs by only allowing trusted connections, thus you have to manual re-enable at instal time or later, perhaps accessing via SSMSE (http://www.microsoft.com/downloads/details.aspx?FamilyID=82AFBD59-57A4-455E-A2D6-1D4C98D40F6E&displaylang=en) the "properties" of the running instance, selecting the "Security tab" (ok, it's no longer a tab, but I hope you understand :D) and enabling "SQL Server and Windows authentication mode"..
access then the "Security" node, "logins", select "sa" login (which is there) and accessing it's "properties" enable it in the "Status" tab (again, it's no longer a tab :D)

OK, I can do this on my local system and it works.


I have a series of questions, and if anyone can answer some or all of
these, I would be most appreciative.

1. How can I disable Windows users from connecting to or accessing
specific SQL Express databases, but permitting free access to others?


in the "Security" node, "logins", you can see all the registered logins, both Windows accounts/groups, and SQL Server standard logins...
I do only have BUILTIN\Administrators, "sa", NT AUTHORITY\System
if you have further, like BUILTIN\Users, this imply all your local users will be able to connect to your instance.. they have then to be granted access to each database via a database user (and I think I already pointed out that story)..
but are you perhaps using "User Instances"?
if this is the case, then everyone who executes your application will be able to access the referenced database(s) as "user instances" ( or RANU :D) are designed that way..
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnsse/html/sqlexpuserinst.asp

I am not using user instances, so that is not the problem.

I am able to create the database, add the specific logins, define a database user for each of the logins, and assign the default schema to the database users, and then define the schema, and this is working.

I then establish a connection using the new login that is to control the schema, and I add all of the tables and perform initial population, and this is working.

I can connect to the database using the new login that is to access the contents and I can create/update/delete/select data records, but I cannot create or delete tables, as expected.

However, I can login as any Windows user and access and manipulate the schema itself, as well as the database contents!

I cannot always control the installation of SQL Express. When my application is to be installed, I can require that it be present, bu tif it is already present, than I am stuck with the client installation factors.

--> Can I force the 'sa' user to be enabled and valid from code? Can I test for this somehow?

--> How can I prevent valid Windows users from accessing the contents of my database, or at least the schema, from my code alone?

<snipped />
.



Relevant Pages

  • Re: SQL 2008 db_datareader cannot display all tables
    ... db_datareader access rights to a database. ... The logins only display dbo ... I changed the login default schema it ... Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx ...
    (microsoft.public.sqlserver.server)
  • Re: Java is becoming the new Cobol
    ... In the Unisys 2200 environment using their Network Database Server, you get a schema work area depending on how you invoke the schema. ... However, it not only copies the schema area into the program, but the "DMCA" (Database Management Communication Area - basically, the block of information that holds your connection state) is copied in too. ... So, you're left with working-storage, which makes it visible to your program only, or common-storage, which makes it visible to programs linked in. ...
    (comp.lang.cobol)
  • Re: Release of GNADE 1.5.2
    ... Michael> Dear all the GNU Ada Database Development Environment Version ... This release of the GNADE project is intended for building with GNAT ... The GNADE project installation procedure provides for theses product ... 566413 1.3.5a static libraries not build for adbc Makefile modified ...
    (comp.lang.ada)
  • Split messages
    ... This is based off the northwind database. ... Create document schema: ... Select the SQL entry, make sure that we are pointing to the SQL ... For the item select a receive pipeline and name it EmpSplitPipe.btp. ...
    (microsoft.public.biztalk.general)
  • Re: Decouple SQL queries from class in OOP design
    ... > Of course there are existing applications that uses many different ... > architectures and still provides measurable business value. ... > should access every database directly. ... by the database, but the schema changes. ...
    (comp.object)