Re: help :Deploying a preconfigured database

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



You can use the following KB article to script logins:

HOW TO: Transfer Logins and Passwords Between Instances of SQL Server
http://support.microsoft.com/default.aspx?scid=kb;EN-US;q246133

You will want to make sure that you create appropriate script files to set
up the logins and assign the permissions. You should be able to run these
files via osql.exe (a command line tool). You will want to provide whatever
error checking is necessary within the script so that you do not get errors.
For example, lets say that your config requires the SQL Server login 'user.'
You need to create user. If your script attempts to create user but they
already exist an error will be displayed and that could halt everything that
comes after that specific point within the script. You will first want to
check to see if user exists. If they do, do nothing. If not, add them.

--
Keith


"serge calderara" <sergecalderara@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in
message news:BC62E884-8286-44B9-B68C-D6E92148259F@xxxxxxxxxxxxxxxx
> Dear all,
>
> One of our application consist of configuring an SQL server database with
> user rights to tables and preparing corresponding store procedure.
>
> usually when we do this, we prepare the server in our test environment and
> then ship the whole hardware pre configure to customers.
>
> in some cases we do not have the customer server, so we need to do the
> whole
> configuration on site and in cas of errors its hard to find.
>
> is there an easy way to prepare the SQL confisuration database, store
> procedure, table rights on a test PC, then do a kind of straight forward
> deployement on any server running SQL ?
>
> thanks for your help
> regards
> Serge
>


.



Relevant Pages

  • Re: Error 15401 using sp_grantlogin (not addressed by current KB articles)
    ... Restarting Windows 2000 resolved the problem for this particular account, ... confused when it sees a duplicate SID. ... > One way to get SQL Server to agree with the renamed NT ... > Preview (to ensure the script was created), ...
    (microsoft.public.sqlserver.security)
  • Re: A script to capture Orphan userids
    ... to create logins on "downstream" servers. ... Transfer Logins and Passwords Between Instances of SQL Server ... So I'd like to set up an automation using a script to catch orphan ids. ...
    (microsoft.public.sqlserver.server)
  • Re: Add columns to table, but in an order
    ... in the order that SQL Server mentions them, with no way for the end user ... existing constraints and recreate them when the new table is in place. ... be very critical of the script ... Make sure to test the conversion on a test server first. ...
    (microsoft.public.sqlserver.server)
  • Re: SQL Security
    ... except I'm having problems making it work in a script. ... ;Set properties of DB objects and open connection to database ... > from Books Online (within the SQL Server program group): ... > communicate with SQL Server. ...
    (microsoft.public.sqlserver.server)
  • Re: Scripting a SQL database
    ... Virtually everything SQL Server Enterprise Manager does can be ... To run the generated script in ASP, ... You can also create a DTS (Data Transformation Package) ... that you'll want to select the "copy database objects and data" ...
    (microsoft.public.sqlserver.server)