« first day (2729 days earlier)      last day (2139 days later) » 

6:55 AM
morning
 
gbn
7:10 AM
Howdo
 
7:41 AM
Morning
 
7:57 AM
> Really Size doesn’t matter!! What a rat this is! Rat-bitten bank notes worth Rs 12 lakh 38 thousand. Torn notes and dead rat found inside ATM in Tinsukia Assam. Rat found dead before little one could bite remaining Rs 17 lakh 10 thousand. pic.twitter.com/3Omns7gAZH
>
> — Nandan Pratim Sharma Bordoloi 🇮🇳 (@NANDANPRATIM) 18. Juni 2018
Lakh is everywhere
 
8:13 AM
To the tune of The Beatles: "All You Need Is Love."
 
gbn
8:35 AM
Anyone remember why xp_cmdshell on a UNC path will give "Access is denied.", but xp_fileexist is OK
 
Morning and Evening
 
gbn
..and a direct RESTORE works too
 
@gbn Sorry, no.
Why would this be a valid edit?
 
gbn
...and xp_delete_file is OK
@hot2use thanks. ah well. It used to work (sp_databaserestore from @sp_BlitzErik uses xp_cmdshell)
 
@gbn It could be that it has the same relatives.
A CMD shell will not change to C:\> \\servername\sharename
 
8:43 AM
@hot2use PostgreSQL doesn't have stored procedures, only functions. See: dba.stackexchange.com/questions/2357/…
 
However switching to C:\> Z: works
 
gbn
@hot2use xp_cmdshell 'dir /b \\someuncpath'
 
hmmm
 
gbn
Also OK xp_dirtree '\\someuncpath', 1, 1
I changed my internal auto restore code to use sp_databaserestore (so much overlap and I've pushed some of my stuff into that git anyway)
 
exec xp_cmdshell 'dir \\127.0.0.1\c$' works on my machine
Any chance it is a simple permission issue?
 
8:52 AM
@gbn are you sysadmin?
I believe xp_cmdshell runs under the agent proxy account if the login isn't in the sysadmin role and under the service account when you are in sysadmin
 
I set up the following shares for a previous PoC:
exec xp_cmdshell 'dir \\127.0.0.1\JederLesen'
exec xp_cmdshell 'dir \\127.0.0.1\JederSchreiben'
exec xp_cmdshell 'dir \\127.0.0.1\AnonymousLesen'
exec xp_cmdshell 'dir \\127.0.0.1\AnonymousSchreiben'
exec xp_cmdshell 'dir \\127.0.0.1\AuthentifiziertLesen'
exec xp_cmdshell 'dir \\127.0.0.1\AuthentifiziertSchreiben'
The Anonymous Shares give me an Access denied error message when trying to access.
You might have to assign specific permissions (Authenticated Users, ...) to the share to enable access via xp_cmdshell.
 
gbn
I used to use xp_dirtree
@TomV yes
@TomV svc accounts (mix of MSA and GMSA) are also sysadmin
@hot2use Authenticated Users hmmm will try that
@hot2use what does xp_fileexist do?
 
9:33 AM
@gbn behind the curtains? Not sure. You'd have to ask a debuggerer.
 
gbn
@hot2use Sorry, I mean on your PoC shares
I think it's permission on the share itself. I'm accessing a folder 3 levels down
\\server\share\f1\f2\f3
 
Ok. I'll try.
 
gbn
Thanks
 
That works for all shares
I'll pop a file into the shares and see how that works out. HOAS.
@gbn Works for directories and files.
 
gbn
@hot2use As I suspected. Thanks for testing
 
9:43 AM
Morning all
 
@gbn Nope sorry, i misread the flags.
Doesn't work for the Anonymous Shares/Subfolders/Files
 
@McNets That would be a contract rate in Oz. Still passably good though.
 
exec xp_fileexist '\\127.0.0.1\JederLesen\Readme'
exec xp_fileexist '\\127.0.0.1\JederSchreiben\Readme'
exec xp_fileexist '\\127.0.0.1\AnonymousLesen\Readme'
exec xp_fileexist '\\127.0.0.1\AnonymousSchreiben\Readme'
exec xp_fileexist '\\127.0.0.1\AuthentifiziertLesen\Readme'
exec xp_fileexist '\\127.0.0.1\AuthentifiziertSchreiben\Readme'
File Exists File is a Directory Parent Directory Exists
----------- ------------------- -----------------------
0           1                   1

(1 row affected)

File Exists File is a Directory Parent Directory Exists
----------- ------------------- -----------------------
0           1                   1

(1 row affected)

File Exists File is a Directory Parent Directory Exists
----------- ------------------- -----------------------
0           0                   0

(1 row affected)

File Exists File is a Directory Parent Directory Exists
It fails on Anonmyous access.
 
gbn
still as expected though
 
Okay.
exec xp_fileexist '\\127.0.0.1\JederLesen\Readme.txt'
exec xp_fileexist '\\127.0.0.1\JederSchreiben\Readme.txt'
exec xp_fileexist '\\127.0.0.1\AnonymousLesen\Readme.txt'
exec xp_fileexist '\\127.0.0.1\AnonymousSchreiben\Readme.txt'
exec xp_fileexist '\\127.0.0.1\AuthentifiziertLesen\Readme.txt'
exec xp_fileexist '\\127.0.0.1\AuthentifiziertSchreiben\Readme.txt'
File Exists File is a Directory Parent Directory Exists
----------- ------------------- -----------------------
1           0                   1

File Exists File is a Directory Parent Directory Exists
----------- ------------------- -----------------------
1           0                   1

File Exists File is a Directory Parent Directory Exists
----------- ------------------- -----------------------
0           0                   0

File Exists File is a Directory Parent Directory Exists
----------- ------------------- -----------------------
 
10:18 AM
@SimonRigharts still it doesn't make sense to change a 7-year old question that has so many answers mentioning "stored procedures". Rolled back. ( @hot2use )
 
@ypercubeᵀᴹ No argument from me - it's a semantic difference more than anything. (Compare to SQL Server which has distinct procedures and functions - postgres has functions that cover both groups of behaviour)
 
@SimonRigharts yeah, I know. I wish there was an answer that added those points (and that Postgres - at least in versions up to now) didn't have stored procedures - and functions is the closest thing.
 
@ypercubeᵀᴹ +1
 
Cool
 
 
5 hours later…
4:02 PM
mongo is getting transactions!
 
As long as they really commit to it
3
 
4:27 PM
another intel bug
lulz
 
 
2 hours later…
6:57 PM
Postgres will have MERGE in version 12. The horror ...
3
(version 12 means: Sept. 2019)
 
HUZZAH
 

« first day (2729 days earlier)      last day (2139 days later) »