August 10, 2005 at 10:53 am
I just moved to the June CTP and was re-attaching my dbs which are located on C: and D: The ones on C:, no problem, however when I try to attach those on D:, I get an error.
Failed to retrieve data for this request. (Microsoft.SqlServer.SmoEnum)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&LinkId=20476
------------------------------
ADDITIONAL INFORMATION:
An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)
CREATE FILE encountered operating system error 5(Access is denied.) while attempting to open or create the physical file 'D:\Microsoft SQL Server\MSSQL\Data\FBC.mdf'. (Microsoft SQL Server, Error: 5123)
I took one of the smaller dbs on D and moved it to C and it attached no problem. Any thoughts? BTW, this worked fine in the April CTP.
cd
August 15, 2005 at 8:00 am
This was removed by the editor as SPAM
August 15, 2005 at 8:14 am
Is SQL Server running under the same account as it did before you installed the new version?
August 15, 2005 at 8:18 am
Yes, everything is setup as before.
cd
January 12, 2006 at 12:46 pm
but may be related. No solution yet.
Getting very similar situation when trying to make a new database.
SQL Server 2005 just installed (after uninstalled 2000 but left some shared files). Machine has two drives, C: and E:, both plenty of space & user has Full Control of both drives from Windows' perspective.
TRACEON(1807) -- no help - tried per http://www.yafla.com/dforbes/2005/12/01.html
DB_ID (N'SalesEdb') IS NOT NULL
DROP DATABASE SalesEdb;
@data_path nvarchar(256);
@data_path = (SELECT SUBSTRING(physical_name, 1, CHARINDEX(N'master.mdf',
LOWER(physical_name)) - 1)
FROM master.sys.master_files WHERE database_id = 1 AND file_id = 1);
-- got C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\
@data_path = 'E:\MEDIFILES\'
('CREATE DATABASE SalesEdb
+ @data_path + 'saledat.mdf'',
+ @data_path + 'salelog.ldf'',
Works for any path on C: drive. Fails for any path on E: drive.
Let me know if you have any insight into this or the original situation in this topic. Thanx.
January 26, 2006 at 1:09 pm
Solved CREATE DATABASE on other drive. Permissions issue.
Windows Start -> Administrative Tools -> Component Services -> Services (local) -> MSSQLServer, right clicked Properties.
LogOn was `Local System account`, changed to `This account` with proper Domain\User having sysadmin privileges.
Exited from Managment Studio, went back in with Windows authorization as that user.
CREATE DATABASE then worked for the E: drive.
Note: during install, under Components to Install there is an Advanced option which allows browse to set dbs default to a different drive.
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply