Forum Replies Created

Viewing 15 posts - 2,191 through 2,205 (of 7,187 total)

  • RE: Grant access to user to run a SQL agent job

    There are three roles in msdb, called something like SQLAgentUser, SQLAgentOperator and SQLAgentSomethingElse. Each gives a different level of permissions to a user to do things with jobs. ...

  • RE: Find column values with Pattern

    Yes, although I assume this is a one-off and therefore performance might not be too important. Also, using EXISTS might not meet the requirement. Since we know that...

  • RE: Find column values with Pattern

    Oh, I see, yes - having my ANDs and ORs in a muddle caused XML columns to be included. Good spot!

    John

  • RE: Find column values with Pattern

    Eirikur Eiriksson (11/14/2016)


    John Mitchell-245523 (11/14/2016)


    OK, this query will look at all columns with data length of 15 or more and show the number of values with the requested pattern. ...

  • RE: Find column values with Pattern

    OK, this query will look at all columns with data length of 15 or more and show the number of values with the requested pattern. Beware that the INFORMATION_SCHEMA...

  • RE: Find column values with Pattern

    Nicole

    Those aren't properties of the column: they're properties of the individual values in the columns. Are you saying that you want to find all columns that have at least...

  • RE: Update duplicate keys

    I'm not sure what you mean by ON DUPLICATE - I don't think it's a T-SQL keyword. You'll need either a MERGE statement, or to do separate INSERT and...

  • RE: Loop through list of tables to find size and columns?

    No, you still don't need a loop. Put your list of tables in a temp table and join that to the results of one of the queries that you...

  • RE: Changing database owner

    Eirikur Eiriksson (11/11/2016)


    ramana3327 (11/11/2016)


    I am sure, I was not logged as sa.

    Then your login is a member of the sysadmin role

    😎

    Interesting. I'm a sysadmin and I just restored a...

  • RE: Loop through list of tables to find size and columns?

    You don't need a loop to get table sizes. Just type "table size query" into your favourite search engine and you'll get plenty of pointers to what to do....

  • RE: Changing database owner

    Like I said, the only way I know of doing it is to change the database owner separately. If you did it before and the owner was sa, could...

  • RE: Changing database owner

    As far as I know, you can't - RESTORE DATABASE will leave the database owned by the user who performed the restore. You'll need to add the change of...

  • RE: Information on SQL clustered environment

    Just change your connection string(s) so they have the new server name. That should be all - there's no need for an application to know whether its database is...

  • RE: Substring a value after a period

    What have you tried? If you show us that, we can show you where you're going wrong. Here's a hint: use CHARINDEX to find the position of the...

  • RE: How to Pass Output Parameter Store Procedure Value to input to another SP

    The reason your script fails is that the [font="Courier New"]EXEC @Variable = ProcName[/font] syntax writes the return value, not the output parameter value, into the @Variable variable. Return values...

Viewing 15 posts - 2,191 through 2,205 (of 7,187 total)