[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.sqlserver.programming

SQL2000 Filesystem Permissions Error

Sean Sims

3/20/2007 8:53:00 PM

I'm trying to restore a database by issuing the RESTORE DATABASE
command via a SQL connection in ASP and it's failing with a file
permissions error. The ASP error is, "Cannot open backup device
'<PATH>'. Device error or device off-line. See the SQL Server error
log for more details. RESTORE DATABASE is terminating abnormally." and
the Application error log message is, "18204 :
BackupDiskFile::OpenMedia: Backup device '<PATH>' failed to open.
Operating system error = 3(The system cannot find the path
specified.)."

If I issue the command, "xp_cmdshell 'dir <PATH>'" I receive the file
listing without a problem. So permissions to the folder are fine.
Any ideas on why the restore database command is failing?

3 Answers

EMartinez

3/21/2007 3:34:00 AM

0

On Mar 20, 3:52 pm, "Sean" <sean.s...@gmail.com> wrote:
> I'm trying to restore a database by issuing the RESTORE DATABASE
> command via a SQL connection in ASP and it's failing with a file
> permissions error. The ASP error is, "Cannot open backup device
> '<PATH>'. Device error or device off-line. See the SQL Server error
> log for more details. RESTORE DATABASE is terminating abnormally." and
> the Application error log message is, "18204 :
> BackupDiskFile::OpenMedia: Backup device '<PATH>' failed to open.
> Operating system error = 3(The system cannot find the path
> specified.)."
>
> If I issue the command, "xp_cmdshell 'dir <PATH>'" I receive the file
> listing without a problem. So permissions to the folder are fine.
> Any ideas on why the restore database command is failing?


I believe that OSQL sometimes bypasses SQL Server security/required
permissions (at least, in SQL Server 2000). Are you sure that the user
from the ASP application has sufficient privileges to restore the
database and to access all parts of the physical file path?
Traditionally, the ASP.NET user does not have adequate permissions due
to possible Microsoft security risks. Sorry that I could not be of
further assistance.

Regards,

Enrique Martinez
Sr. SQL Server Developer

Sean Sims

3/26/2007 2:11:00 PM

0

I was beginning to think that the Query Analyzer bypasses security
somehow. I'm using a SQL account for authentication. I've tried
adding every user/group that I can think of to the file system
permissions and the command still fails. I've tried, ASPNET, Local
Service, Network Service, IUSR_Machine, IWAM_Machine, ANONYMOUS LOGON,
SERVICE, SYSTEM, and even Everyone. I've also tried changing the
account that the MSSQL service uses and adding that account with Full
Control. I'd really like to get this working, but I don't know what
else to try.

-Sean

On Mar 20, 11:34 pm, "EMartinez" <emartinez....@gmail.com> wrote:
> I believe that OSQL sometimes bypasses SQL Server security/required
> permissions (at least, in SQL Server 2000). Are you sure that the user
> from the ASP application has sufficient privileges to restore the
> database and to access all parts of the physical file path?
> Traditionally, the ASP.NET user does not have adequate permissions due
> to possible Microsoft security risks. Sorry that I could not be of
> further assistance.
>
> Regards,
>
> Enrique Martinez
> Sr. SQL Server Developer


jg

7/20/2011 2:03:00 AM

0

Diesel wrote:
> "DM" <d-moss@adfa.edu.au> wrote in message
> news:64114913-36AB-4407-8319-16E2D8AB02E8%d-moss@adfa.edu.au...
>> "Diesel" <diesel@no.real.address.com.au> wrote:
>>
>>> Funny, the victim told Police he recognised men from his local Mosque.
>> Petzl wouldn't have known that though. His source claimed:
>>
>> "The 31-year-old man was asleep in his unit in Melton Street, Silverwater,
>> when
>> he woke to find four unknown men in his bedroom about 1am yesterday."
>>
>> Now we hear an alcohol swigging Muslim named Christian was assaulted by
>> four men
>
> Yes, an interesting name for a Muslim.
>
>> he claims to recognise from the local Mosque. Yet no arrests are
>> mentioned.
>
> The story is developing. Two men arrested now.
>
> TWO men will face court over allegedly whipping a Muslim man 40 times in a
> home invasion for drinking alcohol, prohibited under Sharia law.
>

He was a convert, I assume he accepts his punishment for boozing.
Welcome to islam.