Forum Replies Created

Viewing 15 posts - 76 through 90 (of 13,460 total)

  • Reply To: Error: Sub report could not be shown

    so if you use the report, it works, but when run as the automation account, it fails, right?

    sounds like permissions.

    check the data source for the sub report. it should be...

    • This reply was modified 5 years, 5 months ago by Lowell.
    • This reply was modified 5 years, 5 months ago by Lowell.

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • Reply To: How to use Cursor to Execute stored procedure where featurevalue is bigger than

    i see your strategy, simply filter with a WHERE statement to process just the desired rows.

    I suspect you just need a decent cursor model? here you go!

    create...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • Reply To: How to use the column name alias from a case statement to a join statement

    To leverage the Alias, I think you would need to either use a common Table Expression or a sub query to expose the alias to the next statements.

    Alais's are evaluated...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • Reply To: SQL command returning -

    I think what you want to do is to use a CASE statement to evaluate the b.score: if it's less than zero use zero, else use the b.score

     

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • Reply To: Need help configuring replication at the Instance not DB level

    I cannot think of something out of the box that does this, third part or not.

    i think you have to do this manually, and it will be a bit of...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • Reply To: SQL Server 2016 mdf encrypted by ramsomware

    if the database is in SIMPLE recovery mode, it goes back to whether the database is currently accessible or not.

    you could restore last nights backup as a new database name,...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • Reply To: SQL Server 2016 mdf encrypted by ramsomware

    so SQL server has a lock on the mdf/ndf/ldf files because they are in use, so are you really, really sure the mdf was encrypted?

    is the database currently up and...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • Reply To: SQL Help - Beginner 2*

    no help for the specific error, but structure wise, here's some help.

    If you are using SUM,MIN,MAX,AVG you need a GROUP BY statement, and a column to group by.

    All columns in...

    • This reply was modified 5 years, 8 months ago by Lowell.
    • This reply was modified 5 years, 8 months ago by Lowell.

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • Reply To: Script logins and all permissions: no longer supported in SSMS generate script?

    i think sp_helprev_login has been the go to solution for years for logins.

    database permissions are stored in the databases themselves, and those are scriptable from SSMS , and if you...

    • This reply was modified 5 years, 9 months ago by Lowell.
    • This reply was modified 5 years, 9 months ago by Lowell.

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • Reply To: Trying to find all databases not in using sys.dm_db_index_usage_stats

    well, for items that are not in index stats at all, you could use something like this:

    SELECT name 
    FROM sys.[databases]
    WHERE [database_id] NOT IN(
    SELECT database_id FROM [sys].[dm_db_index_usage_stats]...

    • This reply was modified 5 years, 9 months ago by Lowell.

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • Reply To: Using NOLOCK in UPDATE or DELETE

    in order to keep things ATOMic, nolock is ignored in INSERT/UPDATE/DELETE operations.

    even if you added it, it would be ignored.

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • Reply To: Cost Threshhold for Parallelism and MDOP - will these always have an effect?

    Well for MaxDop recommendations, I've been using this pair of scripts  which have  calculations that someone else came up with.

    this script takes into account numa nodes and microsofts recommendations, and...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • Reply To: Cost Threshhold for Parallelism and MDOP - will these always have an effect?

    multi-threading is completely unrelated to how SQL server internally uses multiple cores.

    a multi threaded operation is how the applciation does it's thing, SQL server is a black box as far...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • Reply To: Trying to find all databases not in using sys.dm_db_index_usage_stats

    sys.dm_db_index_usage_stats already has all the index usage for all databases and all tables inside it, so you can get all the Databases all at once. no need for a loop...

    • This reply was modified 5 years, 10 months ago by Lowell.

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • Reply To: run mssql stored procedure from PS script and capture output

    you would need to add some code to specifically stop execution in the loop if an error is encountered.

    you might want to change the logic to be all-or-nothing, instead of...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • Viewing 15 posts - 76 through 90 (of 13,460 total)