0

I have taken over the administration of a website, but I have trouble getting the database to my test computer. I can access the database (MS SQL) via myLittleAdmin. On my test computer, I have MS SQL Express, and I wonder how I should do to copy the database.

Edit

The web hotel say explicitly that it can not replicate the database through SQL Server Management Studio. I have not find any way to connect to the database external.

The only way I have come to is to take a backup of the database in myLittleAdmin, but how then to use it I do not know.

1
  • If you can make a backup of it from the tool, I assume you can then download the backup? If so, you should be able to attach that backup to your local SQL Server instance... Commented Apr 14, 2011 at 15:25

4 Answers 4

2

If

  • it's not too large
  • you're dealing with firewall issues or other corporate nonsense
  • you only need to do it once, or very occasionally

Then copy and paste the data in to MS SQL Express using MS SQl Management Studio

It's crude and extremely slow, but it works. You can use MS Excel as an intermediary as well if you need to clean up any data...

Now I need to go shower.

Sign up to request clarification or add additional context in comments.

1 Comment

If anyone else wants to downvote this, at least man up and say why you're doing it. I think I made it clear that this is not best option, but in cases where there are no other options, this may be a valid solution. Why downvote an actual answer and pass over what should have been a comment and an answer that, while the "right way to do it" ignores the implied limitations of the issue?
2

Use SQL Server Management Studio (Express) to connect to the remote database. You can then copy the database.

  • right click the source database. Tasks-> Copy Database
  • choose your method of copy - SQL MO or detach (whichever appropriate for you, given the 'detach' will leave the DB unavailable for a short period of time)

Alternatively, you could script the CREATE of all the tables, views, stored procs, and data within the tables.

  • right click the source database. Tasks -> Generate Scripts
  • choose which objects to script.
  • carefully choose the options (users, logins, indexes, FK, and Scripts Only and/or Data)

If you absolutely cannot use/install SSMS on your SQL Server Express destination machine, consider spinning up a new development VM (VirtualBox, VMWare, etc), and install SSMS.

5 Comments

Note that the "detatch" method requires downtime, but it's also a lot faster and more reliable.
I made the assumption that he can't connect to the database because he implies he can only connect to the database via myLittleAdmin. If that's not the case, then this method is decidedly less awful.
Unfortunately I can not use SQL Server Management Studio
@magol: why not use SSMS? Your destination machine is running SQL Server, so it will run SSMS. If not that, how about a new VM where you can load the tool? My Option 2 above will work and doesn't require 'replication', which is an entirely different approach. Replication != SSMS scripting.
I dont now whay I dont can use SSMS, but the support for the web hotel say that I cant. How can a Vm solve the problem? I dont find any Generate Scripts in myLittleAdmin
0

I talked to support and what I had to do was to set up an SSH tunnel. Then I could use the SQL Server Management Studio as usual

Comments

-1

Where does MySQL come in? Normally, I would say backup and restore, but if you only have myLittleAdmin access, I'm not sure you can get that file out.

Might be easier to simply script all the schema creation and data inserts, too.

Despite the downvote, let me add that I have actually recently done this for a database of a prototype system I consulted to take to completion - the SQL Server was hosted and we even had SSMS access. But we could not back up and restore because we could not add a backup device to a machine outside of the hosting service or backup to a file we could get to on the hosting service.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.