Saturday, February 25, 2012

Cannot Install DB

Hi,
I have installed the latest MSDE and am entering the following text in the
query analyzer:
EXEC sp_attach_db @.dbname = 'SRPA',
@.filename1 = '{c:\SRPA\SRPA.MDF}',
@.filename2 = '{c:\SPRA\SRPA.LDF}';
but i'm getting the following error:
Error: Device activation error. The physical file name 'c:\SRPA\SRPA.MDF'
may be incorrect.
I have checked and double checked the name/location etc and it all matches..
any help would be greatly appreciated, Thanks
Matt
You dont need these curly brackets. Just type in (as filename is expecting
a nvarchar)
EXEC sp_attach_db @.dbname = 'SRPA',
@.filename1 = N'c:\SRPA\SRPA.MDF',
@.filename2 = N'c:\SPRA\SRPA.LDF'
HTH, Jens Suessmeyer.
http://www.sqlserver2005.de
"Matt" <Matt@.discussions.microsoft.com> schrieb im Newsbeitrag
news:C7340567-DD95-4534-A75E-0583F630E6E0@.microsoft.com...
> Hi,
> I have installed the latest MSDE and am entering the following text in the
> query analyzer:
> EXEC sp_attach_db @.dbname = 'SRPA',
> @.filename1 = '{c:\SRPA\SRPA.MDF}',
> @.filename2 = '{c:\SPRA\SRPA.LDF}';
> but i'm getting the following error:
> Error: Device activation error. The physical file name 'c:\SRPA\SRPA.MDF'
> may be incorrect.
> I have checked and double checked the name/location etc and it all
> matches..
> any help would be greatly appreciated, Thanks
> Matt
>
|||Thanks, Tried it but still the same error.
"Jens Sü?meyer" wrote:

> You don′t need these curly brackets. Just type in (as filename is expecting
> a nvarchar)
> EXEC sp_attach_db @.dbname = 'SRPA',
> @.filename1 = N'c:\SRPA\SRPA.MDF',
> @.filename2 = N'c:\SPRA\SRPA.LDF'
> HTH, Jens Suessmeyer.
> --
> http://www.sqlserver2005.de
> --
> "Matt" <Matt@.discussions.microsoft.com> schrieb im Newsbeitrag
> news:C7340567-DD95-4534-A75E-0583F630E6E0@.microsoft.com...
>
>
|||Just a moment, i saw that you are using the QA ?!
So perhaps you are not connected to the MSDE rathjer than to a SQL Server.
If you issue the command
sp_Attach_db the SQL Server / MSDE will always look on Local drives to get
control over the datafile. So if you are connected to a remote server rather
than to the MSDE it will tell you that the files are not present.
If you really want to make sure that you are working on the MSDE, just do
this on the command line:
OSQL -E (if you are using Integrated Security, if not
use -UUsername -PPassword)
Then type in the Command i gave you in the last post, that should really
help, if not there MUST be a difference in the location you specified.
HTH, Jens SUessmeyer.
http://www.sqlserver2005.de
"Matt" <Matt@.discussions.microsoft.com> schrieb im Newsbeitrag
news:0206A4CE-541A-4CA8-B5A6-5213E982D1EC@.microsoft.com...[vbcol=seagreen]
> Thanks, Tried it but still the same error.
>
> "Jens Smeyer" wrote:
|||Thats got it..with the OSQL -E it worked fine thru cmd.. Thanks for your help
"Jens Sü?meyer" wrote:

> Just a moment, i saw that you are using the QA ?!
> So perhaps you are not connected to the MSDE rathjer than to a SQL Server.
> If you issue the command
> sp_Attach_db the SQL Server / MSDE will always look on Local drives to get
> control over the datafile. So if you are connected to a remote server rather
> than to the MSDE it will tell you that the files are not present.
> If you really want to make sure that you are working on the MSDE, just do
> this on the command line:
> OSQL -E (if you are using Integrated Security, if not
> use -UUsername -PPassword)
> Then type in the Command i gave you in the last post, that should really
> help, if not there MUST be a difference in the location you specified.
> HTH, Jens SUessmeyer.
> --
> http://www.sqlserver2005.de
> --
> "Matt" <Matt@.discussions.microsoft.com> schrieb im Newsbeitrag
> news:0206A4CE-541A-4CA8-B5A6-5213E982D1EC@.microsoft.com...
>
>

No comments:

Post a Comment