SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Hybrid View

  1. #1
    SitePoint Addict seanmayhew's Avatar
    Join Date
    Aug 2002
    Posts
    209
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Need help moving MSSQL database

    I made the mistake of getting involved with a friend who started a hosting business but now I want out. My question is how on earth do I get my MSSQL database off of his server and onto my local drive. I tried doing the backup but that errors out with permission errors. I've tried export data by setting the destination to my local SqlServer and that errors out also with permission errors I assume. when I just generate a sql script it keeps adding my username for the server as the owner of the tables rather than dbo so I have
    Code:
    setuser N 'myusername'
    throughout the generated sql script.

    Im relatively new to SQLServer and know just about enough to be dangerous and thats it.

    Any help would be greatly appreciated.

  2. #2
    Afrika
    Join Date
    Jul 2004
    Location
    Nigeria
    Posts
    1,737
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    when I just generate a sql script it keeps adding my username for the server as the owner of the tables rather than dbo so I have
    SQL would add your username if you dont specify, dbo in your scripts.

    Open EM, and right click your db, and choose>> all tasks >> generate sql scripts.

    On the dialog box, set the options you want e.g. dont not choose script db users and roles.(Under the options tab) I normally just choose table scripting options, depending on what you have.

    And under the formatting options, choose generate scripts for dependent objects.

    Create a new db, and run your new script in query analyzer.

    Once you create your db, locally you can use DTS to copy your db.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •