The way SQL 2005 produces Maintenance plans is very different from SQL 2000. Instead of using the extended stored procedure xp_sqlmaint to execute and the system tables of the MSDB database to store the package – SQL 2005 uses SSIS (SQL Server Integration Services) to create and store the Maintenance plans. To Export an existing maintenance plan from an SQL Server 2005 To Import or copy an existing maintenance plan from one server to another
Friday, November 16, 2007
Import and Export SQL 2005 Maintenance plans
Indsendt af
Rasmus Glibstrup
kl.
21:20
2
kommentarer
Etiketter: database maintenance, Integration Services, SSIS
Friday, November 9, 2007
Moving system databases
When installing SQL Server 2000/2005/2008 many often forget where the system databases go on the filesystem. They are by default placed into C:\Program Files\Microsoft SQL Server \.... – Which we properly all can agree is not the optimal placement. Note that to move the system databases require SQL server downtime, it doesn't take long though (depending on the size of course) DISCLAIMER: Please test this recipe on a test server before trying it in production – failing at any step will invalidate or totally stop you SQL server installation. To move the system databases do as follows: Adapt the new file location to match YOUR filesystem ALTER DATABASE MODEL MODIFY FILE (NAME = modellog , FILENAME = 'G:\SQLLogFiles\modellog.ldf') ALTER DATABASE TEMPDB MODIFY FILE (NAME = templog , FILENAME = 'G:\SQLLogFiles\templog.ldf') ALTER DATABASE MSDB MODIFY FILE (NAME = MSDBlog , FILENAME = 'G:\SQLLogFiles\MSDBlog.ldf') ALTER DATABASE master MODIFY FILE (NAME = master , FILENAME = 'H:\SQLDataFiles\master.mdf') As Per SQL Server 2008 the MSSQLSYSTEMRESOURCE database cannot be moved ! But in SQL Server 2005 the database location must be the same as the Master database. The MSSQLSYSTEMRESOURCE database file and log file must remain on the same drive ! Please test this recipe on a test server before trying it in production – failing at any step will invalidate or totally stop you SQL server installation.
DO NOT MOVE THE FILES PHYSICALLY YET
GO
ALTER DATABASE MODEL MODIFY FILE (NAME = modeldev , FILENAME = 'H:\SQLDataFiles\model.mdf')
GO
GO
ALTER DATABASE TEMPDB MODIFY FILE (NAME = tempdev , FILENAME = 'H:\SQLDataFiles\tempdb.mdf')
GO
GO
ALTER DATABASE MSDB MODIFY FILE (NAME = MSDBData, FILENAME = 'H:\SQLDataFiles\MSDBData.mdf')
GO
GO
ALTER DATABASE master MODIFY FILE (NAME = mastlog, FILENAME = 'G:\SQLLogFiles\Mastlog.ldf')
GO
For SQL 2005 use:
ALTER DATABASE mssqlsystemresource MODIFY FILE (NAME=data, FILENAME= 'H:\SQLDataFiles\mssqlsystemresource.mdf')
GO
ALTER DATABASE mssqlsystemresource MODIFY FILE (NAME=log, FILENAME= 'H:\SQLDataFiles\mssqlsystemresource.ldf')
GO
-dH:\SQLDataFiles\master.mdf
-eH:\SQLDataFiles\log\ErrorLog
-lG:\SQLLogFiles\mastlog.ldf
Indsendt af
Rasmus Glibstrup
kl.
10:35
0
kommentarer
Etiketter: Installation