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



Database Physical File LocationExpand / Collapse
Author
Message
Posted 02/28/2007 10:02:29 AM
StrataFrame User

StrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame User

Group: StrataFrame Users
Last Login: Yesterday @ 12:38:37 PM
Posts: 308, Visits: 1,229
I am using a separate database for the role based security files and when I deploy for the first time it automatically creates the physical database files in a default folder. We have customers that implement policies for the physical location of database files. Is there any way to specify the folder location if the database does not exist? I basically use your standard deployment routines, which I have wrapped for customer use, so does your standard deployment routine currently support this?.

Tim

Post #7216
Posted 02/28/2007 2:47:51 PM


StrataFrame Developer

StrataFrame Developer

Group: StrataFrame Developers
Last Login: 2 days ago @ 5:02:56 PM
Posts: 2,682, Visits: 1,882
Yes, when you create the database using SMO, if you specify the filename, you cannot specify it without also specifying the folder in which to create it.  So, we use the server's properties to determine the default path setup by SQL Server and the user-specified path for the data.  If the user path is specified, then it gets used, otherwise, the default path gets used.


www.bungie.net
Post #7221
Posted 03/14/2007 1:44:42 PM
StrataFrame User

StrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame User

Group: StrataFrame Users
Last Login: Yesterday @ 12:38:37 PM
Posts: 308, Visits: 1,229
I can't seem to find where to set the folder name to create the physical .dat file and transaction log file. Is there some place to do this in the mddeployprocess or do I have to modify the source code to do this.

Thanks

TIm

Post #7477
Posted 03/14/2007 5:02:55 PM


StrataFrame Developer

StrataFrame Developer

Group: StrataFrame Developers
Last Login: 2 days ago @ 5:02:56 PM
Posts: 2,682, Visits: 1,882
There is not a place within the DatabaseMigrator to allow you to specify the exact path for the file when it is created.  The code looks like this:

If _SQLServer.Settings.DefaultFile.Length > 0 Then
    lcReturn = _SQLServer.Settings.DefaultFile
Else
    lcReturn = _SQLServer.Information.MasterDBPath
End If

The _SQLServer is a Microsoft.SqlServer.Management.Smo.Server object.  The Settings.DefaultFile is the default location for the data set by the install of SQL Server.  The Information.MasterDbPath is the path that you can specify within the server properties in SQL Server Management Studio.  So, it always places the .mdf files within the default database location.  If you need to change that, you'll need to change the source code.  In the DatabaseMigrator class, it's either going to be the GetDataFilePath() method or the CreateSmoDataFile() method.


www.bungie.net
Post #7490
« 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: Ben Chase, Trent L. Taylor, Steve L. Taylor

PermissionsExpand / Collapse

All times are GMT -6:00, Time now is 5:01pm

Powered by InstantForum.NET v4.1.4 © 2008
Execution: 0.063. 13 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.