Is there any possible way to create a setup in for my program written in vb.net using sql server as the backend.I have a module which creates the database code and i have also created a setup in vb.net for my project but i want this setup to run properly even in a system which doesnt have visual studio and sql server installed.I tried running it on a system which doesnt have both but the error i get is sql server 2005 doesn't allow remote connections in default settings,i tried changing some settings but nothing seems to work.Is it necessary for a server to be there for creating the database?
a little Google always does the trick...
To configure SQL Server 2005 to allow remote connections, you must complete these steps:
1.) Enable remote connections on the instance of SQL Server that you want to connect to from a remote computer.
2.)Turn on the SQL Server Browser service.
3.) Configure the firewall to allow network traffic that is related to SQL Server and to the SQL Server Browser service.
How To Configure Sql 2005 to allow Remote Connections
When I write programs that require SQL Server to be installed on the client, I use the following logic :
Determine if SQL Server is installed on the client machine
If it is not installed, I prompt the user to download it (or download it for them using your installer script. I use NSIS installer). Make sure to install the appropriate version for the user based on your requirements (and the client's operating system). I typically use SQL Sever 2008 R2 Express Edition, SP1.
I then execute the SQL installer using my installer script command. In NSIS, it's ExecWait. In VB.Net you have something like this. You'll have to install it via command line parameters. Here are the list of command line parameters: http://msdn.microsoft.com/en-us/library/ms144259(v=sql.100).aspx
Here's what I use:
C:\PathToMySQLDownload\SQLEXPR.exe /QUIETSIMPLE /SkipRules=RebootRequiredCheck
/ACTION=install /IACCEPTSQLSERVERLICENSETERMS=1 /FEATURES=SQL
/INSTANCENAME=MSSQLSERVER /SECURITYMODE=SQL /SAPWD=MySAPassword /NPENABLED=1
/TCPENABLED=1 /SQLSVCACCOUNT="NETWORK SERVICE" /SQLSYSADMINACCOUNTS="NETWORK SERVICE"
/AGTSVCACCOUNT="NETWORK SERVICE" /ASSVCACCOUNT="NETWORK SERVICE"
/RSSVCACCOUNT="NETWORK SERVICE" /ISSVCAccount="NETWORK SERVICE"
/ASSYSADMINACCOUNTS="NETWORK SERVICE
You can include SQL Server Express in the Pre-requisites for your setup project.
When you build the setup project, it will pick up the packages that are required for the installation from C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bootstrapper\Packages
You can then amend the package.xml file for SQL Express to change how it is configured by the installation. Look for the Command Arguments element, and then to switch on Mixed mode authentication add SECURITYMODE=SQL
to enable remote access add DISABLENETWORKPROTOCOLS=0
(or for SQL 2008 r2 it's /tcpenabled=1 )
When the end user runs the isntallation, SQL Express will be installed first, with the options you have specified.
Related
I have a client application that will be deployed using ClickOnce. The client application will connect to a local sql database on their machine. They will need sql server 2008 express installed upon installed and the .mdf file attached.
I set Prerequisites to include sql server 2012 express.
So I would like the application when installing to check if sql server already installed with the database. If not then install and attach database. How can i achieve this properly using click once. I have a vb.net project using visual studio 2013. any references would help thanks.
You just have to change your connection string
to somthing like this
Server=.\SQLExpress;AttachDbFilename=C:\MyFolder\MyDataFile.mdf;Database=dbname;
Trusted_Connection=Yes
now your sql is linked to a specific database file
check this link https://www.connectionstrings.com/sqlconnection/attach-a-database-file-on-connect-to-a-local-sql-server-express-instance/
I have downloaded and installed SQL Server 2014 Express
(from this site: http://www.microsoft.com/en-us/server-cloud/products/sql-server-editions/sql-server-express.aspx#Installation_Options).
The problem is that I can't connect/find my local DB server, and I can't develop DB on my local PC. How can I reach my local server?
My system consists of Windows 8.1 (no Pro or Enterprise editions) 64 bits
Checking the configuration of SQL Server with SQL Server 2014 Configuration Manager tool, I see an empty list selecting "SQL Server Services" from the tree at the left. Below you can find a screenshot.
In the Windows Services list, there is just only one service: "SQL Server VSS Writer"
EDIT
My installation window of SQL Server 2014 is the following:
Most probably, you didn't install any SQL Server Engine service. If no SQL Server engine is installed, no service will appear in the SQL Server Configuration Manager tool. Consider that the packages SQLManagementStudio_Architecture_Language.exe and SQLEXPR_Architecture_Language.exe, available in the Microsoft site contain, respectively only the Management Studio GUI Tools and the SQL Server engine.
If you want to have a full featured SQL Server installation, with the database engine and Management Studio, download the installer file of SQL Server with Advanced Services.
Moreover, to have a sample database in order to perform some local tests, use the Adventure Works database.
Considering the package of SQL Server with Advanced Services, at the beginning at the installation you should see something like this (the screenshot below is about SQL Server 2008 Express, but the feature selection is very similar). The checkbox next to "Database Engine Services" must be checked. In the next steps, you will be able to configure the instance settings and other options.
Execute again the installation process and select the database engine services in the feature selection step. At the end of the installation, you should be able to see the SQL Server services in the SQL Server Configuration Manager.
I downloaded a different installer "SQL Server 2014 Express with Advanced Services" and found Instance Features in it. Thanks for Alberto Solano's answer, it was really helpful.
My first installer was "SQL Server 2014 Express". It installed only SQL Management Studio and tools without Instance features. After installation "SQL Server 2014 Express with Advanced Services" my LocalDB is now alive!!!
I have noticed that after installation of SQL server 2012 express on Windows 10 you must install ENU\x64\SqlLocalDB.MSI from official Microsoft download site. After that, you could run SqlLocalDB.exe.
Just download and install LocalDB 64BIT\SqlLocalDB.msi can also solve this problem. You don't really need to uninstall and reinstall SQL Server 2014 Express with Advanced Services.
Also, if you just installed localDB, you won't see the instance in the configuration manager. You would need to initiate it first, and then connect to it using server name (localdb)\mssqllocaldb.
Source
I faced the same issue. Just download and install the SQL Server suite from the following link :http://www.microsoft.com/en-US/download/details.aspx?id=42299
restart your SSMS and you should be able to "Register Local Servers" via right-click on "Local Servers Groups", select "tasks", click "register local servers"
I have developed a application in c# which is windows based application. It stores data into database sql server. I want to know, when I create setup in VS and install it in a client computer should I install sql server software also or Is there any way without installing SQL Server in client's PC My application can function correctly.
sIf you use a filebased implementaion of SQL (localDB) you should be able to get away with a "setup" installing the neccecary dependencies to bootstrap the DB. (Someone correct me?)
If you use the DB in a hosted SQL environment (SQL Server running as a service), you will need to install SQL server on the deployed pc, and get the database up.
I am no sure if you can "automate" installing SQL server and getting the DB up from a setup app.
You have two deployment options for applications that contain SQL Server Compact 3.5 databases. The method of deployment you choose depends on the servicing requirements of your application and whether your users will need administrative credentials on the computer on which the application will be installed.
Following are the deployment options for SQL Server Compact 3.5 databases:
1. Traditional Microsoft Windows Installer (Microsoft setup technology)
a. Users need administrative credentials to install the application.
b. SQL Server Compact 3.5 will be serviced by Microsoft Update.
c. Can use ClickOnce deployment.
-or-
Private file–based deployment (deploying the SQL Server Compact 3.5 DLLs as part of the project)
1. Users do not need administrative credentials to install the application.
2. SQL Server Compact 3.5 will not be serviced by Microsoft Update.
3. Can also use ClickOnce deployment.
I've just built a new dev machine and I can't get SQL Server Agent working. What I've done so far:
Install VS 2010 (I think this installed an express version of SQL Server)
Install SQL Server 2008 R2 Developer edition.
I'm not sure if I did something wrong in step 2. All I want is a fully working version of SQL Server with SQL Server Agent running and no limitation on the amount of data I can store (I will need more than 10GB).
Currently, in SSMS I have the following instance: ./SQLEXPRESS. I thought that during step 2, this would have been upgraded, but it doesn't seem so.
Can anyone help?
Note: I ended up resolving this by uninstalling everything that had "SQL Server" in it in Control Panel > Programs and Features. I then reinstalled from scratch.
Note: I ended up resolving this by uninstalling everything that had "SQL Server" in it in Control Panel > Programs and Features. I then reinstalled from scratch.
The agent account is disabled. If you aren't able to enable it through configuration manager, try enabling it through services. After its enabled, try starting the serivce. If you still have issues starting the agent, try changing the account the service is running under. There may also be an issue with the account that the SQL Server service is running under. Trying changing the SQL Server service account and restarting it. The agent should then start up successfully.
You have two installations, with two named instances. The Express named SQLEXPRESS and the developer edition named MSSQLSERVER (unless you changed this during install). connect to .\MSSQLSERVER and see, it should be there available to be started.
SQL Server Express does not ship with the SQL Server Agent.
I have installed ASP .NET 2.0 MVC3, SQL server express 2005 and SQL server Management studio express 2005 and IIS 7 in my system. If I am opening the install_btnet file, and providing the SQL server details also it is not getting connect. It is giving error as Service unavailable. Any one suggest me how to install Bug tracker .NET tool in my system with examples.
Thank you.
First thing to check it that your SQL 2005 express instance is running and allowing remote connections. Open the Administrative Tools >> Services and look for the service called "MSSQLSERVER$SQLEXPRESS" and ensure it is started.
Next, open the SqlServer Configuration Utility (on the server or PC where SQL 2005 Express is Installed) Look for the Client Configuration Option and Select "Client Protocols".
Set TCP/IP to "Enabled" and you should now be able to connect to your SQL server.
Note that even if your BugTracker.NET install is on the same machine, it may still be using the network to connect to your SQL Instance.
Hope this helps,
Dave