Forum Replies Created

Viewing 15 posts - 91 through 105 (of 13,460 total)

  • Reply To: ExecuteScalar: CommandText property has not been initialized

    it looks to me like you declare one variable, but use one that never existed a few lines later:

     

    i think you declared "SQL", but dynamically create "strSQL" a few lines...

    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

    I hope this example helps.

    in this case, i am looping through all *.sql files in a given folder.

    the output to a log file creates a  set pf Starting $scriptname /...

    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: Index Maintenance

    Thanks Jeff, I think my script is fine though, I don't think a unique index that is not part of a constraint requires any additional logic or exceptions.

    a unique index...

    • This reply was modified 6 years 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: Index Maintenance

    well i remember a time where we used to provide scripts, and then an explanation of what not to do....

    try my flavor of unused indexes. don't blindly execute them, evaluate...

    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: Queries run by a particular login or Database user in SQL Server 2016

    going forward, you could add something like this extended event as an example.

    assume you want to track what [mydomain\IzaguirreL] is querying.

    you don't need to identify the domain, as that is...

    • This reply was modified 6 years 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: Queries run by a particular login or Database user in SQL Server 2016

    without already having added something specifically to capture that, like an old-style  trace or the current incarnation of capturing via extended events, then no, it is not possible to find...

    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 Powershell to run a script to output a script

    Dan, rather than use the >  redirect, I've been using | Out-File with the Append parameter, and it works flawlessly for me: i return info messages, data sets etc, dividers,...

    • This reply was modified 6 years 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: The 'Tabular View' feature is not included in the '64 Bit Standard' edition of

    upgrade your SQL Server Management Studio to the latest 18.3 or above..

    versions 17 through at least 17.5 did not handle browsing cubes against 2014 correctly.

     

    https://developercommunity.visualstudio.com/content/problem/167945/the-tabular-view-feature-is-not-included-in-the-64.html

    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: difference between numeric and decimal

    for a definition of decimal(10,5):

    10 = maximum number of digits.

    5 = number of digits to the right of the decimal point.

    that means the largest value allowed before an error would...

    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: Subquery returned more than 1 value.

    you have two FROM statements; it treats the inner FROM as an accidental cross join; i think if you simply remove it you get the results you would expect.

    this is...

    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 grant CREATE TABLE but deny DROP TABLE?

    i wrote a decent DDL trigger example for someone that had  a similar-ish requirement.

    some people needed to be able to create ONLY views.

    the solution was  arole,a nd a DDL trigger...

    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: Migrating 2008 (w/Filestream data) to 2017

    i think the issue is that on your new SQL2017 server, you must enable Filestream at the server level in SQL Configuration manager first.

    then filestream would be supported. also, i...

    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: SSRS Export to word - error: the rectangle is too complex to export to Word

    this might be data related.

    so far, lets say Word had to render x number or rows of text boxes, and now the data finally exceeds the number of objects word...

    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 to insert Data into 2 Tables

    your insert statement above  is clearing inserting 820419145086 into the column in the very first line of the table, so your assumption that the column [NOKP_NEW] [nvarchar](255) NULL, will cleanly...

    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 - 91 through 105 (of 13,460 total)