Visual Basic.NET
  Home arrow Visual Basic.NET arrow Page 2 - Simple Backup/Restore Utility With SQL-DMO...
ASP Free Forums 
.NET  
ASP  
ASP Code  
ASP.NET  
ASP.NET Code  
BrainDump  
C#  
Code Examples  
Database  
Database Code  
IIS  
Microsoft Access  
MS SQL Server  
Silverlight  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
ASP Web Hosting  
ASP.NET Web Hosting 
Windows Web Hosting
 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
VISUAL BASIC.NET

Simple Backup/Restore Utility With SQL-DMO Using VB.NET
By: Jagadish Chaterjee
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 55
    2005-09-08

    Table of Contents:
  • Simple Backup/Restore Utility With SQL-DMO Using VB.NET
  • Understanding SQL-DMO Objects
  • Programming SQL-DMO using .NET
  • Backup/Restore utility using SQL-DMO with .NET
  • Understanding Backup and Restore processes

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Simple Backup/Restore Utility With SQL-DMO Using VB.NET - Understanding SQL-DMO Objects


    (Page 2 of 5 )

    If we carefully look at that object tree, the SQLServer object forms the trunk of the SQL-DMO object tree.  Every branch or sub-branch can be considered a SQL-DMO object that has a relation to the MS-SQL server component in some way.  Even though there exist several branches from that object, there are mainly three in-depth objects coming out as branches (highlighted in different colors).  They are

    • Database
    • JobServer
    • Replication

    Let us take a look at the most commonly used SQL-DMO objects.

    SQLServer object contains the objects and collections that implement SQL Server administrative tasks for SQL-DMO. The object allows SQL-DMO applications to connect to an instance of SQL Server by name, establishing the context for administrative tasks.  Without this object, generally we cannot connect to an SQL Server instance at all.

    Database object is a major component of the SQL-DMO object tree. This object contains collections that define the tables, stored procedures, data types, and users of a database. Methods of this object allow you to perform essential database maintenance functions, such as creating a new SQL Server database, backing up a database, and so on.

    Replication object represents the entire replication system for an instance of SQL Server, and is the root of all replication objects.  It can perform all types of replications defined in SQL Server.

    JobServer object exposes attributes associated with SQL Server Agent. SQL Server Agent is responsible for executing scheduled jobs and notifying operators of SQL Server error conditions or other SQL Server execution or job states.

    Backup object defines a backup operation related to a SQL Server database or log.  With this object we can back up a SQL Server database or database transaction log.

    Restore object defines a restore operation related to a SQL Server database or log.  With this object we can restore an entire or partial SQL Server database or database transaction log from an existing backup.

    Table object exposes the attributes of a single SQL Server table. With this object we can create a SQL Server table, change an existing SQL Server table by adding or dropping columns, export data from, or import data to, an existing SQL Server table, generate a Transact-SQL script to recreate an existing SQL Server table, remove a table from a SQL Server database, and so on.

    Column object represents the properties of a single column in a SQL Server table.  With this object, we can define the columns for a new SQL Server table, define a new column for an existing SQL Server table, drop an existing column from a SQL Server table, list the references of a SQL Server column, and so forth.

    There exist several collections to get the existing objects from a SQL Server instance through SQL-DMO.  I suggest you refer to SQL Server books online for further information on other SQL-DMO objects.  The next page introduces you to SQL-DMO programming.

    More Visual Basic.NET Articles
    More By Jagadish Chaterjee


       · Hello guys, this is my article on SQL-DMO together with VB.NET. You can start...
       · Tried to download the file for the article but the link doesn't seem to...
       · Hello, I fixed that link. Thank you for pointing it out to us :-)Mike
       · backup code is working perfectly , but the restor code is not working its giving...
       · please follow the "note" section of the article. Try to close Enterprise manager...
       · Dear Jagdish,This is a wonderful article! Can you kindly help for a similar kind...
       · Hai, thanks for your compliments. And thanks again for requesting me on...
       · Hi jagdish Have u released the article about replication which was asked by...
       · Hi JagdishNice article, but I am connecting to sql server using windows...
       · Hi Sita, This is palash. I have faced a similar problem like you. Did you find any...
       · DEAR SIR I IMPLEMENTED THT CODE BUT ITS NOT WORKING ,SO PLS SEND ME RELAVT CODE or...
       · Hi There,My Backup and restore code works fine but I have one problem.It...
       · This is wonderful artical.Can u help me to take the backuo of selected table(not...
       · This helps:oSQLServer.LoginSecure = true; oSQLServer.Connect("ServerName",...
       · Hi, Thanks for such a simple and useful utility. It is really cool. it works...
       · Can anyone help me with this problem?I want to restore selected backup which can...
       · The restore cannot be done if the database is being used. So if the datagrid uses...
       · This article is simply perfect! Short, Clear and concise. Thanks a lot..For...
       · Hi Sita and PalashI am Kulwinder Singh. I found out the solution for ur...
       · where is the link? i cant download the file.. please help me.
       · I am Rohit, I am using VB.Net. I am Beginner in .Net VS 2005. I want to know how...
       · can you give me the link to download this program
       · i am jerry can you give me link to download this program:)) thank
       · Hey Thanks For The code....!!Bi!
       · Hello.. i have got an error like "type SQLDMO.SQLServer is not defined" now what to...
       · Hello Mr. chaterjee and all friends,This article is great ! I m new to back up...
       · Have you got the solution for this please reply me
       · Hi Jagdish....It really fullfilled my needs... Thank youRegardsSTEEL
       · hi, Friendsi have a problem for restore the data using...
       · Public Class Form1 Dim osqlserver As New SQLDMO.SQLServer Dim WithEvents...
       · i want to use this code but it gives error in these line Dim osqlserver As New...
       · Hi,Im trying to do the restore after doing the backup and I got the following...
     

    VISUAL BASIC.NET ARTICLES

    - User-defined Functions using Visual Basic Ap...
    - Understanding Object Binding in VBA
    - Mastering the Message Box
    - Testing a Windows Forms Application
    - Using Visual Basic.NET Features to Code a Wi...
    - Correcting Code in a Windows Forms Applicati...
    - Write Readable Code and Comments for Windows...
    - How to Code and Test a Windows Forms Applica...
    - Adding Features to a Windows Forms Applicati...
    - How to Design a Windows Forms Application
    - LINQ to XML Programming Using Visual Basic.N...
    - Understanding Delegates using Visual Basic.N...
    - Create a Sudoku Puzzle Generator using VB.NET
    - Entity Creation and Messaging in a VB.NET Te...
    - Movement and Player Statistics in a VB.NET T...





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 2 Hosted by Hostway
    Stay green...Green IT