Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Attach database to SQL server express

29 views
Skip to first unread message

Qin Yang

unread,
Jul 29, 2010, 2:19:16 AM7/29/10
to
Hi,

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.


Erland Sommarskog

unread,
Jul 29, 2010, 4:42:33 AM7/29/10
to
Qin Yang (Qin...@clinicalcomputers.com.au) writes:
> 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)

That's one I've never seen before.

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

Kuldeep

unread,
Aug 3, 2010, 3:17:03 AM8/3/10
to
Start your SQL Server services from services.msc
Go to start menu.
run.
type services.msc
search for SQL SERVER (.......) just right click it and start.


"Qin Yang" wrote:

> .
>

0 new messages