开发者

How can I fix my SQL server install so that "server=(local)" will work in my connection string

开发者 https://www.devze.com 2023-03-08 01:34 出处:网络
For an assignment, I am creating a web app using C#, ASP.NET and Microsoft SQL Server 2008, which is to be deployed to a server that I don\'t control.

For an assignment, I am creating a web app using C#, ASP.NET and Microsoft SQL Server 2008, which is to be deployed to a server that I don't control.

My lecturer suggested that the easiest way to avoid having to 开发者_运维百科mess with my connection between my dev machine and the server is just to use "server=(local)" in the connection string and use the same database name, which sounds fine, but for some reason this does not work for me, I think because I had an SQL Express 2005 install before I did my SQL Server 2008 install and it reused some of the settings from that.

I can connect using COMPUTERNAME\SQLEXPRESS, but (local) doesn't work.

What is the least disruptive way to get it set up to work with 'local'? I've tried setting up an alias but that seems to have no effect, but am reluctant to reinstall at this stage due to time constraints.


The solution I used here was to do a full reinstall, paying particular attention to making sure the existing SQL Express artifacts were not used.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号