Forum Replies Created

Viewing 15 posts - 151 through 165 (of 1,246 total)

  • Reply To: SQL Server is slow

    I am a little risk averse when it comes to touching maxDop. After all, this query was running fine it was reported until this one time.

    It is important to determine...

    ----------------------------------------------------

  • Reply To: Performance on large table -Index Creation

    Yes a clustered index on the datetime column would help. Currently you have heap (no clustered index) so deleting records will not actually make the size of the table smaller...

    ----------------------------------------------------

  • Reply To: SQL Query

    OP must not be struggling that badly after all.

    ----------------------------------------------------

  • Reply To: PATINDEX question

    The regular expression here '%[^0]%' starts by looking for the first non zero in the string (col+'.')

    120. --> 120

    0150. --> 150

    The ^ is a negation operator (meaning NOT) when inside...

    ----------------------------------------------------

  • Reply To: Left Join with reference data.

    Thank you Scott. I now know the naming of this type of scheme. I've seen it where the pk object has different properties based on the value in another column...

    ----------------------------------------------------

  • Reply To: How to pass a variable in a folder path using TSQL

    I might as well add, if this is supposed to be  routing you could create a JOB that runs powershell to do the move. With powershell you can actually go...

    ----------------------------------------------------

  • Reply To: How to pass a variable in a folder path using TSQL

    Something like the following  ?

    declare @cmdStr as varchar(100);
    declare @today AS CHAR(8)

    set @today = '20220805'; /* Or however you want to set this */
    set @cmdStr = 'copy...

    • This reply was modified 4 years ago by MMartin1.

    ----------------------------------------------------

  • Reply To: How to pass a variable in a folder path using TSQL

    In your server you can enable xp_cmdShell

    exec sp_configure 'xp_cmdShell'

    To view the current setting for this option. You can run CMD commands within your script with this (be...

    ----------------------------------------------------

  • Reply To: The Case for Patching

    We do fail overs when patching. The only gotcha is to make sure there are no "Jobs" running at the time that could be interrupted.

    If there are tons of servers...

    ----------------------------------------------------

  • Reply To: INSERT EXEC statement cannot be nested, the Simple Solution

    A very nice and handy article. I learned about assemblies built with C# long ago but never got around to using them. This is an example of a good time...

    ----------------------------------------------------

  • Reply To: Automatic Plan Correction

    I realise this is an older post, but I was wondering if anyone has experienced any downsides with automatic tuning being on. It seems it is all positive from the...

    ----------------------------------------------------

  • Reply To: Getting an error when I try to shrink transaction log file

    Once  transactions are moved over to the replica log get cleared. Problems arise if there is ever a connection issue.

    ----------------------------------------------------

  • Reply To: What queries to tune first?

    Just to add my bit:

    In the Query Store you my want to look at regressed quries. In fact look at your Query Store overall from many views,... I/O, cpu, running...

    ----------------------------------------------------

  • Reply To: Database Log File

    Set the size manually after restorng and see if it does not get shrunk after wards.

    ----------------------------------------------------

  • Reply To: Updating data

    Are you connecting to the correct database and not a test server ?

    ----------------------------------------------------

Viewing 15 posts - 151 through 165 (of 1,246 total)