Error occured at Database Deployment Wizard


Author
Message
ChanKK
ChanKK
StrataFrame User (416 reputation)StrataFrame User (416 reputation)StrataFrame User (416 reputation)StrataFrame User (416 reputation)StrataFrame User (416 reputation)StrataFrame User (416 reputation)StrataFrame User (416 reputation)StrataFrame User (416 reputation)StrataFrame User (416 reputation)
Group: Forum Members
Posts: 190, Visits: 1.3K
Hi,

Pls refer to the following errors that I got when I deploy a package to SQL Server using Database Deployment Wizard. These errors only occured when I run the wizard for the 2nd time but it works fine for the 1st time without any error.

Senarioes

1. The database already exist at SQL Server(eg:VfsMain) and I run the wizard for the 2nd time using the same package but I renamed the Database Name on Server to another name(eg:VfsMain2). I hit this error as per attached (FlexHRDatabase_results4.rtf).

2. The database already exist at SQL Server and I run the wizard again for the 2nd time using the same package. I hit this error as per attached (FlexHRDatabase_results1.rtf).

Pls kindly advice.Thanks.

Attachments
FlexHRDatabase_results4.rtf (169 views, 16.00 KB)
FlexHRDatabase_results1.rtf (151 views, 12.00 KB)
Chan
Chan
Advanced StrataFrame User (731 reputation)Advanced StrataFrame User (731 reputation)Advanced StrataFrame User (731 reputation)Advanced StrataFrame User (731 reputation)Advanced StrataFrame User (731 reputation)Advanced StrataFrame User (731 reputation)Advanced StrataFrame User (731 reputation)Advanced StrataFrame User (731 reputation)Advanced StrataFrame User (731 reputation)
Group: Forum Members
Posts: 533, Visits: 2K
Hi,

>>Chan and Visual Solutions are in the same company



To add-on, the problem occurred only if we added default data package for Localization tables. Else, it works fine. Any ideas?



URGENT help needed!



Thank you
Greg McGuffey
Greg McGuffey
Strategic Support Team Member (3.5K reputation)
Group: Forum Members
Posts: 2K, Visits: 6.6K
I think the problem is that you didn't parameterize your file names and the second run is trying to recreate files with the same names as those already created and in use from the first deployment. I believe you have to use the $DbName$ parameter in the file group area, within the file name, so this doesn't happen. It's been a while since I set this up, so check out help for the exact parameter name usage.
Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
Greg has a good point.  if the problem persists, then the only way to realy diagnose things like this is for you to supply a backup of the database to which you are deploying and the PKG you are distributing to the DB so that we can reproduce the problem.  Additionally, please add steps to reproduce the issue.  Thanks.
Chan
Chan
Advanced StrataFrame User (731 reputation)Advanced StrataFrame User (731 reputation)Advanced StrataFrame User (731 reputation)Advanced StrataFrame User (731 reputation)Advanced StrataFrame User (731 reputation)Advanced StrataFrame User (731 reputation)Advanced StrataFrame User (731 reputation)Advanced StrataFrame User (731 reputation)Advanced StrataFrame User (731 reputation)
Group: Forum Members
Posts: 533, Visits: 2K
Hi,

Do you meant that I can't just import database everytime when I want to deploy?



I am not using DDT to maintain my database structure. Instead, we would like to use database diagramming tool such as xcase to design our database. Then generate the latest database. After that, using DDT to import the latest database strcuture for deployment.



Please advice. Thank you
Greg McGuffey
Greg McGuffey
Strategic Support Team Member (3.5K reputation)
Group: Forum Members
Posts: 2K, Visits: 6.6K
I think that if you do this, you would need to modify the file options to use the $dbName$ parameter, so you can deploy to a differently named db, with unique file names, thus install more than once on any given server.
Chan
Chan
Advanced StrataFrame User (731 reputation)Advanced StrataFrame User (731 reputation)Advanced StrataFrame User (731 reputation)Advanced StrataFrame User (731 reputation)Advanced StrataFrame User (731 reputation)Advanced StrataFrame User (731 reputation)Advanced StrataFrame User (731 reputation)Advanced StrataFrame User (731 reputation)Advanced StrataFrame User (731 reputation)
Group: Forum Members
Posts: 533, Visits: 2K
Hi,

Thank you. We will test on that.

What about the 2nd issue?



Thank you
Greg McGuffey
Greg McGuffey
Strategic Support Team Member (3.5K reputation)
Group: Forum Members
Posts: 2K, Visits: 6.6K
Do you mean about using some other tool to actually manage db structure changes, like the xcase tool, then use DDT to manage deployment?



I'm not sure this will work. Unsure I think the problem would be that the way DDT manages the deployment is by tracking all the changes you've made to the structure over time. It then can use this history to figure out what needs to be done to update any older version of the database to the current version. Without the history, I think this would either simply blow away the old database/objects within the database (not good) or fail because there are existing items within the database that the DDT isn't managing that have the same name (DDT adds extended properties to any object is manages).



So, I think the question is, can you use importing to update the structure within DDT in a way that would update the history of changes made. I.e. if you have a Customers table with two columns cust_pk and cust_name, then use xcase to add a third column, cust_city, if you import the resulting db back into DDT, will it have a history item indicating that a new column was added? I think you could run a test to figure this out, as you can view the history for a DDT project.



Even if this works, I think you would have to be careful in certain situations, like renaming columns. I.e. if you have a column named cust_zip, then realize that you need to use a non-US name for it and change it to cust_postalcode, the import would likely interpret this as deleting the cust_zip and adding a new column cust_postalcode, which would blow away any data during the upgrade. If this had been done in DDT, it would have known that a rename occurred and there would be no problem. Using an external tool, you likely have to to manage this via the pre script to rename the column yourself before running the DDT script (assuming this would work at all).



I use DDT to manage my security db, as it is just way too easy to keep the SF security tables updated via this method. However, my primary application db is not managed via DDT. I use a text editor to write the SQL scripts (kinda scary). I then use a tool called DbGhost to manage the deployment. It has the same issues you'd have with things like renaming columns or tables and it allows pre/post scripts. It can also manage synching data (like data in lookup tables). It isn't as nice as DDT in the sense that if you manage your structure within DDT, it will handle more db changes. However, I really like being able to check in my SQL script into source control and run diffs on them. Also, when I made this decision, the DDT didn't import sprocs or functions or maybe even triggers and it didn't use extended properties to allow non-DDT managed objects to coexist in the same database. I already had all the script, so it made sense to use another tool.



Hope that helped!
Chan
Chan
Advanced StrataFrame User (731 reputation)Advanced StrataFrame User (731 reputation)Advanced StrataFrame User (731 reputation)Advanced StrataFrame User (731 reputation)Advanced StrataFrame User (731 reputation)Advanced StrataFrame User (731 reputation)Advanced StrataFrame User (731 reputation)Advanced StrataFrame User (731 reputation)Advanced StrataFrame User (731 reputation)
Group: Forum Members
Posts: 533, Visits: 2K
Hi,

Thank you for you valuable information.

If so, I might need to keep all history, then it would be very very huge in future. Beside, it could be confused as developers might do something wrong in DDT and revert them back and etc. If all of this stored in history, it might cause unexpected problem, would it?



I was thinking DDT would compare customer db and generate the upgrade script on the fly during upgrade based on the package generated. Shall SF team confirm on this? I know RedGate has a utility for this, but it required us to restore our latest db in order to work which is not our preference. Shipping XML/package is the way.



Please advice. Urgent!

Thank you
Chan
Chan
Advanced StrataFrame User (731 reputation)Advanced StrataFrame User (731 reputation)Advanced StrataFrame User (731 reputation)Advanced StrataFrame User (731 reputation)Advanced StrataFrame User (731 reputation)Advanced StrataFrame User (731 reputation)Advanced StrataFrame User (731 reputation)Advanced StrataFrame User (731 reputation)Advanced StrataFrame User (731 reputation)
Group: Forum Members
Posts: 533, Visits: 2K
Hi Greg McGuffey,

FYI, xcase able to track field renamed and generate the right script. I am not sure how it works.

The downside is, xcase doesn't provide developer tool for this purpose. Sad
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