| | | StrataFrame 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 |
| | | | 
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 |
| | | | StrataFrame 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 |
| | | | 
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 |
| |
|
|