Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Database backup (URGENT)

Database backup (URGENT)

Database backup (URGENT)


I have a db backup requirement. As shown in the attached image current system is as follows:

   1. There are three source databases such as DB001, DB002 and DB003. Each DB having one table as dbo.EMP and same table schema.
   2. Emp table consists of EmpID (PK) and EmpName.
   3. One backup database i.e, DBbackup

I need as follows:

   1. Looping through all DB: "SELECT NAME FROM sys.sysdatabases WHERE NAME LIKE ''DB00%''"
   2. Check if table dbo.EMP exist in each DB.
   3. If exist then check table "001" exist in DB "DBbackup". >> "SELECT OBJECT_ID('DBbackup.dbo.001','U') AS Check " . This query will return NULL if table "001" not exist.
   4. If not exist then create a table by taking part of DB name like "001" with same schema in "DBbackup" database.
   5. Select into "001", from dbo.Emp before matching row count to avoid duplicate records.

Can you give idea how to achieve it.

Data export of each table is very time consuming. There are more than 150 DBs with huge data. Is there any alternative wizard or inbuilt script is there in SQL server 2005.

Can it be achieve by stored procedure.

Can we put a time stamp in SP to check the processing time for each DB.

Expecting for your solution. Its very urgent.



RE: Database backup (URGENT)

See my response on IT Knowledge Exchange.

MCSA (2003) / MCDBA (SQL 2000)
MCTS (SQL 2005 / SQL 2008 Implementation and Maintenance / Microsoft Windows SharePoint Services 3.0: Configuration / Microsoft Office SharePoint Server 2007: Configuration)
MCITP Database Admin (SQL 2005/2008) / Database Dev (SQL 2005)

My Blog

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close