Viewing 15 posts - 31 through 45 (of 485 total)
Declare @msg varchar(100)
DECLARE db_cursor CURSOR FOR
SELECT Name FROM Alldatabases
WHERE OBJECT_ID(Name + 'dbo.<tablename>') IS NOT NULL
ORDER BY Name
OPEN wh_cursor
In your post, you had 2 tables, Settings and Employee, so maybe you...
June 25, 2020 at 1:45 pm
Wow. So simple now.
Still labouring in 2008, our next version is supposed to be 2016, with no set date for that.
I figure I'll be able to start using STRING_AGG sometime...
June 17, 2020 at 7:51 pm
You say "occasional" errors. For me, this would go into a separate table with a FK to the main table, the error, and the emailed status (and date?)
June 9, 2020 at 10:33 am
Sorry, just noticed that my solution depends on my function dbo.ufn_DelimitedStringToTable.
You can find excellent string splitters on this site with a quick search.
April 1, 2020 at 12:50 pm
I'm sure one of our resident geniuses can simplify this, but I think this responds to your requirement.
Depends on x_of_y, where x is the 5th element and y is the...
April 1, 2020 at 12:21 pm
Good one!!! You had me right up until "we'll start to see lots of new refactored code " BWAAA HAHAHA!!!
April 1, 2020 at 11:16 am
See Chad Miller's Powershell function Write-DataTable
March 30, 2020 at 11:47 am
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):
setuser 'Domain\UserName';
use <db_name>;
setuser;
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?
https://ilovepowershell.com/2012/09/19/create-network-share-with-powershell-3/
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
Viewing 15 posts - 31 through 45 (of 485 total)