Forum Replies Created

Viewing 15 posts - 841 through 855 (of 2,917 total)

  • Reply To: Reference Query within a Query

    Pretty sure in SQL Server, that would be a view or a table.

    You cannot name a query.  So whatever the contents of the query "QRY_DATES" are, you would need 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: Reports upgraded to SSRS 2019 on WIN 2019 server is slower compared to SSRS 2008

    If I am understanding your post correctly, switching to Windows Server 2019 is causing the slowness getting data from the SQL instance, correct?

    If so, I would guess the problem 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: External Tables error on cloned server

    My first thought would be firewall or permissions.

    Permissions could be a problem if the SQL Server Service account (or Agent service account or the Polybase service account... not 100% certain...

    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 distinguish human principals from all the rest in sys.server_principals ?

    type = 'U' means you are grabbing all "user" type of login.  To SQL, a "human" and a "non-human" are identical.  It is just a login.

    How would SQL know the...

    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: Offloading DBCC CHECKDB to another server

    I would go with that approach UNLESS the full CHECKDB fails on the restored DB.  If it fails, I would then run a full on prod as well to ensure...

    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 Object Usage like Views, SP's

    Pretty sure that my advice above would apply to views as well.  Profiler or plan cache will capture the TSQL being run and then you can review and audit it.

    The...

    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: TDE system databases, report server

    If there is any data you would be upset or in trouble for if it got leaked, I would encrypt it.

    My opinion - there isn't anything worth stealing in the...

    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: Fill down empty cells with values from a previous non-empty row

    One approach that MAY work for you would be to break it up into multiple steps.

    Since pulling the inner queries into a temp table improves performance, why not just use...

    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: Fill down empty cells with values from a previous non-empty row

    Looking at the execution plan, I am thinking that adding an index on SubscriberID may help as you are using those in the WHERE clause.

    Your estimated number of rows 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: Offloading DBCC CHECKDB to another server

    There is a good article on checkdb here:

    https://www.mssqltips.com/sqlservertip/2399/minimize-performance-impact-of-sql-server-dbcc-checkdb/

    I do recommend you read that as it addresses your concerns with PHYSICAL_ONLY as well as using the backup-restore-checkdb approach.

    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: Fill down empty cells with values from a previous non-empty row

    The best way to work with performance issues is to look at the execution plan.  Could you post the execution plan for your query?

    When I run the above, it 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: when make drop to table already exist on begin of procedure it not working issue

    Alternately, rather than dropping the tables and recreating them (not a process I generally do in a stored procedure), how about doing a TRUNCATE/DELETE at the start and an INSERT...

    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 Object Usage like Views, SP's

    One approach would be to modify them and add in a logging table to capture when the stored procedure is called.

    Another way would be to start a profiler trace and...

    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 2016 Linked Server to Azure DB Not Working

    Since you get an authentication error, I would be willing to bet the problem is with the authentication somewhere.

    Did a quick google, and found this:

    https://www.liquidweb.com/kb/troubleshooting-microsoft-sql-server-error-18456-login-failed-user/

    Not specific to Azure, but should...

    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: Using an OR in a CASE statement

    I think the problem is that a CASE statement cannot return 2 values like that.

    The idea of a CASE statement in SQL is that if the lookup value is X...

    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 - 841 through 855 (of 2,917 total)