Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do .NET client backup file locally where database is on other mach

Status
Not open for further replies.

fletchsod

Programmer
Dec 16, 2002
181
I have created a .NET SMO backup script that allows the .NET application to make a backup of the SQL Server's database.

Now I have a situation. When the executable file is placed on a client machine that doesn't have SQL Server installed but use sqlclient (or odbc) connection to connect to a SQL Server on a different machine. How do I make a backup of the database (database file) from that server, through the database connection (sqlclient or odbc), to this local machine? (Meaning the backup file need to be created on this local machine).

Thanks...
 
Why wouldn't you use the backup features built into MS Sql Server to preform the backup?
When the executable file is placed on a client machine that doesn't have SQL Server installed but use sqlclient (or odbc) connection to connect to a SQL Server on a different machine. How do I make a backup of the database (database file) from that server, through the database connection (sqlclient or odbc), to this local machine? (Meaning the backup file need to be created on this local machine).
you don't. using ODBC to connect to the database deals with CRUD operations. Not administrative tasks (replication, backup, etc.)

If the client is deployed across multiple machines then you would have multiple backups running. This isn't necessary, and could potentially cause problems.

Jason Meckley
Programmer
Specialty Bakers, Inc.

faq855-7190
 
The application on the client machines do not have access to the server as much as the workstations do not have access to all of the servers.

We have 305 customers (companies) so most of them have 1 server due to the license cost and cost of MS-SQL server. They are not billionaries as Bill Gate is. SO, it is cost efficient for most customers to have 1 server.

So, everytime when there's a data anomaly in the database, the customer call us and we look into it. The bad part is we have to find the company's administrator and tell them to make a backup of hte database and somehow send it to us. We at our end can't do trouble-shooting or debugging without the database that contain data anomalies.

THe customers don't know much about computers, so we make it as easy as ABC for them. That is when the client click the button on the application and it does all of the work for them.
 
in this context providing a backup or datadump button makes sense. However I still don't think accessing this administrative task would be done through the ODBC connection.

Assuming all your customers are running MS Sql. I would research how to automate a data backup. i would then create either a script or simple app that does this.

Within the application itself I would wire the "make backup" button to execute the script/application for backing up the database.

With it being a stand alone app the end users could create the data file you need even if the GUI failed on them. by executing this other application.

Jason Meckley
Programmer
Specialty Bakers, Inc.

faq855-7190
 
Yea, I agree...

Is the SMO object part of the .NET framework or does it come with MS-SQL when it got installed on the server (MS-SQL installed the SMO object into .NET framework)?

Thanks...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top