Discovering sqlserver installed on the machine - deployment

I'm going to deploy an application click once and wondered what the best technique for dealing with the database, since the click once install sqlserver to me I was wondering how I determine the sqlserver installed so that when the application is first run, see it and create the sqlserver database.
I would not use the windows install to distribute this application because it will have multiple versions of update, and would be easier with clickonce.

Which flavor of SQLServer are you using? Here's some helpful information.
If it is SQLServer Express, you need to add the database to your project and set the build action to 'content' and set 'copy to output directory' to 'copy if newer'. This will ensure the database is included in the deployment.
Next, go into the prerequisites dialog and select SQLServer Express. When the user runs the setup.exe, it will check and see if it is installed, and if not, will install it.
If you want the newest version of SQLServer Express, you can find how to create a bootstrapper package here -- Microsoft doesn't provide one, but this article provides the XML you need and provides links to the SQLServer Express downloads.
If you are using SQLCE, you need to attach the database (*.sdf) to your project and set the properties as noted above. However, you do not need to publish this as a prerequisite, you can just include the dll's in your project as noted here.
When your publish a new version, if the database has changed, ClickOnce will put the new database in the DataDirectory and put the old one in the \pre subfolder of the DataDirectory, and you have to write code to handle that. This sounds appealing, but I think it's dangerous. If you even so much as open your database to look at the structure, it will change the date/time stamp, and ClickOnce will think it's new and publish it, and you will get calls from your customer about their data missing, unless you handle this.
So I usually recommend you copy the database to LocalApplicationData when the user first installs your application, and handle any updates to the structure programmatically after that. There is an article about how to do that here.

Related

Move website to another server without FTP or SSH

I have a problem with an existing TYPO3 website. (9.5.13)
Unfortunately, I no longer have FTP or SSH access to this server. (Provider can no longer be contacted) I would therefore have to move this website to another server. I only have admin access to Typo3 website.
Unfortunately I can't find a way to do this without copying the files and the database to the new server.
Is there a possibility? If so, how can I do this?
There is no real good way if you don't have a proper access to the server.
For the database you could use the extension phpmyadmin or t3adminer
but there is IMO no extension to download the content of the fileadmin (which will be a native feature of TYPO3 11 LTS).
However you could download at least all extensions of course.
In former times, there were two extensions trying to implement a FTP client as backend-module. The one was "Typo3 quixplorer", the other was "Typo3 eXtplorer"... Quixplorer is outdated (last update of extension in 2010), eXtplorer had its last update 2008...
Both extensions have security issues! Be careful and remove them immediately after usage!
Maybe you can find similar projects running in current web environments...
You may build some php script to archive the whole fileadmin-folder, and make a database dump. which you can download from the server.
Or you use a script to contact the new server to transfer the data immideatly.
It's just a question how you can upload these scripts as TYPO3 does not allow the direct upload of executables.
This is a really unfortunate situation, but you can copy the database and the files by using this extensions. Be aware: I haven't tested this extensions or took a look into the code and picked them by their description and README files. Use them carefully and on your own risk!
Note: In general the TYPO3 Security Team recommends to not use any
extension that bundles database management tools on production TYPO3
websites.
Database:
Use EXT:adminer or EXT:phpmyadmin to download your database tables.
Files:
Install EXT:commands or EXT:additional_scheduler to zip & download your files & folders.
All in one solution:
While researching I've found the extension EXT:ns_backup. Maybe you can us it to transfer the backup to cloud services like dropbox.

How to install TDS generated .update packages in Sitecore 7.2?

In setting up Sitecore 7.2 at my organization for our public facing .com I have run into a hiccup while trying to implement proper CI, Release Management, and Deployment Management. I am able to, using MSBuild, compile my Sitecore MVC code, compile .update packages from TDS, and package each of these in .nupkg files for Octopus Deploy. What I am running in to is that once I have deployed the MVC code I must also deploy the Sitecore Structure/Content which requires me to install .update packages. I have tried the solution provided at https://github.com/adoprog/Sitecore-Deployment-Helpers but for a fairly lightweight site this is timing out around 20 minutes within Octopus Deploy for only my System package, let alone having not touched Structure or Content. I am looking for a way, preferably through PowerShell (not strictly speaking, the Sitecore PowerShell Extensions built into the sitecore web interface after installing that package). Using the SPE would be acceptable if, and only if, I can use SPE's Cmdlets from Octopus Deploy's PowerShell workflow.
Please Advise.
Jason Bert has a great series of blogs on using Octopus Deploy with TeamCity and TDS for deploying to Sitecore instances:
http://www.jasonbert.com/2013/11/03/continuous-integration-deployment-with-sitecore/
You can also use TDS itself to deploy the items in the solution, but this uses direct calls to a webservice on the target Sitecore instance which may not meet with your requirements.
Also, are you deploying the entire System tree? 20 minutes to deploy changes made to the System tree seems unusual, unless you've made a LOT of changes in there (for example, the Dictionary). Even then, you shouldn't be source-controlling author content, only the elements crucial to the solution that are owned by development.
You can install the update package via sitecore utility at /sitecore/admin/UpdateInstallationWizard.aspx
If you experience that installing the package via this mode takes a lot of time, you might want to modify the Deployment Property Manager settings for the TDS project.
You can do this by right clicking your TDS project in Visual Studio and selecting "Deployment Property Manager".
Once the Deployment Property Manager window opens up, set the Deploy property to Once for every node which does not need to be updated. For any items which are to be updated, mark them as Always.
This will drastically save you on the time required to install the package.

SCCM 2012 best practice, create an application for an msi and a deployment for an exe?`

New to SCCM 2012 and have a lot of applications with msi's that I am creating applications for. I've also been able to create a few applications with exe's. Is the only reason to use a package, if you need to run multiple programs or apps in succession?
One of the reasons to use a package vs application model is handling configuration outside of the MSI / EXE. Say for instance, your MSI / EXE does everything but it doesn't set any of the configuration items like the license information, or which server you need to connect to. Now most of these things can be handled via a custom action within your MST (Transform) by using Installshield, but if you have an executable it gets a bit more complicated because there isn't really anyway to "hook" into the installer to provide additional configuration items.

How to migrate Entity Framework DB on publish via MsDeploy

For my current project i would prefer to update my database to the correct version on publish instead of first run via the App_Start.
It seems that there is support for manual upgrades via a commandline tool 'migrate.exe' which is supplied together with Entity Framework (5.0 rc2). But i can not find any information about how other people have combined this tool together with msdeploy to upgrade the database on publish instead of first run.
I have found the following page which explains how to use the migrate.exe tool:
http://blog.overridethis.com/blog/post/2012/03/13/Automating-EF-43x-Data-Migrations-in-your-Build.aspx
But this forces me to somehow 'know' the connectionstring information.
My optimal solution would be something like:
connectionstring is configured in setParameters.xml file for
replacement on publish
on publish after publish of codebase
migrate.exe gets called with correct connectionstring
It seems that what i search for is an 'entity framework MSDeploy provider' (see: http://blogs.msdn.com/b/adonet/archive/2012/01/12/ef-4-3-beta-1-released.aspx) but it seems that they abandoned that option some time ago
You have two options:
Configure Visual Studio Databases option in the Publish Profile; or
Configure your project properties on Package/Publish SQL Tab.
I didn't use any of them yet but I was researching because I'll have the exactly same scenario.

How to Update the installed Window Application (Creating Patches)

i have requirement. i have created the window application and i have created the setup of that application that has been installed to client machine.
Now the requirement is that if i will do the further modification to the project the client not need to install whole application again instead client only need to install Update of new version. like using Patches or something. How can i do this is there and tool in VS from which we can create the update patches or something.
Please Help..
There are several options, but they depend on which installer you used in the first place.
It is very easy with Inno Setup, as (if the file items are configured correctly) InnoSetup will detect that the application is already installed and only copy modified files, even though you publish the entire setup. This will be automatic.
If you used the built-in Visual Studio setup project, it is also possible, but you must set a different "upgrade id" in the setup properties. I haven't worked much with this, yet.
A third option is using Windows Installer XML (WIX), which is able to generate patch installers, but I haven't worked much with WIX yet.
One last option would be to write something yourself that is able to exchange old files against new files, but you'd have to keep UAC in mind for newer Windows versions.
I have solved the problem...using ClickOne Setup of VS. i publish the win form to a specific URl and each time when application launchs its check the Upgraded version if available it install and run.
http://www.15seconds.com/issue/041229.htm