StrataFrame Forum
Home      Members   Calendar   Who's On
Welcome Guest ( Login | Register )
      



Deploy 1 package to multiple databases on...Expand / Collapse
Author
Message
Posted 02/02/2010 12:53:23 PM
StrataFrame Novice

StrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame Novice

Group: StrataFrame Users
Last Login: 06/09/2010 1:43:54 PM
Posts: 62, Visits: 531
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
Post #25732
Posted 02/02/2010 6:19:57 PM


StrataFrame Developer

StrataFrame Developer

Group: StrataFrame Developers
Last Login: 08/31/2010 2:36:53 PM
Posts: 6,287, Visits: 6,191
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.

Post #25737
Posted 02/03/2010 1:38:18 AM
StrataFrame Novice

StrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame Novice

Group: StrataFrame Users
Last Login: 06/09/2010 1:43:54 PM
Posts: 62, Visits: 531
Funny thing happened this evening on the way to the bathroom at Subways. I was thinking, you know, that wildcard value pre-filled in that field with the instructions next to it, probably takes care of the database naming issue. I tried it out, and then looking at the xml files for the Profilescripts I noticed that it reference the Database key, not the name, so I figured I bet that takes care of that too. It did! Later I got home and thought, let me reply to my message before they respond. Arghh!! too late.

Anyway, thanks (though I can't promise that later I won't have another question if I'm nowhere near the epiphany chamber.)

However, I got a little issue now. I have two databases in one profile. I added the wildcard to the filegroup for the first database. I left the filegroup for the second database blank, because it wouldn't let me put the wildcard in it. That worked for a while, but then suddenly the name of the last database I installed appeared in the 2nd database's filegroup. When I try to give the 2nd database the same wildcard value it won't let me. Neither will it let me leave it blank. What gives? Is there a "wilcard" type of way to force both tables in same filegroup using your interface?

Marcel
Post #25742
Posted 02/03/2010 10:21:18 AM
StrataFrame Team Member

StrataFrame Team Member

Group: StrataFrame Developers
Last Login: 08/26/2010 11:24:19 AM
Posts: 356, Visits: 720
Yep, you are right. I went in and reproduced it and we aren't accounting for wildcards when we check for duplicate physical file names.

We've corrected it, and the correction will go out with the next build.  In the mean time, the work around is to add anything to the wildcard to make it a unique name for the profile. So instead of the default "$DbName$", change the second database to "$DbName$_Standard" or anything else unique for the profile and it will allow you to save the record and deploy.

Post #25746
« Prev Topic | Next Topic »


Reading This TopicExpand / Collapse
Active Users: 0 (0 guests, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: Trent L. Taylor, Steve L. Taylor, Dustin Taylor

PermissionsExpand / Collapse

All times are GMT -6:00, Time now is 8:41am

Powered by InstantForum.NET v4.1.4 © 2010
Execution: 0.063. 9 queries. Compression Enabled.
Site Map - Home - My Account - Forum - About Us - Contact Us - Try It - Buy It

Microsoft, Visual Studio, and the Visual Studio logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries.