Forum Replies Created

Viewing 15 posts - 1,246 through 1,260 (of 2,917 total)

  • Reply To: HEAP fragmentation percent is high

    I'd have a read on this page:

    https://www.red-gate.com/simple-talk/sql/database-administration/sql-server-heaps-and-their-fragmentation/#:~:text=In%20SQL%20Server%2C%20heaps%20are%20rightly%20treated%20with,that%20space%20is%20allocated%20and%20forward%20pointers%20used.

    But basically, "alter table <tablename> rebuild" will rebuild your heap.

    Does that table need to be a heap or would it benefit from an index?

    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: Encryption String and SQL Server Jobs

    Just to confirm, if you log into the server while the job is running and load up task manager, who does cscript.exe say it is running as?

    The reason I ask...

    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: Looking for suggestions on improving our "data warehouse" approach

    Just my opinion, but do you need ALL of the ERP data?

    The reason I ask is if you aren't needing all 130 GB of data, it MAY be faster to...

    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: Database gets locked while copying tables from another Server

    What is likely happening is sys.tables is getting a lock due to the SELECT * INTO TableName which would create the table AND do a select in a single transaction...

    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: update NULL to Blank for Dynamic fileds

    Making a guess here, but is that a TABLE or a VIEW or STORED PROCEDURE?  I am just trying to imagine designing a system that will alter a table to...

    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: SQL2016 to Access2016 Linked server issue

    What about UNC path vs drive letter or is the file stored locally?

    As another thought, are you using the 32-bit driver or the 64-bit driver?

    This is the link I found...

    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: external script for Java

    Another option (others may shoot this down as a bad idea) would be to turn on filestream access on the folder and have the SQL side mostly pulled out 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: external script for Java

    I second Ken's approach.  I like having my application logic at the application layer and my database logic in the database.

    I would much rather have 2 stored procedures (pre java...

    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 Data Drive Allocation Unit Size on Existing Installation

    One other thing you will want to be certain of is that the drive letter doesn't change.

    It USUALLY doesn't from a format, but I've seen Windows do stranger things before.

    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: CXCONSUMER Waits

    CXCONSUMER was introduced in SQL Server 2017 CU3.  14.0.2037.2 is NOT CU3.

    you are not "patched to current" as current SQL Server 2017 is CU23 which is version 14.0.3381.3

    Even CU3 is...

    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: Refactor subqueries into CTEs

    I agree with you 110%!

    I almost always use CTE's over nested selects.  I find them easier to read and easier to test and debug. "SELECT * FROM <cte name>" after...

    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: Refactor subqueries into CTEs

    From my experience, nested selects vs CTE's have had very similar performance.

    If you have a SQL formatting tool (such as RedGate SQL Prompt or ApexSQL Refactor), I would start 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: Cant cast VARCHAR(MAX) To XML Variable

    Your XML ends with:

    <InterfaceDefinition><id>Radio

    so right away, I see that id and InterfaceDefinition are both unclosed.  I expect these are not root level XML tags, so you probably have more that...

    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: Cant cast VARCHAR(MAX) To XML Variable

    Quick look at your code, your XML is missing closing tags, so it is malformed XML and as such cannot be cast to XML.

     

    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 Server 2016 SP1 to SP2

    My opinion for process - install it on test, test the crap out of it, if no fault found, install on live.

    As for "should" you install it?  I would.  SP2...

    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,246 through 1,260 (of 2,917 total)