Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 Backup MS SQL Server using ASP.NET

Author  Topic 

wmli
Starting Member

6 Posts

Posted - 2006-05-14 : 03:04:46
Hi!

For the moment I’m hooked up with this hosting company that refuses to give me any backup files of my Microsoft SQL Server database/tables. I’ve even asked if the can do it just once but they still won’t. I don’t know what they are doing because they won’t even let me use Enterprise Manager so, from what I know, can’t use the scripts that I’ve found that use stored procedures.

Which is the easiest way to do a full backup just using the built in functionality of ASP.NET 1.3 and with limited permission on the SQL server? The goal is to move everything to a new company.

A friend recommended this way:

Create a class that holds both the table structure and a dataset for the data.
Each instance of these class is then stored in a collection that we serialize and store on the web server.
When this is done we reverse the process at the new hosting company.

Would this work / be the easiest way?

Thanks

Kristen
Test

22859 Posts

Posted - 2006-05-14 : 04:44:45
If you can connect to the server from your Workstation (i.e. from "outside" the hosting company, rather than just via applications running on the hosting company's servers) then you could use DTS on your machine to migrate the data into a different database - e.g. one locally to your machine

Kristen
Go to Top of Page

Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)

7020 Posts

Posted - 2006-05-14 : 05:10:23
You need to attack the problem directly.

Get yourself a mean, flesh-eating lawyer to give them a little scare. Nothing works better than the prospect of an expensive legal battle to get them to see reason.



CODO ERGO SUM
Go to Top of Page

wmli
Starting Member

6 Posts

Posted - 2006-05-14 : 11:27:26
quote:
Originally posted by Kristen

If you can connect to the server from your Workstation (i.e. from "outside" the hosting company, rather than just via applications running on the hosting company's servers) then you could use DTS on your machine to migrate the data into a different database - e.g. one locally to your machine

Kristen



Yes that would probably be a very nice way to go. The problem is that the only information I know about the server, rights etc., is how we connect to it;
"driver={SQL Server}; Provider=SQLOLEDB; Server=SQL1; database=blah; uid=user; pwd=pass;"
I don’t really have any experience in this field but I assume we need the ip-address to start of with. But I think the chance that we can connect from a remote connection is rather small. Did this extra info increase the chance?

What is DTS short for? I’ve previously used Enterprise Manager for remote administration.

quote:
Originally posted by Michael Valentine Jones

You need to attack the problem directly.

Get yourself a mean, flesh-eating lawyer to give them a little scare. Nothing works better than the prospect of an expensive legal battle to get them to see reason.



CODO ERGO SUM



For the moment we doesn't even have a contract with the hosting company, living on borrowed time so to speak, and thus we have a lot to lose but less to gain teasing them.
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2006-05-14 : 13:10:46
"I assume we need the ip-address to start of with"

How did you create your database in the first place?

If you can PING the "SQL1" server then that should be enough. But you will need to be able to get some sort of connection.

"I’ve previously used Enterprise Manager for remote administration"

That will do! Once you have some sort of connection/PING to the remote database then create a new, empty, database on your local machine, start Enterprise Manage, right click the new database and choose IMPORT. Then specify your host's details for the SOURCE database, and you should then be able to choose the tables you want to transfer into your local DESTINATION database.

Might be an idea to do a rehearsal with a local database so you get familiar with DTS first.

Kristen
Go to Top of Page

wmli
Starting Member

6 Posts

Posted - 2006-05-14 : 13:34:07
I'm sorry for not being clear enough.

We created the database on an old SQL Server using Enterprise Manager. Then the hosting company was bought and they moved the database to another server and didn't bother to give us access using EM. Now when we're leaving they won't let us take the database with us and we can’t take legal help since we don’t have a contract with them.

I'm not even sure that SQL1 has an external ip. Can I figure it out using ASP.NET?
Go to Top of Page

derrickleggett
Pointy Haired Yak DBA

4184 Posts

Posted - 2006-05-14 : 14:25:11
Did you have a contract with the old hosting company? If so, that's your data and they are bound by the contract. Send them a letter notifying you are taking legal action for the hijacking your data. Demand an immediate backup of the database delivered within 24 hours of receipt of the letter.

If they don't give it to you, sue them into non-existence. They do NOT have a legal case with this.

MeanOldDBA
derrickleggett@hotmail.com

When life gives you a lemon, fire the DBA.
Go to Top of Page

wmli
Starting Member

6 Posts

Posted - 2006-05-14 : 14:54:20
Well I guess you're right. But that would probably take some time and I want to learn more about MS SQL & .NET. I'll just have to study on how to implement the solution my friend recommended. Or is there a better way, given my constraints?
Go to Top of Page

derrickleggett
Pointy Haired Yak DBA

4184 Posts

Posted - 2006-05-14 : 15:36:43
Look at the scripts here: http://www.nigelrivett.net/#ASP

There are several ways to do this. Pay particular attention to the DMO section. You can script out objects, create insert statements from tables, etc. Basically, he gives you all the tools you need without using backup/restore.



MeanOldDBA
derrickleggett@hotmail.com

When life gives you a lemon, fire the DBA.
Go to Top of Page

Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)

7020 Posts

Posted - 2006-05-14 : 15:45:19
quote:
Originally posted by wmli

I'm sorry for not being clear enough.

We created the database on an old SQL Server using Enterprise Manager. Then the hosting company was bought and they moved the database to another server and didn't bother to give us access using EM. Now when we're leaving they won't let us take the database with us and we can’t take legal help since we don’t have a contract with them.

I'm not even sure that SQL1 has an external ip. Can I figure it out using ASP.NET?





You probably won't need a lawyer to actually sue them. You just need to get one to send the message that you are prepared to assert your rights and get them to do the right thing. They really don't have anything to gain by keeping you from your data, so an expensive legal battle doesn't make sense for them.







CODO ERGO SUM
Go to Top of Page

derrickleggett
Pointy Haired Yak DBA

4184 Posts

Posted - 2006-05-14 : 15:58:43
Personally, I would do it because:

1. It won't cost you anything really.
2. They are asses.

So, even if you don't need the backup, it serves them right. You might want to post the name of the hosting company on forums everywhere also. Send them the links and see how long it takes to get them excited about the prospect of lost revenue.

MeanOldDBA
derrickleggett@hotmail.com

When life gives you a lemon, fire the DBA.
Go to Top of Page

wmli
Starting Member

6 Posts

Posted - 2006-05-14 : 16:32:34
That's the problem. I can't risk losing the data! Nevertheless thanks for the support!
Go to Top of Page

derrickleggett
Pointy Haired Yak DBA

4184 Posts

Posted - 2006-05-14 : 16:38:30
Check out Nigel's scripts. They will get you what you need.

MeanOldDBA
derrickleggett@hotmail.com

When life gives you a lemon, fire the DBA.
Go to Top of Page

wmli
Starting Member

6 Posts

Posted - 2006-05-14 : 17:17:25
I missed your post, sorry! Yes I'll definitely check them!
Go to Top of Page
   

- Advertisement -