Forum Replies Created

Viewing 15 posts - 7,216 through 7,230 (of 9,643 total)

  • RE: Viewing jobs after changing server/msdb collation

    Changing the collation started the problem because the msdb you restored was created using the original collation.

    As far as why you are still having problems I have no idea....

  • RE: SQL Profiler

    If you have Profiler installed on your local machine then you can run Profiler against any server on which you have ALTER TRACE permissions (2005/2008) or are a member of...

  • RE: Setup Email alart On Server

    Something like this:

    Declare @query varchar(1000)

    Set @query ='

    Select

    J.name as job_name,

    JH.step_name,

    Case

    When JH.run_status = 1 Then ''Succeeded''

    When JH.run_status = 2 Then ''Retry''

    When JH.run_status = 3 Then ''Canceled''

    When JH.run_status = 4 Then ''Running''

    Else ''Failed''

    End...

  • RE: Query HELP....

    Select

    EmpNo,

    PhoneNumber,

    Count(RowNo) as total_calls

    From

    dbo.Test

    Group By

    ...

  • RE: Mapping DB Roles to Users?

    Oops, I think this is a little better:

    [font="Courier New"]SELECT

       DB_NAME() AS database_name,

       MP.name AS database_user,

       RP.name AS database_role,

       SP.name AS server_login,

       SPR.name AS server_role

    FROM

       sys.database_principals MP LEFT JOIN

       sys.database_role_members R...

  • RE: Mapping DB Roles to Users?

    Brandie,

    I think this code is close to what you need:

    [font="Courier New"]SELECT

       DB_NAME() AS database_name,

       MP.name AS database_user,

       RP.name AS database_role,

       SP.name AS server_login,

       SPR.name AS server_role

    FROM

       sys.database_principals RP JOIN

       sys.database_role_members...

  • RE: Trigger to Track Table Updates

    Thanks, but you only get there by being prolific not necessarily correct. In this case I happen to be right, but if you answer enough questions you have to...

  • RE: What is the best way to get a proper backup?

    Shrinking the database is not a recommended practice. If you shrink it then you will likely go right back and grow it again if autogrow is not on and...

  • RE: Can't make SQL Server Profiler work

    You can check out http://www.jumpstarttv.com as there is a series of short vidoes on how to use Profiler. Just a disclaimer, I did the videos. They are based...

  • RE: Can't make SQL Server Profiler work

    What events are you collecting using Profiler? Linq queries come across on the SQL:BatchStarting and SQL:BatchCompleted events.

  • RE: SQLSERVER TRiggers

    Why not handle this in the original transaction? If the user changes the 2 columns then send the 3rd column to the database as a null value.

    What if the...

  • RE: Trigger to Track Table Updates

    Glad I could be of help. Sorry about the errors, the second one you mention was a brain cramp on my part. The first one probably has...

  • RE: Multiple Transaction Log backup file outside the maintenance plan

    I don't know as far as the question you are asking. I will comment that you probably don't need to rebuild all the indexes every week. If you...

  • RE: Use xxxxxxx as a variable

    You cannot use a variable for the database name in a use statement. You would need to use dynamic SQL to accomplish this.

  • RE: Multiple Transaction Log backup file outside the maintenance plan

    Yes, Restore Log NewDbName From disk=FilePath With {options}

Viewing 15 posts - 7,216 through 7,230 (of 9,643 total)