DDT NameOnServer not working


Author
Message
Randy Jean
Randy Jean
StrataFrame User (233 reputation)StrataFrame User (233 reputation)StrataFrame User (233 reputation)StrataFrame User (233 reputation)StrataFrame User (233 reputation)StrataFrame User (233 reputation)StrataFrame User (233 reputation)StrataFrame User (233 reputation)StrataFrame User (233 reputation)
Group: StrataFrame Users
Posts: 105, Visits: 641
I didn't think to even try the deployment wizard to see if that works. This is all in code right now, but that's a good thought.



I did try setting the filename to $dbname$ but then when I tried running my code again it got an error saying: Drop failed for DataFile 'MyLocalDb_Data'. Why would it now be trying to drop something? I checked and there was nothing in they object history of the DDT project so I'm not sure what's going on. I don't want it trying to drop anything, just create a different target database.



Trying to figure this out and also wrestling with Windows Installer trying to figure out how to deploy minor updates without having to add/remove previous version. Why is deployment so complicated? Seems I spend more time on deployment these days than actual coding.
Dustin Taylor
Dustin Taylor
StrataFrame Team Member (938 reputation)
Group: StrataFrame Users
Posts: 364, Visits: 771
You are setting the "Database name on server" to a different name on the last page of the deployment wizard, correct?

If so, it may be trying to deploy both database to the same .mdf file name. You need to set your file groups to use a replacement value. Edit the primary file group of the database in your DDT profile and change the name to use the $DbName$ replacement value, then try deploying the databases again.


Randy Jean
Randy Jean
StrataFrame User (233 reputation)StrataFrame User (233 reputation)StrataFrame User (233 reputation)StrataFrame User (233 reputation)StrataFrame User (233 reputation)StrataFrame User (233 reputation)StrataFrame User (233 reputation)StrataFrame User (233 reputation)StrataFrame User (233 reputation)
Group: StrataFrame Users
Posts: 105, Visits: 641
I'm so close to having my deployment issues resolved I can taste it, however,I have one nagging problem that I can't seem to figure out. I need to be able to maintain 2 separate SQLExpress local databases, test and live. I have separate locations set for the connection.dat files, etc. The only thing I can't seemt to get to work is creating a database with a different name than what is in my DDT profile. I step in and see that indeed NameOnServer property is getting set to "MyLocalDBTest" but it just keeps updating updating MyLocalDB and never creates the test database. Any ideas?







Dim _DatabaseSetup as New SQL.DatabaseMigrator



Dim loDatabase As New DatabaseTargetName("MyLocalDb")



loDatabase.NameOnServer = CStr(IIf(MyApp.AppMain._TestEnv, "MyLocalDbTest", "MyLocalDb"))



' using NT auth, no user/password

_DatabaseSetup = New DatabaseMigrator("MyServer", True, Me)



_DatabaseSetup.EnableLogging = True

_DatabaseSetup.DeployMetaData("MyLocalDBPackage.pkg", "", New DatabaseTargetName() {loDatabase})




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