Forum Replies Created

Viewing 15 posts - 5,821 through 5,835 (of 6,400 total)

  • RE: Insert the deleted record in another Tables

    what you asking for is a trigger

    take a look at triggers and the before update statement, you can then have an audit table

    so for example i have the below table...

  • RE: SQL Server Job Notifications

    SQLKnowItAll (2/23/2012)


    Figured it out...

    SELECT *

    FROM msdb.dbo.sysmail_profile p

    JOIN msdb.dbo.sysmail_principalprofile pp

    ON p.profile_id = pp.profile_id

    WHERE pp.is_default = 1

    I have 4 accounts and 4 profiles, they all show in profile and principal profiles but...

  • RE: script

    sp_msforeachdb 'USE [?];

    select

    DatabaseName = DB_NAME() ,

    CollectionDate = CONVERT(DATE,GETDATE()),

    a.FILEID,

    [FILE_SIZE_MB] =

    convert(decimal(12,2),round(a.size/128.000,2)),

    [SPACE_USED_MB] =

    convert(decimal(12,2),round(fileproperty(a.name,''SpaceUsed'')/128.000,2)),

    [FREE_SPACE_MB] =

    convert(decimal(12,2),round((a.size-fileproperty(a.name,''SpaceUsed''))/128.000,2)) ,

    a.NAME,

    a.FILENAME

    from

    dbo.sysfiles a'

  • RE: SQL Server Job Notifications

    please attach a screenshot of the alert system tab by right clicking on the SQL agent in Ssms so we can see the settings being used to send notifications

  • RE: SQL Server Job Notifications

    you don't need a default mail profile so maybe that's why nothing is being returned from principal profile.

  • RE: SQL Server Job Notifications

    SQLKnowItAll (2/23/2012)


    Sorry... My point there was that the default has been changed, but SQL Agent probably has not been restarted.

    Forgot about that, always catches me out, something so simple

  • RE: SQL Server Job Notifications

    your not confusing the default mail profile in the actual database mail configuration page for the mail profile sql agent is using are you?

  • RE: Automating Saving Spreadsheets from SQL queries

    in excel you can give it a connection which connects to sql and runs a query, this can be saved and refreshed with up to date data as and when...

  • RE: Log-shipping .. interesting question

    there is no best way to fail back as they are both the same in essence

    either setup logshipping again and then fail over again, then setup logshipping again

    or

    backup secondary, restore...

  • RE: Full backup of user database failed.

    you need to look further back, find out why the full text catalogs went offline

  • RE: SQL Server Job Notifications

    yep i got that too

  • RE: Automating Saving Spreadsheets from SQL queries

    you could take a look at ssis, to export data overnight from SQL to excel files, or use excel and embed a query into the spreadsheet so it can be...

  • RE: SQL Server Job Notifications

    rocky (2/23/2012)


    In looking at results from 'select * from msdb.dbo.sysmail_account' I do see the display name for another count is what's showing in the FROM: of the notification email. ...

  • RE: Log-shipping .. interesting question

    you would want to bring the DB's online so you will have to issue a command to each DB with the WITH RECOVERY statement and then resolve any issues with...

  • RE: Extract data from 200 identical tables

    are you extracting the data from DB1 to DB2? or just out into a report direct from the base tables?

Viewing 15 posts - 5,821 through 5,835 (of 6,400 total)