PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Forums Hébergement > Forum Hébergement serveur > ms.sqlserver.setup > Attach database failed
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
ms.sqlserver.setup Questions about SQL Server.

Attach database failed

Réponse
 
LinkBack Outils de la discussion
Vieux 26/06/2007, 16h03   #1
Zenon
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Attach database failed

Hi
I have a C# application which creates and populates a SQL Server
Express database. I then copy the database and log files and move it
to a different directory where I would like to use SQL Server
Management Studio Express to view the results. Problem is, when I try
to attach to the database file I get a message which says directory
lookup for <path to original location> failed with operating system
error 5 (access is denied). Can anyone tell me how to go about doing
this?

thanks,

Zenon

  Réponse avec citation
Vieux 26/06/2007, 22h03   #2
Tibor Karaszi
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Attach database failed

Does the service account have proper permissions on the directory/files where the database files
resides? The error message comes from the operating system and is very clear.

--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi


"Zenon" <zenonk@comcast.net> wrote in message
news:1182870192.805735.96570@o61g2000hsh.googlegro ups.com...
> Hi
> I have a C# application which creates and populates a SQL Server
> Express database. I then copy the database and log files and move it
> to a different directory where I would like to use SQL Server
> Management Studio Express to view the results. Problem is, when I try
> to attach to the database file I get a message which says directory
> lookup for <path to original location> failed with operating system
> error 5 (access is denied). Can anyone tell me how to go about doing
> this?
>
> thanks,
>
> Zenon
>


  Réponse avec citation
Vieux 27/06/2007, 15h22   #3
Zenon
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Attach database failed

On Jun 26, 5:03 pm, "Tibor Karaszi"
<tibor_please.no.email_kara...@hotmail.nomail.co m> wrote:
> Does the service account have proper permissions on the directory/files where the database files
> resides? The error message comes from the operating system and is very clear.
>
> --
> Tibor Karaszi, SQL Server MVPhttp://www.karaszi.com/sqlserver/default.asphttp://sqlblog.com/blogs/tibor_karaszi
>
> "Zenon" <zen...@comcast.net> wrote in message
>
> news:1182870192.805735.96570@o61g2000hsh.googlegro ups.com...
>
>
>
> > Hi
> > I have a C# application which creates and populates a SQL Server
> > Express database. I then copy the database and log files and move it
> > to a different directory where I would like to use SQL Server
> > Management Studio Express to view the results. Problem is, when I try
> > to attach to the database file I get a message which says directory
> > lookup for <path to original location> failed with operating system
> > error 5 (access is denied). Can anyone tell me how to go about doing
> > this?

>
> > thanks,

>
> > Zenon- Hide quoted text -

>
> - Show quoted text -


I am not certain that it does. I have tried to create a service
account with a TSQL statement that I found and then I gave it
permissions in SQL Server Manager. I cannot navigate to the file
where the copy of the db is though (only to the directory) so that
leads me to believe that my permission granting was unsuccessful. Can
you tell me how or point me to a good set of instructions please? I
am a newbie and everything I found is pretty vague.

thanks very much

  Réponse avec citation
Vieux 28/06/2007, 10h23   #4
Steen Schlüter Persson (DK)
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Attach database failed

Hi,

What do you mean about that you can't navigate to the file but you can
navigate to the directory? Does it mean that you can browse to the
folder but not see the file? If that's the case, then you have to look
at your OS permissions for that user you are using (..and that's not
really a SQL server issue..:-)...). The errormessage you get, isn't a
SQL server message but an OS error.

Maybe you could also show us the code you are running so we can see if
there're anything in there that rings a bell?

--
Regards
Steen Schlüter Persson
Database Administrator / System Administrator

- Show quoted text -
>
> I am not certain that it does. I have tried to create a service
> account with a TSQL statement that I found and then I gave it
> permissions in SQL Server Manager. I cannot navigate to the file
> where the copy of the db is though (only to the directory) so that
> leads me to believe that my permission granting was unsuccessful. Can
> you tell me how or point me to a good set of instructions please? I
> am a newbie and everything I found is pretty vague.
>
> thanks very much
>

  Réponse avec citation
Vieux 28/06/2007, 15h21   #5
Zenon
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Attach database failed

On Jun 28, 5:23 am, "Steen Schlüter Persson (DK)"
<steen@REMOVE_THIS_asavaenget.dk> wrote:
> Hi,
>
> What do you mean about that you can't navigate to the file but you can
> navigate to the directory? Does it mean that you can browse to the
> folder but not see the file? If that's the case, then you have to look
> at your OS permissions for that user you are using (..and that's not
> really a SQL server issue..:-)...). The errormessage you get, isn't a
> SQL server message but an OS error.
>
> Maybe you could also show us the code you are running so we can see if
> there're anything in there that rings a bell?
>
> --
> Regards
> Steen Schlüter Persson
> Database Administrator / System Administrator
>
> - Show quoted text -
>
>
>
>
>
> > I am not certain that it does. I have tried to create a service
> > account with a TSQL statement that I found and then I gave it
> > permissions in SQL Server Manager. I cannot navigate to the file
> > where the copy of the db is though (only to the directory) so that
> > leads me to believe that my permission granting was unsuccessful. Can
> > you tell me how or point me to a good set of instructions please? I
> > am a newbie and everything I found is pretty vague.

>
> > thanks very much- Hide quoted text -

>
> - Show quoted text -


Hi,

Yes, I meant that I could browse the folder but not the file. You
gave me a good idea about the problem being an OS permission and not a
SQL Server issue (sorry foe being off topic). I solved this by
creating a Network Service in the directory's Group or User Names
section, then giving that user full permissions on the directory in
question. Thanks all for the .

  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 09h26.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,14902 seconds with 13 queries