Deploy 1 package to multiple databases on same server


Author
Message
Marcel Heitlager
Marcel Heitlager
StrataFrame User (164 reputation)StrataFrame User (164 reputation)StrataFrame User (164 reputation)StrataFrame User (164 reputation)StrataFrame User (164 reputation)StrataFrame User (164 reputation)StrataFrame User (164 reputation)StrataFrame User (164 reputation)StrataFrame User (164 reputation)
Group: StrataFrame Users
Posts: 84, Visits: 835
Hi guys,



I'm trying to do the above. I've looked at the sampledatainstaller and DatabaseMigratorClass info. Still have a few questions though.

1. Is it possible to install a database to a filegroup programmatically? IOW supply the value at runtime?

2. How can I select a database to apply a profile script to that's not in the drop down? Is it possible to change that value on the fly as well?

3. If I want to do a Grant EXEC on PPMUserSecurity_Delete to SOMEID in the script for stored procedures, is it possible to pass in the SOMEID value on the fly?



Thanks
Reply
Trent Taylor
Trent Taylor
StrataFrame Developer (8.7K reputation)StrataFrame Developer (8.7K reputation)StrataFrame Developer (8.7K reputation)StrataFrame Developer (8.7K reputation)StrataFrame Developer (8.7K reputation)StrataFrame Developer (8.7K reputation)StrataFrame Developer (8.7K reputation)StrataFrame Developer (8.7K reputation)StrataFrame Developer (8.7K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
Yes, this is all possible and is actually what we do with our medical application.

When you create a file group, you can use a wildcard which will change with the name provided for a database.  This is actually done by default, but this is how you can have as many different databases deployed to the same server through the same package with a different name.  You just have to supply the deployment name.  You can do this programmatically or through the standard pre-built dialogs.  To have the file group rename itself with the database name you supply at run-time, use the $DbName$ wildcard:

As for executing a profile script for a database that doesn't exist, just use the master database and then you can use your profile code to either set a database or execute on a database just as you would for any other SPROC.

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search