Directory path display false as not exist although it exist with full control permission ?
Directory path display false as not exist although it exist with full control permission ?
(OP)
I working on script running on sql server 2019 using python 3.10 .
I have directory path \\192.168.7.9\Import\8 and can
write and read to files and delete and create files on
this directory path \\192.168.7.9\Import\8.
my issue when run script python on sql server 2019
it return false
but it must return true because directory path exist.
this path have permissions everyone and administrator and system full control read and write and delete .
script python
Expected result is True
from sql server it return true as exist but from python script it return false for same server and same user.
I have directory path \\192.168.7.9\Import\8 and can
write and read to files and delete and create files on
this directory path \\192.168.7.9\Import\8.
my issue when run script python on sql server 2019
it return false
but it must return true because directory path exist.
this path have permissions everyone and administrator and system full control read and write and delete .
script python
CODE --> python
declare @ExportPath varchar(max)='\\192.168.7.9\Import\8' EXEC sp_execute_external_script @language =N'Python', @script=N' import os d = os.path.isdir(ExportFilePath) print(d)' ,@params = N'@ExportFilePath NVARCHAR(MAX)' ,@ExportFilePath = @ExportPath
Expected result is True
from sql server it return true as exist but from python script it return false for same server and same user.

RE: Directory path display false as not exist although it exist with full control permission ?
Just print ExportFilePath within the python code to see if it is set to what you think it ought to be set to. Maybe you need quotes around the string.
RE: Directory path display false as not exist although it exist with full control permission ?
i try this as below
CODE --> python
i test this remote server path from same sql server on same machine for same user and on same sql server version
by Master.dbo.xp_fileexist it return 1 as exist
so what is issue and how to solve it please
RE: Directory path display false as not exist although it exist with full control permission ?
RE: Directory path display false as not exist although it exist with full control permission ?
RE: Directory path display false as not exist although it exist with full control permission ?
i tried as you tell me
but still return false
CODE --> python
it return false as not exist
so what i do to solve issue
RE: Directory path display false as not exist although it exist with full control permission ?
are this is correct
RE: Directory path display false as not exist although it exist with full control permission ?
use either
or
RE: Directory path display false as not exist although it exist with full control permission ?
RE: Directory path display false as not exist although it exist with full control permission ?
RE: Directory path display false as not exist although it exist with full control permission ?
i try as below
CODE --> python
also not working and return false as not exist
RE: Directory path display false as not exist although it exist with full control permission ?
CODE
results should be:
CODE
RE: Directory path display false as not exist although it exist with full control permission ?
RE: Directory path display false as not exist although it exist with full control permission ?
RE: Directory path display false as not exist although it exist with full control permission ?
it give me result
STDERR message(s) from external script:
System error 67 has occurred.
The network name cannot be found.
STDOUT message(s) from external script:
result = 2
d = False
RE: Directory path display false as not exist although it exist with full control permission ?
i get error
STDERR message(s) from external script:
System error 5 has occurred.
Access is denied.
STDOUT message(s) from external script:
result = 2
d = False
RE: Directory path display false as not exist although it exist with full control permission ?
RE: Directory path display false as not exist although it exist with full control permission ?
RE: Directory path display false as not exist although it exist with full control permission ?
RE: Directory path display false as not exist although it exist with full control permission ?
RE: Directory path display false as not exist although it exist with full control permission ?
to nert use command
or no need
if required how to add
RE: Directory path display false as not exist although it exist with full control permission ?
But you asked this question on several other forums and I think you got the right answer here:
https://docs.microsoft.com/en-us/answers/questions...
RE: Directory path display false as not exist although it exist with full control permission ?
if i use on python script as below
it will working
or no need to do that
i use code below to reach remote server
CODE --> python
RE: Directory path display false as not exist although it exist with full control permission ?
it give me error 5 access is denied
using code below
CODE --> python
so i try to using domain/account name
my question i need to ask is
can access direct to remote path without using map network drive
are this possible
if possible how to do using python
CODE --> python
are code above allow to me export data directly from remote host
please help me