Viewing 15 posts - 166 through 180 (of 7,191 total)
Mmmm... if your domain admin can create a XYZ\MyAccount with the same SID as ABC\MyAccount, then that might just work. I'm not a domain admin myself, so I don't know...
February 13, 2020 at 10:51 am
It's exactly the same principle for groups as for users. My script will create both for you.
John
February 12, 2020 at 4:16 pm
By all means keep it somewhere safe, although you'll probably only need to use it the once.
-- Create logins
SELECT 'CREATE LOGIN [' + REPLACE(name,'abc','xyz') + '] FROM...
February 12, 2020 at 3:40 pm
Why not rename the logins / logingroup with ALTER LOGIN ... to keep the same SID ?
They're domain logins... you can't rename them with SQL Server. For Windows logins,...
February 12, 2020 at 12:50 pm
I think you're going to have to put the work in, I'm afraid. Although the two accounts have the same name within their respective domains, SQL Server doesn't care about...
February 12, 2020 at 12:25 pm
You need a recursive query. Have a look at this, and post back if there's anything in particular you don't understand.
John
February 12, 2020 at 10:52 am
This should do it for the extra column:
SUM (accTotal) OVER (PARTITION BY per, company) AS Total
John
Edit - actually, that won't work straight out the box. You will...
February 7, 2020 at 3:30 pm
You can also get the name of the latest backup file by querying the backupset and backupmediafamily tables in msdb. That way, there's no looping, and you'll still pick up...
February 7, 2020 at 2:34 pm
Two separate concepts. To test to destruction is to test until you can think of no more scenarios for which to test. Equivalence means making sure that my solution always...
February 7, 2020 at 1:55 pm
This is probably simpler, although it may or may not be more efficient. Remember to test it to destruction for equivalence.
WHERE ((T.record_Key_4 = '1' OR T.Record_Key_5 NOT...
February 7, 2020 at 11:29 am
No, you can't use wildcards in a DDL statement. Either loop through the sequences and reset them one by one, or write a SELECT statement that generates all the ALTER...
February 6, 2020 at 12:16 pm
Thom
Are you sure you don't have any five-figure years? That would explain the DATEFROMPARTS and CONVERT failures, although not why TRY_CONVERT returned no NULLs.
SELECT DATEFROMPARTS(10000,1,1);
GO
SELECT CONVERT(date,CONCAT(10000,'01','01'));
GO
SELECT TRY_CONVERT(date,CONCAT(10000,'01','01'));
GO
For...
February 6, 2020 at 11:31 am
Please will you show us what you've tried? You can get time spent by subtracting Mi_Start from Mi_End where Mi_Definition is Assigned to Duration. You can get the Pending time...
February 6, 2020 at 10:18 am
Well, it certainly reads the backup file, but what pages does it read? In a totally unscientific test, I ran a RESTORE VERIFYONLY and then looked at what types of...
February 6, 2020 at 9:58 am
That's because you haven't told it what to do with the file locations. If you don't specify new file locations, it will attempt to use the existing ones, and that's...
February 5, 2020 at 4:39 pm
Viewing 15 posts - 166 through 180 (of 7,191 total)