Forum Replies Created

Viewing 15 posts - 1,876 through 1,890 (of 2,917 total)

  • Reply To: Dynamic SQL (openrowset) problem

    Quick and easy fix to this - need to mark the variable as an OUTPUT variable in the parameter assignment part of sp_executesql.

    In your EXEC statement, change:

    @xml=@xml

    to

    @xml=@xml OUTPUT

     

    Something to note...

    The above is all just my opinion on what you should do. 
    As with all advice you find on a random internet forum - you shouldn't blindly follow it.  Always test on a test server to see if there is negative side effects before making changes to live!
    I recommend you NEVER run "random code" you found online on any system you care about UNLESS you understand and can verify the code OR you don't care if the code trashes your system.

  • Reply To: Integer convert to percent

    I'd recommend against implicit conversions wherever possible.  There are a lot of articles online about implicit conversion and even SQL Server, via the execution plan, will give a warning about...

    The above is all just my opinion on what you should do. 
    As with all advice you find on a random internet forum - you shouldn't blindly follow it.  Always test on a test server to see if there is negative side effects before making changes to live!
    I recommend you NEVER run "random code" you found online on any system you care about UNLESS you understand and can verify the code OR you don't care if the code trashes your system.

  • Reply To: Authentication failed

    First, this sounds like a huge security risk.  linked servers with sysadmin permissions on them sounds like a good way for someone to toss a "drop database" or a shutdown...

    The above is all just my opinion on what you should do. 
    As with all advice you find on a random internet forum - you shouldn't blindly follow it.  Always test on a test server to see if there is negative side effects before making changes to live!
    I recommend you NEVER run "random code" you found online on any system you care about UNLESS you understand and can verify the code OR you don't care if the code trashes your system.

  • Reply To: Is it acceptable to use the presence of a value in a NULLable column as a flag?

    I think either are acceptable, but I think one will have better performance.  I am pretty sure "NOT NULL" is not sargable so you may have a performance hit by...

    The above is all just my opinion on what you should do. 
    As with all advice you find on a random internet forum - you shouldn't blindly follow it.  Always test on a test server to see if there is negative side effects before making changes to live!
    I recommend you NEVER run "random code" you found online on any system you care about UNLESS you understand and can verify the code OR you don't care if the code trashes your system.

  • Reply To: Worker Threads Per Session

    That sounds like a maxdop and cost threshold configuration issue.

    But if you execute sp_who2 and look for multiple copies of the same SPID, that'll show you how many threads are...

    The above is all just my opinion on what you should do. 
    As with all advice you find on a random internet forum - you shouldn't blindly follow it.  Always test on a test server to see if there is negative side effects before making changes to live!
    I recommend you NEVER run "random code" you found online on any system you care about UNLESS you understand and can verify the code OR you don't care if the code trashes your system.

  • Reply To: Explanation of Page Splits

    this page has a good writeup on page splits:

    https://blog.waynesheffield.com/wayne/archive/2016/10/smart-page-split/

    but if you think of it like a phone book, with each page in the phone book holding 8 KB of data,...

    The above is all just my opinion on what you should do. 
    As with all advice you find on a random internet forum - you shouldn't blindly follow it.  Always test on a test server to see if there is negative side effects before making changes to live!
    I recommend you NEVER run "random code" you found online on any system you care about UNLESS you understand and can verify the code OR you don't care if the code trashes your system.

  • Reply To: Nutanix - 'misaligned log IOs which required falling back to synchronous IO’

    After the restore completes, are you still seeing those errors?  The line:

    06/03/2020 17:43:21,spid56,Unknown,The tail of the log for database DATABASE is being rewritten to match the new sector size of...

    The above is all just my opinion on what you should do. 
    As with all advice you find on a random internet forum - you shouldn't blindly follow it.  Always test on a test server to see if there is negative side effects before making changes to live!
    I recommend you NEVER run "random code" you found online on any system you care about UNLESS you understand and can verify the code OR you don't care if the code trashes your system.

  • Reply To: Script error

    To fix problem number 1 (LEFT or SUBSTRING error), lets look at your query for all cases of LEFT or SUBSTRING.  That gives us this small chunk of  your code:

  • This reply was modified 6 years ago by Mr. Brian Gale. Reason: EDIT - had bad process in there. not a blank or empty data problem

The above is all just my opinion on what you should do. 
As with all advice you find on a random internet forum - you shouldn't blindly follow it.  Always test on a test server to see if there is negative side effects before making changes to live!
I recommend you NEVER run "random code" you found online on any system you care about UNLESS you understand and can verify the code OR you don't care if the code trashes your system.

  • Reply To: How to force MS SQL to select a partition instead of making a full table scan

    Maybe I am misunderstanding the problem here, but to me how you describe it is how I expect it to work.

    With the second query and second screenshot, you are showing...

    The above is all just my opinion on what you should do. 
    As with all advice you find on a random internet forum - you shouldn't blindly follow it.  Always test on a test server to see if there is negative side effects before making changes to live!
    I recommend you NEVER run "random code" you found online on any system you care about UNLESS you understand and can verify the code OR you don't care if the code trashes your system.

  • Reply To: How to force MS SQL to select a partition instead of making a full table scan

    First, I should note that I have SQL standard, not enterprise and have not done partitioning so my input here may be way out to left field.

    I was just reading...

    The above is all just my opinion on what you should do. 
    As with all advice you find on a random internet forum - you shouldn't blindly follow it.  Always test on a test server to see if there is negative side effects before making changes to live!
    I recommend you NEVER run "random code" you found online on any system you care about UNLESS you understand and can verify the code OR you don't care if the code trashes your system.

  • Reply To: SQL Agent Jobs running 2 instances at once

    Found this post:

    https://www.sqlservercentral.com/forums/topic/sql-server-schedule-jobs-running-twice-at-the-same-time

    where they found that there was a conflict in 2 tables.  The recommendation was to install the latest patches, but the user fixed it by deleting the schedule...

    The above is all just my opinion on what you should do. 
    As with all advice you find on a random internet forum - you shouldn't blindly follow it.  Always test on a test server to see if there is negative side effects before making changes to live!
    I recommend you NEVER run "random code" you found online on any system you care about UNLESS you understand and can verify the code OR you don't care if the code trashes your system.

  • Reply To: Licensing Audit Advice

    jasona.work wrote:

    Mr. Brian Gale wrote:

    A server which was created ONLY to host SSRS (created before I started, and at this point I was a good 6  years into being a DBA, so...

    The above is all just my opinion on what you should do. 
    As with all advice you find on a random internet forum - you shouldn't blindly follow it.  Always test on a test server to see if there is negative side effects before making changes to live!
    I recommend you NEVER run "random code" you found online on any system you care about UNLESS you understand and can verify the code OR you don't care if the code trashes your system.

  • Reply To: Secured connection to AD with linked server (LDAPS)

    We do not use LDAPS at my workplace.  But, after a quick google I found this post:

    https://stackoverflow.com/questions/45224506/how-to-query-ldap-over-ssl-from-sql-server

    but it sounds like you already tried that.

    Could you post the full error (stripping...

    • This reply was modified 6 years ago by Mr. Brian Gale. Reason: added another thought on why it may be failing

    The above is all just my opinion on what you should do. 
    As with all advice you find on a random internet forum - you shouldn't blindly follow it.  Always test on a test server to see if there is negative side effects before making changes to live!
    I recommend you NEVER run "random code" you found online on any system you care about UNLESS you understand and can verify the code OR you don't care if the code trashes your system.

  • Reply To: SQL Agent Jobs running 2 instances at once

    My understanding is similar to yours - SQL shouldn't let you run the same job twice at the exact same time.  I have tried doing this and it gives me...

    The above is all just my opinion on what you should do. 
    As with all advice you find on a random internet forum - you shouldn't blindly follow it.  Always test on a test server to see if there is negative side effects before making changes to live!
    I recommend you NEVER run "random code" you found online on any system you care about UNLESS you understand and can verify the code OR you don't care if the code trashes your system.

  • Reply To: Changing Connection Managers with the Configuration Manager

    Not SQL related, but you can do similar things with C# and other .NET languages if you use Visual Studio.

    I like doing this when I make an application in C#...

    The above is all just my opinion on what you should do. 
    As with all advice you find on a random internet forum - you shouldn't blindly follow it.  Always test on a test server to see if there is negative side effects before making changes to live!
    I recommend you NEVER run "random code" you found online on any system you care about UNLESS you understand and can verify the code OR you don't care if the code trashes your system.

  • Viewing 15 posts - 1,876 through 1,890 (of 2,917 total)