I try attach database to SQL Server express. I got the following error.
TITLE: Microsoft SQL Server Management Studio
------------------------------
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 1346(Either a required
impersonation level was not provided, or the provided impersonation level is
invalid.) while attempting to open or create the physical file
'D:\WebAppts.mdf'. (Microsoft SQL Server, Error: 5123)
For help, click:
http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=09.00.4035&EvtSrc=MSSQLServer&EvtID=5123&LinkId=20476
Thanks in advance.
Qin.
I found this in Books Online:
When you are detaching or attaching a database, the Database Engine tries
to impersonate the Windows account of the connection performing the
operation to guarantee that the account has permission to access the
database and log files. For mixed security accounts that use SQL Server
logins, the impersonation might fail.
I don't really know what is going on, but there might be some issue with
your Windows account.
How are you logged into SQL Server: Windows authentication or SQL
authentication?
Are you in a workgroup or a domain?
What is the service account for SQL Server? Does the service account have
Windows permission to impersonate you?
--
Erland Sommarskog, SQL Server MVP, esq...@sommarskog.se
Links for SQL Server Books Online:
SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx
SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx
SQL 2000: http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
"Qin Yang" wrote:
> .
>