Viewing 15 posts - 31 through 45 (of 6,676 total)
If you cannot figure out who is connecting - you could just take the database offline and then perform the restore.
ALTER DATABASE hjem_bb SET OFFLINE WITH ROLLBACK IMMEDIATE;
At that point,...
Jeffrey Williams
“We are all faced with a series of great opportunities brilliantly disguised as impossible situations.”
― Charles R. Swindoll
How to post questions to get better answers faster
Managing Transaction Logs
January 13, 2025 at 6:00 pm
To see what is actually happening - include the actual execution plan. When you have that - open the properties page and view the actual code that SQL Server is...
Jeffrey Williams
“We are all faced with a series of great opportunities brilliantly disguised as impossible situations.”
― Charles R. Swindoll
How to post questions to get better answers faster
Managing Transaction Logs
January 8, 2025 at 10:36 pm
You can create a query for Invoke-SqlCmd that accepts variables. See here: https://learn.microsoft.com/en-us/powershell/module/sqlserver/invoke-sqlcmd?view=sqlserver-ps
From that page:
$StringArray = "MYVAR1='String1'", "MYVAR2='String2'"
Invoke-Sqlcmd -Query "SELECT$(MYVAR1) AS Var1,$(MYVAR2) AS Var2" -Variable $StringArray
Var1...
Jeffrey Williams
“We are all faced with a series of great opportunities brilliantly disguised as impossible situations.”
― Charles R. Swindoll
How to post questions to get better answers faster
Managing Transaction Logs
January 5, 2025 at 5:06 pm
You have total control over the process - so why can't you just pass into the query the LIKE statement and use that to get only the rows from the...
Jeffrey Williams
“We are all faced with a series of great opportunities brilliantly disguised as impossible situations.”
― Charles R. Swindoll
How to post questions to get better answers faster
Managing Transaction Logs
January 3, 2025 at 9:22 pm
Is there some reason you can't build a for-each loop in PS? I gave a basic outline for that - and it should be fairly easy to figure out from...
Jeffrey Williams
“We are all faced with a series of great opportunities brilliantly disguised as impossible situations.”
― Charles R. Swindoll
How to post questions to get better answers faster
Managing Transaction Logs
January 3, 2025 at 8:58 pm
Your question isn't clear - and the code to create @SINGLE_RETURN is really confusing. Why wrap a non-null CHAR(13) function with ISNULL to return an empty string when CHAR(13) will never...
Jeffrey Williams
“We are all faced with a series of great opportunities brilliantly disguised as impossible situations.”
― Charles R. Swindoll
How to post questions to get better answers faster
Managing Transaction Logs
December 31, 2024 at 9:37 pm
Several examples here: https://www.sqlservercentral.com/forums/topic/create-html-email
Jeffrey Williams
“We are all faced with a series of great opportunities brilliantly disguised as impossible situations.”
― Charles R. Swindoll
How to post questions to get better answers faster
Managing Transaction Logs
December 31, 2024 at 9:24 pm
Sure - depends on what you consider a 'hit'.
With that said - you have a lot of additional code here that isn't really needed. You can get rid of all...
Jeffrey Williams
“We are all faced with a series of great opportunities brilliantly disguised as impossible situations.”
― Charles R. Swindoll
How to post questions to get better answers faster
Managing Transaction Logs
December 31, 2024 at 9:18 pm
You should also be aware that the SELECT version will return the 'last' row from the result - however that last row is determined - whereas the SET version will...
Jeffrey Williams
“We are all faced with a series of great opportunities brilliantly disguised as impossible situations.”
― Charles R. Swindoll
How to post questions to get better answers faster
Managing Transaction Logs
December 30, 2024 at 5:52 pm
How are you determining 'unused table space'?
If this is actually unusable space allocated to the table - then it could possibly cause performance issues. If that is the case -...
Jeffrey Williams
“We are all faced with a series of great opportunities brilliantly disguised as impossible situations.”
― Charles R. Swindoll
How to post questions to get better answers faster
Managing Transaction Logs
December 24, 2024 at 9:06 pm
Instead of trying to convert the unix timestamp to a datetime2 - and then truncating that value down to the nearest minute, why not just round the timestamp itself to...
Jeffrey Williams
“We are all faced with a series of great opportunities brilliantly disguised as impossible situations.”
― Charles R. Swindoll
How to post questions to get better answers faster
Managing Transaction Logs
December 13, 2024 at 10:40 pm
Bad style of the query (I know, it is intended here, but you should never write it this way in real code).
Instead of
SELECT
c.CustomerName,...
Jeffrey Williams
“We are all faced with a series of great opportunities brilliantly disguised as impossible situations.”
― Charles R. Swindoll
How to post questions to get better answers faster
Managing Transaction Logs
November 6, 2024 at 7:43 pm
The full backup doesn't affect the transaction log - so you can just perform the 3pm log backup as normal and use that to restore to the 2pm point in...
Jeffrey Williams
“We are all faced with a series of great opportunities brilliantly disguised as impossible situations.”
― Charles R. Swindoll
How to post questions to get better answers faster
Managing Transaction Logs
November 1, 2024 at 9:44 pm
You have just learned a valuable lesson - scope does matter in SQL Server. Sub-queries have full access to the outer queries columns - so you can easily reference a...
Jeffrey Williams
“We are all faced with a series of great opportunities brilliantly disguised as impossible situations.”
― Charles R. Swindoll
How to post questions to get better answers faster
Managing Transaction Logs
October 31, 2024 at 8:37 pm
To answer your last question - no, you cannot restore to a point in time without having the full backup *prior* to the event and all transaction log backups from...
Jeffrey Williams
“We are all faced with a series of great opportunities brilliantly disguised as impossible situations.”
― Charles R. Swindoll
How to post questions to get better answers faster
Managing Transaction Logs
October 22, 2024 at 6:36 pm
Viewing 15 posts - 31 through 45 (of 6,676 total)