Results 1 to 11 of 11
  1. #1
    Join Date
    Jul 2004
    Posts
    268

    Unanswered: Copy Database Wizard

    Hi All,

    I have posted this thread this morning but I can't seem to find it. So I will post it again. I am using the Copy Database Wizard to copy SQL 2000 db to SQL 2005. At the Execute SQL Agent Job step I get the following error:

    The directory 'LocalApplicationData' does not exist.

    Any ideas?

    Thanks.

  2. #2
    Join Date
    May 2004
    Location
    Seattle
    Posts
    1,313
    don't use CDW.

    backup/restore is a more reliable method to move databases around.

  3. #3
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    12,592
    Provided Answers: 1
    Quote Originally Posted by inka
    The directory 'LocalApplicationData' does not exist.
    Somewhere in the Wizard there should be a dialog box that allows you to specify the destination file directories.

    But I agree with jez. The SQLSVR 2000 Copy Database Wizard was great, but in SQLSVR 2005 it is horrible, and I avoid it at all costs.
    If it's not practically useful, then it's practically useless.

    blindman
    www.chess.com: "sqlblindman"
    www.LobsterShot.blogspot.com

  4. #4
    Join Date
    Nov 2004
    Location
    on the wrong server
    Posts
    8,835
    Provided Answers: 6
    Quote Originally Posted by blindman
    But I agree with jez. The SQLSVR 2000 Copy Database Wizard was great, but in SQLSVR 2005 it is horrible, and I avoid it at all costs.
    I thought it was bad 2000 that I have not touched it in years, now you tell me there has been a downgrade.
    “If one brings so much courage to this world the world has to kill them or break them, so of course it kills them. The world breaks every one and afterward many are strong at the broken places. But those that will not break it kills. It kills the very good and the very gentle and the very brave impartially. If you are none of these you can be sure it will kill you too but there will be no special hurry.” Earnest Hemingway, A Farewell To Arms.

  5. #5
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    12,592
    Provided Answers: 1
    I don't recall having any problems with it in 2000. It was fast, easy, and reliable. In 2005 it has less functionality, requires more effort to wade through the Wizard, and usually fails without any useful error message on the first three or four tries.
    My God, Management Studio's error messages are useless...

    Error Message:
    "The process failed unexpectedly. See the process history for more details."

    Process History:
    "The process failed unexpectedly. See the log for more details."

    Log:
    "The process failed unexpectedly."

    Thanks, Microsquash!
    If it's not practically useful, then it's practically useless.

    blindman
    www.chess.com: "sqlblindman"
    www.LobsterShot.blogspot.com

  6. #6
    Join Date
    Jul 2004
    Posts
    268
    If I use backup/to restore to move the dbs, then I'll have to recreate all the logins/passwords and all the jobs. Correct?

  7. #7
    Join Date
    Nov 2004
    Location
    on the wrong server
    Posts
    8,835
    Provided Answers: 6
    to simplify this i assign all of my database permissions to roles (which do transfer) and then I just put my recreated users in those roles.
    “If one brings so much courage to this world the world has to kill them or break them, so of course it kills them. The world breaks every one and afterward many are strong at the broken places. But those that will not break it kills. It kills the very good and the very gentle and the very brave impartially. If you are none of these you can be sure it will kill you too but there will be no special hurry.” Earnest Hemingway, A Farewell To Arms.

  8. #8
    Join Date
    Jul 2004
    Posts
    268
    Good idea, I'll try that.

  9. #9
    Join Date
    May 2004
    Location
    Seattle
    Posts
    1,313
    Quote Originally Posted by blindman
    Error Message:
    "The process failed unexpectedly. See the process history for more details."

    Process History:
    "The process failed unexpectedly. See the log for more details."

    Log:
    "The process failed unexpectedly."
    are you sure it's not this:

    Log:
    "The process failed unexpectedly. See Process History for more details."


  10. #10
    Join Date
    Jun 2004
    Location
    Long Island
    Posts
    696
    Quote Originally Posted by inka
    If I use backup/to restore to move the dbs, then I'll have to recreate all the logins/passwords and all the jobs. Correct?
    jobs are in msdb, sp_change_users_login to fix ids (if they exist in target system)

    There are a couple of good sprocs out there to extract IDs (I found this a while ago):
    sp_help_revlogin, run this to extract logins with current passwords.

    CREATE PROCEDURE sp_help_revlogin @login_name sysname = NULL AS
    DECLARE @name sysname
    DECLARE @xstatus int
    DECLARE @binpwd varbinary (256)
    DECLARE @txtpwd sysname
    DECLARE @tmpstr varchar (256)
    DECLARE @SID_varbinary varbinary(85)
    DECLARE @SID_string varchar(256)

    IF (@login_name IS NULL)
    DECLARE login_curs CURSOR FOR
    SELECT sid, name, xstatus, password FROM master..sysxlogins
    WHERE srvid IS NULL AND name not in ('sa', 'BUILTIN\Administrators')
    ELSE
    DECLARE login_curs CURSOR FOR
    SELECT sid, name, xstatus, password FROM master..sysxlogins
    WHERE srvid IS NULL AND name = @login_name
    OPEN login_curs
    FETCH NEXT FROM login_curs INTO @SID_varbinary, @name, @xstatus, @binpwd
    IF (@@fetch_status = -1)
    BEGIN
    PRINT 'No login(s) found.'
    CLOSE login_curs
    DEALLOCATE login_curs
    RETURN -1
    END
    SET @tmpstr = '/* sp_help_revlogin script '
    PRINT @tmpstr
    SET @tmpstr = '** Generated '
    + CONVERT (varchar, GETDATE()) + ' on ' + @@SERVERNAME + ' */'
    PRINT @tmpstr
    PRINT ''
    PRINT 'DECLARE @pwd sysname'
    WHILE (@@fetch_status <> -1)
    BEGIN
    IF (@@fetch_status <> -2)
    BEGIN
    PRINT ''
    SET @tmpstr = '-- Login: ' + @name
    PRINT @tmpstr
    IF (@xstatus & 4) = 4
    BEGIN -- NT authenticated account/group
    IF (@xstatus & 1) = 1
    BEGIN -- NT login is denied access
    SET @tmpstr = 'EXEC master..sp_denylogin ''' + @name + ''''
    PRINT @tmpstr
    END
    ELSE BEGIN -- NT login has access
    SET @tmpstr = 'EXEC master..sp_grantlogin ''' + @name + ''''
    PRINT @tmpstr
    END
    END
    ELSE BEGIN -- SQL Server authentication
    IF (@binpwd IS NOT NULL)
    BEGIN -- Non-null password
    EXEC sp_hexadecimal @binpwd, @txtpwd OUT
    IF (@xstatus & 2048) = 2048
    SET @tmpstr = 'SET @pwd = CONVERT (varchar(256), ' + @txtpwd + ')'
    ELSE
    SET @tmpstr = 'SET @pwd = CONVERT (varbinary(256), ' + @txtpwd + ')'
    PRINT @tmpstr
    EXEC sp_hexadecimal @SID_varbinary,@SID_string OUT
    SET @tmpstr = 'EXEC master..sp_addlogin ''' + @name
    + ''', @pwd, @sid = ' + @SID_string + ', @encryptopt = '
    END
    ELSE BEGIN
    -- Null password
    EXEC sp_hexadecimal @SID_varbinary,@SID_string OUT
    SET @tmpstr = 'EXEC master..sp_addlogin ''' + @name
    + ''', NULL, @sid = ' + @SID_string + ', @encryptopt = '
    END
    IF (@xstatus & 2048) = 2048
    -- login upgraded from 6.5
    SET @tmpstr = @tmpstr + '''skip_encryption_old'''
    ELSE
    SET @tmpstr = @tmpstr + '''skip_encryption'''
    PRINT @tmpstr
    END
    END
    FETCH NEXT FROM login_curs INTO @SID_varbinary, @name, @xstatus, @binpwd
    END
    CLOSE login_curs
    DEALLOCATE login_curs
    RETURN 0

    GO

  11. #11
    Join Date
    Jul 2010
    Posts
    6

    Question

    Quote Originally Posted by jezemine View Post
    don't use CDW.

    backup/restore is a more reliable method to move databases around.
    Hi Jezemine,

    Basically I need to automatically copy DB1 from Server1 to Server2. If I do backup/restore, could you please tell me how to do it automatically?

    Thanks a lot!
    Jing

Posting Permissions

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