/*
 * $Id: migrate.sql 84480 2007-07-24 06:34:27Z pca $
 *
 * Migrate netDeploy Global 5.5 and ManageSoft 6.0 database schemas
 * to ManageSoft 6.1
 *
 * Copyright 1995-2002 ManageSoft Corporation Ltd ABN 40 052 412 156. All rights reserved.
 */

USE Master
GO

/*
 * Michael: Mon Apr 08 10:13 AUS Eastern Standard Time 2002
 * Need to manually fix up 5.5 (ndReports) database name
 */
IF EXISTS(
	SELECT * FROM dbo.sysdatabases
	WHERE [name] = 'ndReports'
)
BEGIN
	PRINT 'Setting db to single-user'

	-- Set the database into single-user mode
	ALTER DATABASE ndReports SET SINGLE_USER WITH ROLLBACK AFTER 60 SECONDS ;

	-- Rename it and use it
	EXEC sp_renamedb 'ndReports', 'ManageSoft'
END
GO



