Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 2003
    Location
    Lancashire, UK
    Posts
    2

    Unanswered: Listing 'new' databases

    I'm looking for a script / SQL Agent job I could schedule that will flag up when a 'new' database has been created on some of our servers. One of the applications we run can create these -- but I need to do some 'housekeeping' on these servers as they don't have much spare space.

  2. #2
    Join Date
    Nov 2003
    Posts
    2,933
    Provided Answers: 12
    What about
    Code:
    select * 
    from sysdatabases
    where crdate > getdate() - 1
    You will need to adjust the date calculation to your needs

  3. #3
    Join Date
    Nov 2003
    Location
    Lancashire, UK
    Posts
    2
    Thank you -- it works a treat !

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •