PC Review


Reply
Thread Tools Rate Thread

Database setup with Windows Installer

 
 
=?Utf-8?B?QmFnZ2Vy?=
Guest
Posts: n/a
 
      15th Nov 2005
I've got an application that requires a SQL Server 2000 database. I have
added a
custom action to my setup project to create the database during the install.
That part works fine. What I need to do now is set up a user for the
database. That's what I'm not sure how to do. During development, the app
has simply logged in as the 'sa' user. I'm definitely not a SQL Server
expert, so I'm not really sure what needs to be done to create a user that
the application can login as. From what I can tell, it looks like I need to
have a database user set up, and that user needs to be tied to a Windows
account. What info do I need to prompt the user for during installation, and
how do I use that info to set up a user for the database that my application
can use to login? Is there some way I can get the Windows user account that
they are using to install the app, and tie a database user to that account?
 
Reply With Quote
 
 
 
 
=?Utf-8?B?SGFuYW5pZWw=?=
Guest
Posts: n/a
 
      16th Nov 2005
You could use osql or sqldbo from install shield setup to run this sp to
grant access to the database. Im sure there are other or better ways.

sp_grantdbaccess [@loginame =] 'login'
[,[@name_in_db =] 'name_in_db' [OUTPUT]]
Hananiel

"Bagger" wrote:

> I've got an application that requires a SQL Server 2000 database. I have
> added a
> custom action to my setup project to create the database during the install.
> That part works fine. What I need to do now is set up a user for the
> database. That's what I'm not sure how to do. During development, the app
> has simply logged in as the 'sa' user. I'm definitely not a SQL Server
> expert, so I'm not really sure what needs to be done to create a user that
> the application can login as. From what I can tell, it looks like I need to
> have a database user set up, and that user needs to be tied to a Windows
> account. What info do I need to prompt the user for during installation, and
> how do I use that info to set up a user for the database that my application
> can use to login? Is there some way I can get the Windows user account that
> they are using to install the app, and tie a database user to that account?

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Setup Project/ Windows Installer Hoop Microsoft Dot NET 1 5th Dec 2006 09:08 PM
Windows Installer / Setup Charles A. Lackman Microsoft VB .NET 1 12th Oct 2005 04:12 PM
Windows Installer and Setup with .NET Viviana Vc Microsoft Windows 2000 MSI 6 5th Sep 2005 05:27 PM
Windows Installer (Setup.msi) Charles A. Lackman Microsoft Dot NET Framework 1 9th Apr 2005 07:03 PM
Windows Installer MSI Setup =?Utf-8?B?SkdsYWNpZXI=?= Windows XP General 4 13th Dec 2004 03:13 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:48 AM.