SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 

Get your favorite SSC scripts directly in SSMS with the free SQL Scripts addin. Search for scripts directly from SSMS, and instantly access any saved scripts in your SSC briefcase from the favorites tab.
Download now (direct download link)

Check Overdue Databases Backup List For Multiple SQL Servers

By SQL Master,

We can use this SQL Script to get Overdue databases list which have not been backed-up from last 24 hrs.

Note: We can change the Rotation in this SQL Script.

We can use this SQL Script as input in SQLCMD/OSQL command as:

Put Overdue database SQL query into "C:\temp_rahul\Overdue.sql"

-S = Server Name here is "local\sql"

-U = User Name here is SA

-d = Database Name here is master

-i = Input SQL file here as "C:\temp_rahul\Overdue.sql"

-n = Print path here as C:\temp_rahul\Overdue.txt

osql -Slocal\sql -Usa -Ppass@#123 -dmaster  -i "C:\temp_rahul\Overdue.sql"-w180 -n >> "C:\temp_rahul\Overdue.txt"

Total article views: 772 | Views in the last 30 days: 3
 
Related Articles
FORUM

I need script related to databases

glnp scripts on database

FORUM

Generate scripts for all databases

Generate scripts for all databases

FORUM

Scripting Remote Database using SMO in .net

Can't script remote database using script method

SCRIPT

Get Detach or Attach all user databases script

Script to generate script to detach or attach user databases

 
Contribute