Viewing 15 posts - 1 through 15 (of 447 total)
DECLARE @dDate DATE = '11 Dec 2019'SELECT DATENAME(DW, @dDate), ((DAY(@dDate)-1) / 7) + 1
December 6, 2019 at 12:16 pm
Try this: (Not sure if this works in 2017, setuser was deprecated, but i'm still on 2008):
If you don't get an error, they have access to the DB...
November 15, 2019 at 6:17 pm
You can use xp_logininfo 'Domain\Username', 'all' to get some insight into how that user might be getting access to the first db.
One of the items in the permission path column...
November 14, 2019 at 1:06 pm
OurDomain definitely trusts TheTrustedDomain. And TheTrustedDomain has never trusted ours.
Our workaround is having users start the apps using Run As with their OurDomain creds. But this is not ideal...
September 19, 2019 at 2:36 pm
In fact, we've pretty much narrowed it down to this one:
Attempting to digest it, but I'm a DBA, and this stuff quite beyond me :-
September 19, 2019 at 2:08 pm
Sorry, I was just trying to help and that link sounded like exactly what you were after.
I did not try it, and shares are "discouraged" on our network.
To be honest,...
September 19, 2019 at 1:06 pm
Would this do it?
Top of the page on DuckDuckGo "powershell create share"
September 18, 2019 at 11:02 am
Found the solution.
And Group-Object does come into it:
# Group the objects by table name$Tables = $array |Group Table# Select the table name + sum of each group$Tables...
July 11, 2019 at 11:07 am
I don't *think* Group-Object is what I'm looking for: "...a table with one row for each property value and a column that displays the number of items with that value."....
July 8, 2019 at 3:19 pm
I meant, in Powershell, how can i get the equivalent of
SELECT Table, Col1 = SUM(Col1), Col2 = SUM(Col2)
GROUP BY Table
In my example,
Table Col1 Col2
Table1 4 9
Table2 6 11
July 8, 2019 at 2:02 pm
I don't see how a trigger helps in this scenario...? If there's no table activity, no trigger is fired, nothing changes...? Or am I standing to close to the tree...
May 29, 2019 at 3:09 pm
So after the above comments, it's now a giant CASE statement.
May 29, 2019 at 2:19 pm
So I got a prototype going as a computed column calling a scalar function, and the perf hit appears negligible.
Further investigation underway.
May 28, 2019 at 6:41 pm
Coming from you, that's a... shall we say, less than ringing endorsement of the current implementation.
Here's the bones of the table, minus the meat columns - and believe it or...
May 28, 2019 at 2:42 pm
PRINT, IF APP_NAME() LIKE "%QUERY%" BEGIN...END, DECLARE @Debug variable
I remember being SOOO excited when SQL2K came with a debugger... and the crushing disappointment at its unmitigated clunkiness.
May 28, 2019 at 11:36 am