|
Nice one.
cheers
Chris Maunder
|
|
|
|
|
Thank you, Sir!
David A. Gray
Delivering Solutions for the Ages, One Problem at a Time
Interpreting the Fundamental Principle of Tabular Reporting
|
|
|
|
|
At first I thought this might be a compiler quirk, so I ran a couple of trivial examples through gcc -s . That does substantially the same, so I'm guessing it's a language feature. One for the standards committee "lawyers".
Software rusts. Simon Stephenson, ca 1994. So does this signature. me, 2012
|
|
|
|
|
Thanks much for duplicating the observation with the other popular C compiler. As I said, I observed the same thing about a dozen years ago, but I had forgotten the details. Anyway, so far as I know, the same holds whether your code is straight ANSI C or ANSI C++. The test case that I cited in the Stack Overflow article is straight ANSI C.
David A. Gray
Delivering Solutions for the Ages, One Problem at a Time
Interpreting the Fundamental Principle of Tabular Reporting
|
|
|
|
|
|
I have used Expresso[^] for a long time and really like it. Granted I don't use regex a lot, out of sheer terror but when I do I use Expresso.
Everyone has a photographic memory; some just don't have film. Steven Wright
|
|
|
|
|
Thank you for reminding me about Expresso. Though I've seen it before, I've never put forth the effort to install it.
A quick look at the screen shot on his home page tells me right away why you like it; it's a full-service regular expression editor that looks like it would meet most needs of anyone whose use of regular expressions is infrequent, and would be a nice productivity tool for experienced regular expression authors.
Working with Perl for the last 20 years has required becoming fairly comfortable reading and writing regular expressions. Although I write less Perl today than I did fifteen years ago, my general purpose text editor, UltraEdit, has supported Perl/AWK style usage of regular expressions in its find and replace dialog boxes for at least the last nine years, and I use them regularly. Hence, between the two, I can usually cobble together a usable expression pretty quickly. I found this online fiddle form when I went in search of a regular expression idiom that I have almost never used, the "not followed by" idiom. Incidentally, I needed it in a regular expression to search for a particular type of syntax error in a manually edited Visual C++ project configuration file. (I know, I have no business editing those .vcxproj files by hand, but I've become somewhat obsessed lately with fully parameterizing my build configurations, which can be done much more quickly by editing the configuration directly than by clicking around in the Visual Studio property page editor.
While I will probably download Expresso for use in my home office, there remains, nevertheless, a place for online fiddle forms when I must use a computer that doesn't belong to me, meaning that I must get permission to install tools of my choosing on it. That goes double when I need to borrow a clients's computer for only a few minutes to help them solve a problem.
David A. Gray
Delivering Solutions for the Ages, One Problem at a Time
Interpreting the Fundamental Principle of Tabular Reporting
|
|
|
|
|
Mike Hankey wrote: Everyone has a photographic memory; some just don't have film.
I just noticed the quote in your sig, and told my wife. She howled.
David A. Gray
Delivering Solutions for the Ages, One Problem at a Time
Interpreting the Fundamental Principle of Tabular Reporting
|
|
|
|
|
Glad she liked it.
I understand about the regex online thing, just didn't know if you knew about Expresso.
Everyone has a photographic memory; some just don't have film. Steven Wright
|
|
|
|
|
I vaguely recall reading about Expresso several years ago, when I was working on one of those computers onto which I was forbidden to install most tools, even of the FOSS variety.
David A. Gray
Delivering Solutions for the Ages, One Problem at a Time
Interpreting the Fundamental Principle of Tabular Reporting
|
|
|
|
|
|
There are probably more RegExp fiddle forms than there are JSFiddle, JSONFiddle, and all the rest combined. What appealed to me about this one was the clear feedback about text entered into the test text box.
David A. Gray
Delivering Solutions for the Ages, One Problem at a Time
Interpreting the Fundamental Principle of Tabular Reporting
|
|
|
|
|
I came up with this sql to discover jobs and steps in those jobs that use a SSIS package (because our DBA "isn't a programmer")...
DECLARE @serverPath = 'MyServerPath'
;WITH cte AS
(
SELECT b.job_id AS JobID,
b.name AS JobName,
b.[enabled] AS JobEnabled,
a.step_id AS StepNumber,
CASE WHEN RTRIM(LEFT(UPPER(a.command),5)) LIKE '/FILE' THEN 'File System' ELSE 'Package Store' END AS Location,
REPLACE(
REPLACE(
REPLACE(
REPLACE(
REPLACE(
REPLACE(
REPLACE(
REPLACE(UPPER(a.command), '/DTS ','')
,'/FILE ','')
,'/SQL ','')
, ' /CHECKPOINTING OFF', '')
,' /REPORTING E', '')
,' /X86', '')
, ' /SERVER '+@serverPath, '')
, '"', '') AS PackagePath
FROM msdb.dbo.sysjobsteps as a
INNER JOIN msdb.dbo.sysjobs as b on b.job_id = a.job_id
WHERE a.subsystem = 'SSIS' AND a.command NOT LIKE '/serv%'
)
SELECT * FROM cte
ORDER BY JobEnabled DESC, Location, JobName, StepNumber
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013
modified 21-Jun-18 12:35pm.
|
|
|
|
|
Odd, as long as there are some standards setup and working.
Just use Copy-DbaAgentJob – dbatools
Common sense is admitting there is cause and effect and that you can exert some control over what you understand.
|
|
|
|
|
Nothing is ever "easy" on a DoD installation...
For instance, I have a MCSA for SQL Server (2012), but I'm not allowed to be a DBA on our department database server.
My Active Directory account can't be used to run a job - the DBA has to change ownership to a service account, and if I need to modify the job, he has to toggle ownership back to me, and which I'm done, I have to request that he toggle it back to the service account.
Initially, I could create stored procs, but didn't have permission to execute them (that took a week to iron out).
Other chaos has ensued.
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013
|
|
|
|
|
I will say this, someone in MS needs to be kicked for the way the Agent permissions work. Its a mess, I loathe the way they are structured. I am to to the point where I've started telling management we need need a better way to have jobs run.
As far as running a stored procedure, umm thats easy.
GRANT EXECUTE ON Schema::dbo TO [user or group];
GRANT VIEW DEFINITION TO [user or group];
Common sense is admitting there is cause and effect and that you can exert some control over what you understand.
|
|
|
|
|
Take a look at this article series. I wrote an agent utility for SQL express, but it's entirely usable for SQL Server enterprise.
SQLXAgent - Jobs for SQL Express - Part 1 of 6[^]
Because it's written for SQL Express, there are some things that aren't supported, but it's fairly full featured.
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013
|
|
|
|
|
Apparently your "non-programmer" DBA can't write queries either.
What does he do? Create empty databases, and swap ownership and permissions on objects?
|
|
|
|
|
Dave Kreskowiak wrote: What does he do? Create empty databases, and swap ownership and permissions on objects?
I've never seen him create a database. All he does that I can verify is that he tells me when I can't do something.
The latest dust-up involves installing WinSCP on my local box so I can test data retrieval via FTP. It can only be installed on a server, evidently, so I I'm flying blind when I create a new job that performs a FTP transfer...
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013
|
|
|
|
|
I feel your pain.
When I was at CBP, we were all told "Work smarter, not harder" and in the very next breath, "You cannot write code for or script anything".
A massive contradiction in a single paragraph.
|
|
|
|
|
I talked to him today and he said I was hammering him on the ownership toggle and he's gonna try to get me SA permissions - I guess I wore him down.
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013
|
|
|
|
|
It's amazing. "I'm sick of you making me do work so I'll just give you the permissions to do it yourself."
Why didn't he just save himself the pain and do that in the first place?
SMH, some people...
|
|
|
|
|
I suggested it to him four years ago. After getting mad about it when he argued with me, I figured I'd just follow his rules. When my boss complained, I told her, "That's the way they wanna play it, so I'll be happy to oblige".
He still has to ask IA (the pointless security agenda Nazis) if it's okay.
What's really weird is that they hired a sql developer, and even without ANY certifications, she immediately had SA permissions, but me - with the *required MCSA certification* - couldn't get the same permissions.
F*ckin lunacy...
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013
|
|
|
|
|
I here you. I did four years at DHS/CBP at a port of entry.
The lunacy is real!
|
|
|
|
|
It's because she has chesticles and you don't
#SupportHeForShe
Government can give you nothing but what it takes from somebody else. A government big enough to give you everything you want is big enough to take everything you've got, including your freedom.-Ezra Taft Benson
You must accept 1 of 2 basic premises: Either we are alone in the universe or we are not alone. Either way, the implications are staggering!-Wernher von Braun
|
|
|
|
|