/build/static/layout/Breadcrumb_cap_w.png

Creating A SQL Server User Account In An MSI

I actually have two parts to this question. Is there any way to have the MSI recognize all SQL Server or MSDE databases that are installed on a certain server and to allow the user to create a login account for them during setup?

I am building a web application that will need rights to a database that already exists before it can run. I want the MSI to begin running and then ask the user to select a DB. Then I need the user to be able to specify a username and password to create for access to that database.

Any help would be appreciated.

I am using WISE Package Studio 5.1

0 Comments   [ + ] Show comments

Answers (3)

Posted by: wiseapp 18 years ago
Second Degree Green Belt
0
Hi Grim:

First of all the answer to your first question:

1. you could create a wise script and execute the query
select name from sysdatabase
this would return all the databases attached to the SQL/MSDE
You could then store these results in a variable or/and then transfer the output to a text file.

2. to allow user to create a login

you again run a SQL script that is grant permission (please read about this on the net since I have forgotten SQL).
using wise script editor it would be easy to do all the above tasks. However should you still require help in doing so please get in touch with me.
Posted by: grimmeissen 18 years ago
Senior Yellow Belt
0
Thank you for the response. I figured I would have to create some SQL scripts inside the MSI in order for this to happen. I will look elsewhere to find out how to create an account in transact SQL.

The only sticking point on this is that the SQL inside the Wisescripts would need admin access to the database to read from the sys tables or to create accounts. I will probably run the SQL under the windows login account hoping that it will have sufficient privileges to the server's databases.
Posted by: wiseapp 18 years ago
Second Degree Green Belt
0
Hi Grim:

Well if you are using the new MSDE engine that with sp3 then you could probably use this command to give the user admin access:

osql -E
> Select name from sysdatabase
>go

Master DB so on and so forth

if you give osql -E it takes the current logged in user security account and logs him as the admin. Try it.
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ