Viewing 15 posts - 1,876 through 1,890 (of 2,917 total)
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.
June 5, 2020 at 5:39 pm
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.
June 5, 2020 at 2:15 pm
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.
June 4, 2020 at 4:00 pm
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.
June 4, 2020 at 3:43 pm
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.
June 4, 2020 at 3:31 pm
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.
June 4, 2020 at 3:22 pm
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.
June 4, 2020 at 2:53 pm
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:
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.
June 3, 2020 at 9:50 pm
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.
June 3, 2020 at 9:25 pm
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.
June 3, 2020 at 8:24 pm
Found this post:
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.
June 3, 2020 at 7:13 pm
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.
June 3, 2020 at 7:00 pm
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...
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.
June 3, 2020 at 4:01 pm
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.
June 3, 2020 at 3:17 pm
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.
June 3, 2020 at 3:01 pm
Viewing 15 posts - 1,876 through 1,890 (of 2,917 total)