当数据库连接到我的项目时,我收到此错误 [英] I get this error when database connect with my project

查看:162
本文介绍了当数据库连接到我的项目时,我收到此错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Quote:

'/ CMS'应用程序中的服务器错误。

无法打开物理文件C :\ Program Files \ Microsoft SQL Server \ MSSQL.1 \ MSSQL \DATA \ Content Pro.mdf。操作系统错误32:32(进程无法访问该文件,因为它正被另一个进程使用。)。

无法打开物理文件C:\Program Files \ Microsoft SQL Server \ MSSQL.1 \ MSSQL \DATA \Content Pro_log.ldf。操作系统错误32:32(进程无法访问该文件,因为它正被另一个进程使用。)。

无法打开登录请求的数据库Content Pro。登录失败。

用户'SAI\munna'登录失败。

文件激活失败。物理文件名C:\Program Files \ Microsoft SQL Server \ MSSQL.1 \ MSSQL \DATA \Content Pro_log.ldf可能不正确。

Server Error in '/CMS' Application.
Unable to open the physical file "C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\Content Pro.mdf". Operating system error 32: "32(The process cannot access the file because it is being used by another process.)".
Unable to open the physical file "C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\Content Pro_log.ldf". Operating system error 32: "32(The process cannot access the file because it is being used by another process.)".
Cannot open database "Content Pro" requested by the login. The login failed.
Login failed for user 'SAI\munna'.
File activation failure. The physical file name "C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\Content Pro_log.ldf" may be incorrect.

推荐答案

检查:



http://stackoverflow.com/questions/6347312/unable-to-open-the-physical-file-operating-system-error-32 [ ^ ]


根据您提供的路径,很可能这些是SQL Server中活动数据库的文件。当SQL使用它们时,你无法打开文件。

看来你试图在连接字符串中使用AttachDbFileName,不要!使用服务器,初始目录,用户和密码访问您的数据库!
According to the path you provided it is highly possible that these are files for active databases in your SQL server. You can not open files while the SQL uses them.
It seems that you try to use AttachDbFileName in your connection string, do not! Use Server, Initial Catalog, User and Password to access your DB!


这可能会帮助您

..

SQL Server管理studio 2008 R2 - >连接到我的服务器 - >右键单击我的数据库名称 - > tasks - >离线。<​​br />
..返回视觉工作室并重新获取数据库它将工作...

谢谢
This Might Help You
..
SQL Server management studio 2008 R2 –> connect to my server –> right click on my database name –>tasks –> take offline.
..return to visual studio and reatttached the database it will work...
Thanks


这篇关于当数据库连接到我的项目时,我收到此错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆