Script needed urgently

  • Can Any1 Provide Scripts to get following details for all databases on server.

    databasename,mdf filelocation,ldf filelocation,local_backuplocation,remotebackup_location.

    Both local and remote backup maintenance plans are present on server.

    Please help in getting backup locations,other details i can get,if one can give entire then well and good but atleast backuplocations are needed...PLZ do needful

    thanks and regards,

    Nikhil

  • I don't have a script, but I can tell you that you'll find most, if not all, the data you want in two views in msdb: backupfile and backupset.

    Also, some advice for you, Nikhil. When you post the same question in multiple forums, people feel like they're wasting their time when they post an answer then find your question has been answered in another forum. Please choose the forum that most closely matches your problem and post once there. You'll get as just many answers without irritating people.

    Good luck!

    Greg

  • Greg Charles (2/9/2009)


    I don't have a script, but I can tell you that you'll find most, if not all, the data you want in two views in msdb: backupfile and backupset.

    Also, some advice for you, Nikhil. When you post the same question in multiple forums, people feel like they're wasting their time when they post an answer then find your question has been answered in another forum. Please choose the forum that most closely matches your problem and post once there. You'll get as just many answers without irritating people.

    Good luck!

    i really apologies.

    but i did this coz it was urgency

  • See if this helps.....had it in my archives........

    SELECT

    CONVERT(CHAR(100), SERVERPROPERTY('Servername')) AS Server,

    msdb.dbo.backupset.database_name,

    msdb.dbo.backupset.backup_start_date,

    msdb.dbo.backupset.backup_finish_date,

    msdb.dbo.backupset.expiration_date,

    CASE msdb..backupset.type

    WHEN 'D' THEN 'Database'

    WHEN 'L' THEN 'Log'

    END AS backup_type,

    msdb.dbo.backupset.backup_size,

    msdb.dbo.backupmediafamily.logical_device_name,

    msdb.dbo.backupmediafamily.physical_device_name,

    msdb.dbo.backupset.name AS backupset_name,

    msdb.dbo.backupset.description

    FROM msdb.dbo.backupmediafamily

    INNER JOIN msdb.dbo.backupset ON msdb.dbo.backupmediafamily.media_set_id = msdb.dbo.backupset.media_set_id

    ORDER BY

    msdb.dbo.backupset.database_name,

    msdb.dbo.backupset.backup_finish_date

  • thanks a lot dude it worked.

    Also 1 login details needed plz help me out if you can..

    plz see

    http://www.sqlservercentral.com/Forums/Topic652710-146-1.aspx

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply