How to create installer for my visual basic project with sql server 2008 database? - sql

Hi guys I have a visual basic project and I developed it using visual studio 2010 and sql server 2008 for my database.
Now, I want to make an installer that will include my sql server database.
I just used software ADVANCES INSTALLER but it didn't work out.
Help guys. Thanks in advance
Note: Can I make it like InFLOW inventory System installer? It's using also sql server database. Just hoping.

I use Advanced Installer for several years and for deploying database files I use their SQL Databases page. For example, for attaching an MDF file to an SQL instance you can add the MDF file in "Files and Folders" page and use, in SQL Databses page, a script like this.
You can check out this tutorial to get a starting point about how you can configure the SQL Databses page in Advanced Installer.
Hope this info is useful.

Related

How to deploy vb.net project with SQL Server CE as database

I created a vb.net project and I used SQL Server Compact Edition as my database. Now I want to create an installer for it, for installing on different PCs.
Does it require to install Visual Studio on the client PC? How should I create installer which will include that database file?
Sorry for my bad English.
Please help.
Thank you in advance.
This msdn link shows how to do it:
https://msdn.microsoft.com/en-us/library/aa983326.aspx
There are 2 parts to it:
Deploy the database file. This can be done by setting the file to copy local always and updating your connection string to point to this.
Deploy the sqlserverce dll's. Follow the instructions in the msdn link which will copy the 7 dll's locally. This means you don't have to install sqlserverce on the individual pcs.

Databases and Visual Studio 2013

I am collaborating on a project with several other people in Visual Studio 2013. We are using Tortoise SVN to share the project so that we are all working on the same files. I was in charge of constructing the database, which I did. But after making the database in the SQL Server Object Explorer under (localdb)\Projects(SQL Server 11.0.3000-THE-DRAGON-DEN\Dragonfett), I can not seem to find the database in the solution folder for the project.
How do I get the database into the project folder?
That is merely a link to a SQL Server database.
If you want the database in the solution folder then you will need some form of project. SQL Server Data Tools (SSDT http://msdn.microsoft.com/en-us/library/hh272686(v=vs.103).aspx) is what you are looking for. AFAIK this is installed with VS2012 and VS2013. For VS2010 you will need to install SSDT manually.
Select File->New->Project and in the templates look for SQL Server Database Project under the SQL Server Template group. SSDT has a great import facility which will let you import the contents of an existing database with no fuss. SSDT as a project can then be checked into and controlled by SVN.
Other that that, Installing, configuring and using SSDAT is beyond the scope of the question. I would suggest you do a bit of homework and read up on SSDT and how it works.

SQL Server Scripts 2012 Project into Team Foundation Server 2012

I have a SQL Server Scripts 2012 Project with multiple SQL queries and stored procedures.
We use Team Foundation Server 2012 to manage our source code for our Visual Studio Solutions.
How can I check in a SQL Server Scripts 2012 Project into TFS? If it is not possible how can I manage source control on this and allow multiple developers access to it?
You have a few options, here are two that I have used.
1: Download the TFS 2012 MSSCCI Provider:
This plugin allows you to access TFS from Microsoft SQL Server Management Studio. So you can easily add and check in\out those ssmssln and ssmsproj files from TFS.
64bit Download - 32bit Download
Once installed, in SSMS go to Tools-> Options -> Source Control to select the plugin.
If you don't see it then you probably need to install the other bit version.
After you have selected the plugin in the options window of SSMS, you will have a new menu option under "File" that will allow you to Add\Open\Change items in TFS from Sql Management Studio.
To add your Scripts solution using the MSSCCI plugin:
Open the project in SSMS, go to File -> Source Control -> Add Solution to Source Control
2. Add through VS using the "Add files to Source Control"
See here: To add a file that is not in a solution to version control
I'm not quite sure why it would be a challenge to add the sql server scripts to TFS just as any other file in your visual studio solution. I've done this in a lot of projects with great success.
What is a challenge with databases though is to find a good strategy to handle branches and database versioning. I recommend that you have a look at Entity Framework Code First Migrations which handles this very nicely. Another approach is to use Chuck Norris Round house which is a more script based solution:
RoundHouse
https://code.google.com/p/roundhouse/
Code First Migrations.
http://msdn.microsoft.com/en-us/data/jj591621.aspx
If you start from scratch I would recommend the Code First Migrations approach, but if you allready have a lot of .sql files the second can work very well.
The latest versions of MSSCCI still don't seem to work with SSMS 2012 - you'll need an older 32 bit version, here: http://visualstudiogallery.msdn.microsoft.com/en-us/bce06506-be38-47a1-9f29-d3937d3d88d6
Once this is installed you'll be able to see the "Team Foundation Server MSSCCI Provider" in the SSMS Source Control Plug-In selection.

How to use SQL Server 2008 Database project in installation time

I have created SQL Server 2008 Database project using visual studio 2010. after build and deploy this project i saw dbschema file that contain SQL queries that i use to create my database inside the XML tags. And there is another .sql file(This file also contain that sql queries. but there is no XML tags)
In this 2 files i want to know what is the file that i can use to create database in installation time and how to execute that file in installation time.
I found some details from http://msmvps.com/blogs/deborahk/archive/2010/05/02/vs-2010-database-project-an-introduction.aspx
Hope you guys can help me to get some solution.
To deploy the database project you just need to .dbschema file.
If your database is composed of multiple .dbschema then you have to deploy using the manifest.
The tool you need is vsdbcmd.exe in VS 2010. It works with SQL 2008. It does not work in SQL 2012.
Check out the following link on how to do it.
http://msdn.microsoft.com/en-us/library/dd193283.aspx

Unable to find the profiler in SQL Server 2005

I am facing the problem of finding SQL Server Profiler in SQL Server 2005. Is there are any options to enable it or to reinstall it?
Two possibilities.
First, you're running Sql Server Express. That doesn't come with Profiler. In that case, you can use this tool, which is an open source version that is pretty good. I've used it a few times myself (not associated with the project, spamflaggers).
Else, you need to rerun the installer and add Profiler. If it didn't get installed, it has to be installed. That's the general state of things in the software world.
You can select SQL Server Profiler from the Tools menu in SQL Server Management Studio.
The file is located on my computer under:
"C:\Program Files\Microsoft SQL Server\90\Tools\Binn\PROFILER90.EXE"
If its not there you may have to select the client tools from the SQL Server installer.
Simply navigate to add/remove programs, and click 'change' on the SQL Server 2005.
I had the same problem and it was because I had installed Management Studio Express before I installed the full version. You can't have more than one instance of Management Studio, therefore, it won't install the full version over the express version. I found that I had to remove the express SSMS and then install the full SSMS:-
Go to Control Panel/Programs and Features (in Windows 7)
At "Select an instance", choose "Remove Shared Features Only"
Choose "Management Tools - Basic"
You can then run the installer again and install the FULL SSMS. Dunno if this was the problem you were having, but hopefully someone finds it useful.