且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在不安装SSMS的情况下使用SQL 2005 Express运行应用程序?

更新时间:2022-10-18 12:12:40

如果你试试从远程机器连接到sql server:我认为你的sql server浏览器服务没有启动所以请启动该服务再试一次。或者您的防火墙阻止了与服务器的SQL连接,因此请检查您的防火墙。



如果您尝试从本地计算机连接:可能是您的实例名称不正确,请检查您的新实例名称。


HI,



你真的不需要安装管理工作室来运行你的应用程序。这不是真的取决于你的应用程序在启动时做了什么。您是否还在系统和应用程序中检查了实例的名称。我的意思是你检查了你的连接字符串。或者您检查了服务?如果安装了sql server或它正在运行??


.mdf文件是SQL Server数据库文件。其他应用程序无法理解那些文件。因此,您需要一个SQL实例来打开/读取/写入mdf文件。该实例可以是本地的,可以是 Express版本,也可以是远程版本,无所谓。如果您的应用程序需要一个本地SQL实例供自己使用,那么它可以在部署时安装SQL Server Express Edition


Hi all!
I have a setup project ,includes :

.Net Framework 2.0
.Net Framework 4.0
SQL Express 2005
exe file

(It's no need installing SQL Server Management Studio)
When first installing, (the folder after installing includes one MDF file and one LDF file) it works fine.
But when I uninstall this, and reinstall, it throws an error
"a network-related or instance-specific error occurred while establishing a connection to sql server...."

Please help me to solve this problem.
Thanks a lot
Robinson.

if you are try to connect from remote machine to sql server:I think your sql server browser service is not started so please start that service and try again. Or your firewall is blocking the sql connection with server so check your firewall.

if you are try to connect from local machine: it may be your instance name is incorrect so check your new instance name.


HI,

You don't really need to install management studio to run your application. Not it really depends on what are you doing in your application when it starts. Did you also check the name of your instance in your system and in your application is same. I mean did you check your connection string. Or did you check the service? If sql server is installed or it is running??


.mdf files are SQL Server database files. other application can not understand those files. So you need need a SQL instance to open/read/write mdf file. That instance can be local, can be an Express edition, or can be a remote one, doesn't matter. If your application needs a local SQL instance for it's own use then it can install SQL Server Express Edition when deployed