Re: Creating SQL Server Databases With No Security Restrictions

From: Ross Presser (rpresser_at_imtek.com)
Date: 02/08/05


Date: Tue, 8 Feb 2005 17:55:00 -0500

On Tue, 8 Feb 2005 12:50:40 -0600, Peter van der Goes wrote:

> When I create a database (.mdf) file using SQL Server Enterprise Manager and
> try to "create" a database from it on a different PC, the process appears to
> work. When I subsequently attempt to open that database in Server Explorer
> (by clicking on the + next to the newly-created database name), I get a
> dialog box insisting that I supply either NT Security information or, select
> SQL Server access and provide a username/password for the database. Any
> combination of username/password information I supply at that stage is
> rejected by the dialog. When I open a database supplied by the publisher, no
> such dialog appears and I have full access. My goal is to create databases
> which behave like those supplied by the publisher.

Perhaps this would do the trick:

EXECUTE sp_grantdbaccess guest
EXECUTE sp_addrolemember 'db_owner',guest

Sorry, but I couldn't find an equivalent to this in Enterprise Manager, so
execute it from Query Analyzer.



Relevant Pages