Forum Replies Created

Viewing 15 posts - 166 through 180 (of 348 total)

  • Reply To: case statement

    SELECT

    name AS DBName,

    CASE name

    WHEN 'CustomerDB' THEN 'Yes'

    ELSE 'No'

    END as DBs

    FROM sys.sysdatabases

    where name='CustomerDb'

    When CustomerDB is present it prints correct as below.

    Columns: DBName  Yes/No

    CustomerDB   Yes

    I need the where clause to filter for...

    • This reply was modified 4 years, 10 months ago by mtz676.
    • This reply was modified 4 years, 10 months ago by mtz676.
    • This reply was modified 4 years, 10 months ago by mtz676.
  • Reply To: Capture data changes in a table

    This should suffice for now ->capture and record data changes.

    But looks like I am stumped prior to this task.

    I built multiserver administrative servers.

    My principal server has 1 job which I...

    • This reply was modified 4 years, 11 months ago by mtz676.
    • This reply was modified 4 years, 11 months ago by mtz676.
    • This reply was modified 4 years, 11 months ago by mtz676.
    • This reply was modified 4 years, 11 months ago by mtz676.
    • This reply was modified 4 years, 11 months ago by mtz676.
    • This reply was modified 4 years, 11 months ago by mtz676.
  • Reply To: Pintable into cache

    Thank you but my question was can caching/pinning tables be an option to avoid fragmentation ?

  • Reply To: nvarchar - int comparisions

    CREATE TABLE [dbo].[A]([DatabaseName] [nvarchar](1000) NULL, [DBSize] [nvarchar](1000) NULL) 
    insert into A values (DatabaseA , 580960.00 MB)
    insert into A values(DatabaseB, 23523.00 GB)
    insert into A values(DatabaseC,234.00 KB)

    Table values:

    DatabaseA   580960.00 MB

    DatabaseB ...

  • Reply To: Extended events - session not capturing information

    Please ignore my previous comment.

    Thanks for the response

  • Reply To: Extended events - session not capturing information

    Thanks for the elaborate reply but looks like I still cannot get this to work.

    My Query:

    CREATE EVENT SESSION [AlterExtendedEvent] ON SERVER

    ADD EVENT sqlserver.object_altered(SET collect_database_name=(0)

    ACTION(sqlserver.database_name,sqlserver.nt_username,sqlserver.session_nt_username,sqlserver.sql_text)

    WHERE ([database_name]='AAAAAA' AND NOT ([nt_domain]='ABC' AND [nt_user]=N'DEF')))

    ADD...

  • Reply To: Extended events - session not capturing information

    When I use database_name as the only filter it works well.

    But when I add nt_user /session_nt_username under predicates everything goes for a toss.I get data I do not want to...

  • Reply To: Extended events - session not capturing information

    I tried to filter starting with one filter as suggested and still does not work.Obviously I am doing this completely wrong.Any suggestions please.I still find rows with AAAA\ZZZZ against nt_username...

  • Reply To: Extended events - session not capturing information

    Are you saying 'alter' works and not 'ALTER' ?

  • Reply To: Run query across 100\'s of servers in 1 go to set up a process

    This was certainly not an interview question.

    1.I have accumulated relevant information from across servers(110+ servers)  into a central server using SSIS. But that was more of a SQL monitoring solution...

  • Reply To: Extended events

    Thanks.That worked

  • Reply To: Audit

    Thanks

  • Reply To: Email alert

    Thank you John.

    Would you please elaborate on how to configure an email alert once an event happens which we needs to be emailed?

    Also...

    I am able to capture NTLogins activity.But the...

  • Reply To: Account alert

    Thanks for the response.I do agree with everything you have mentioned . But I don’t decide.

  • Reply To: Account alert

    Do you know of any 3rd party open source applications which do the work of a trigger ?

Viewing 15 posts - 166 through 180 (of 348 total)