Getting access to SQL DB

markhodg72's Avatar

markhodg72

13 Jun, 2012 04:01 PM

I have spent some considerable time getting the structure of my SQL DB, views and stored procedures correct on the AppHarbor hosted SQL server.

I would like to be able to either take a backup of my DB, or script the whole DB to a .sql file so I can create a copy of it locally. However, it appears I don't have sufficient rights to script the DB in one go, but instead have to do each object individually.

Is there any way I can get a copy of my DB either as a backup or .sql script more easily?

  1. Support Staff 2 Posted by rune on 13 Jun, 2012 10:27 PM

    rune's Avatar

    Hi,

    We've build the SQL Server Bulk copy tool - would that work for your use case?

    Best,
    Rune

  2. rune closed this discussion on 13 Jun, 2012 10:27 PM.

  3. markhodg72 re-opened this discussion on 14 Jun, 2012 07:24 AM

  4. 3 Posted by markhodg72 on 14 Jun, 2012 07:24 AM

    markhodg72's Avatar

    Does it copy the views and stored procedures?

  5. Support Staff 4 Posted by friism on 14 Jun, 2012 11:19 AM

    friism's Avatar

    Hi Mark

    The tool only copies data, so you'll have to use the generate scripts wizard for the other items. Note that you should be able to select and script multiple items in one go.

    Let us know if you can't get that working
    Michael

  6. 5 Posted by markhodg72 on 14 Jun, 2012 12:05 PM

    markhodg72's Avatar

    That's the main problem - you can't multi select the stored procedures to script them. This means I will have to script each one individually which is going to take ages.

    Why are the permissions not set so I can script the whole db myself?

    Is there another way to do this in one go, or do I have to manually script each stored procedure/view?

  7. Support Staff 6 Posted by friism on 14 Jun, 2012 12:28 PM

    friism's Avatar

    Hi Mark, I remember now - you need to leave out Roles and Schemas as mentioned here: http://support.appharbor.com/discussions/problems/1209-sql-script-g...

    Michael

  8. markhodg72 closed this discussion on 18 Jun, 2012 03:05 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac