Importing an SQL Server 2000 backup from the customer

To load an SQL 2000 Server Backup into an SQL server, proceed as follows:

  1. Open the Enterprise Manager and create a new database (DB). “MyDB”.
  2. Click on the new DB with the right mouse button.
  3. From the context menu, select: - All Tasks → Restore Database.
  4. After the backup has been rolled back, open the SQL Server ManagementStudio and open a new query window.
  5. Copy the SQL code below into the SQL Server ManagementStudio Query window and run the code.
 /* **************************************************************************************** * PROCEDURE....... Change Schema * DESCRIPTION..... Change schema for all objects from 'ebissuser' to 'dbo' ******************************************************************************************* */

/* Set the following variables as appropriate */

DECLARE @comand varchar(1024)

/* Declare variables and cursor */

declare @objectName varchar(30), @userName varchar(30), @fqon varchar(50)

declare c_objlist cursor static for

select name from sys.tables where schema_id = 6

/* Open cursor and retrieve first record */

OPEN c_objlist

FETCH NEXT FROM c_objlist INTO @objectName

/* Loop through each cursor record */

WHILE @@FETCH_STATUS = 0

BEGIN

/* Display and change the object ownership */

SET @comand = 'ALTER SCHEMA dbo TRANSFER ebissuser.' + @objectName

print @comand

exec (@comand)

/* Retrieve next record */

FETCH NEXT FROM c_objlist INTO @objectName

END

/* Close and deallocate cursor */

CLOSE c_objlist

DEALLOCATE c_objlist