Shaiya attach database error

03/30/2013 04:21 littlecfresh#1
===================================

Attach database failed for Server 'DANIELA-PC\SQLEXPRESS'. (Microsoft.SqlServer.Express.Smo)

------------------------------
For help, click: [Only registered and activated users can see links. Click Here To Register...]

------------------------------
Program Location:

at Microsoft.SqlServer.Management.Smo.Server.AttachDa tabase(String name, StringCollection files, String owner)
at Microsoft.SqlServer.Management.SqlManagerUI.Attach DatabaseData.PrimaryFile.Attach()
at Microsoft.SqlServer.Management.SqlManagerUI.Attach Database.SendDataToServer()

===================================

An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.Express.ConnectionInfo)

------------------------------
Program Location:

at Microsoft.SqlServer.Management.Common.ServerConnec tion.ExecuteNonQuery(String sqlCommand, ExecutionTypes executionType)
at Microsoft.SqlServer.Management.Common.ServerConnec tion.ExecuteNonQuery(StringCollection sqlCommands, ExecutionTypes executionType)
at Microsoft.SqlServer.Management.Smo.ExecutionManage r.ExecuteNonQuery(StringCollection queries)
at Microsoft.SqlServer.Management.Smo.Server.AttachDa tabaseWorker(String name, StringCollection files, String owner, AttachOptions attachOptions)
at Microsoft.SqlServer.Management.Smo.Server.AttachDa tabase(String name, StringCollection files, String owner)

===================================

Unable to open the physical file "C:\SHAIYA_SERVER\ShaiyaTest\ShaiyaServer\DATABASE \PS_UserData_Data.MDF". Operating system error 5: "5(Access is denied.)". (.Net SqlClient Data Provider)

------------------------------
For help, click: [Only registered and activated users can see links. Click Here To Register...]

------------------------------
Server Name: DANIELA-PC\SQLEXPRESS
Error Number: 5120
Severity: 16
State: 101
Line Number: 1


------------------------------
Program Location:

at System.Data.SqlClient.SqlConnection.OnError(SqlExc eption exception, Boolean breakConnection)
at System.Data.SqlClient.SqlInternalConnection.OnErro r(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndW arning(TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlCommand.RunExecuteNonQuer yTds(String methodName, Boolean async)
at System.Data.SqlClient.SqlCommand.InternalExecuteNo nQuery(DbAsyncResult result, String methodName, Boolean sendToPipe)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at Microsoft.SqlServer.Management.Common.ServerConnec tion.ExecuteNonQuery(String sqlCommand, ExecutionTypes executionType)
Can anyone help me with this i have been trying for hours cant figure it out
03/30/2013 11:45 Philipp_#2
Quote:
Originally Posted by littlecfresh
Unable to open the physical file "C:\SHAIYA_SERVER\ShaiyaTest\ShaiyaServer\DATABASE \PS_UserData_Data.MDF". Operating system error 5: "5(Access is denied.)".
Access is denied - Did you even read your error log?
It is an windows security issue. Try to turn off UAC or check the permissions of the files you are trying to attach. Does the SQL Server Service Account has read and write rights to those files? If not, modify the rights for this account.
03/31/2013 09:30 littlecfresh#3
Ok i tryed re installing after i disabled the UAC now what? i cant even connect to my Express DB any more Error:


TITLE: Connect to Server
------------------------------

Cannot connect to DANIELA-PC\SQLEXPRESS.

------------------------------
ADDITIONAL INFORMATION:

A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified) (Microsoft SQL Server, Error: -1)

For help, click: [Only registered and activated users can see links. Click Here To Register...]

------------------------------
BUTTONS:

OK
------------------------------
03/31/2013 12:15 Philipp_#4
Make sure your server name and instance name is correct and also be sure SQL Browser service is running on your machine.
03/31/2013 16:54 littlecfresh#5
Ok i enabled the SQL Browser and the database is stilll giving me the same error

Would i try the SQL Server Authication

like 127.0.0.1
Username the one thats in the psm_servicemgr
password the one thats in the psm_servicemgr?

Im confused...
03/31/2013 22:11 JohnHeatz#6
You actually have to set up login credentials on your database; therefore you will have a username and password (unless you use windows authentication)
04/02/2013 06:12 littlecfresh#7
Thanks i fixed it (well you guys fixed it) but i have this other problem with error 10053...
04/02/2013 21:17 JohnHeatz#8
As you've created a new thread for this other error, I'm closing this thread.