Showing posts with label plan. Show all posts
Showing posts with label plan. Show all posts

Monday, March 26, 2012

Migrating A SQL 7 DB to SQL 2005

We are planning on upgrading a SQL 7 Server to 2005 SP1. I ran the Update Advisor and one of the issues listed was that the Database Maintenance Plan would not work in Server 2005. The Advisor mentions a tool to use but not which one, which is my first question.

I went online and found some documentation regarding copying the database etc., however, when attempting to copy from the SQL 2000 (DB in SQL 7) to 2005 (I have SQL 2000 and 2005 on my machine) when I try and connect to the 2005 box, its listed as one of the instances but will not connect.

For grins and kicks I backed the database up in the 2000 environment and restored it on a test machine which is in 2005. The Advisor was correct, I am unable to create a Database Maintenance Plan, which I find odd. The Database shows up under the databases but will not show up in the list of db's to create a plan for. So, I attempted to create the jobs and alerts manually.

There has to be an easier way to do this, can anyone help?

Carolyn,
Try the Setup and Upgrade forum instead. You'll have better luck there.

http://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=95&SiteID=1|||Thread moved from SSIS forum...|||I figured out how to get around this issue. I copied the databases using the wizard in 2000 between sql 7 and 2000, than I migrated the sql 7 db's into 2000. Once the db's are in 2000, open the server management suite in 2005 create a move package and move the dbs into 2005. If the package is created in 2005, you can create a db maintenance plan. I had test servers set up in both the 2000 and 2005 environment so switching wasn't a hassle.

Migrating a Legacy Maintenance Plan?

Has anyone been able to migrate a Legacy Maintenance Plan to the Integration Services style?

I'm using the SQL 2005 RTM, right-clicking the Legacy Maintenance Plan, and selecting "Migrate..."

After a few seconds, it presents the error "Input string was not in the correct format. (mscorlib)"

The only thing that sticks out in SQL Profiler is this statement:
SELECT s.log_shipping AS [LogShipping]
FROM msdb.dbo.sysdbmaintplans AS s
WHERE (s.plan_name=N'MaintenancePlan1')

and this error message:
Invalid column name 'log_shipping'.

but these happened near the beginning of the trace/action.

To the best of my knowledge, there isn't anything special with these Maintenance Plans. The plans have four standard jobs (Optimizations, Integrity Checks, DB Backup, Txn Log Backup). The jobs all have one jobstep, which start with "EXEC master.dbo.xp_sqlmaint ..."What is the sku of sql server 2000 that you are migrating from? What is the sku of the sql server 2005 you are migrating to? Log shipping is present only in the enterprise version and dev sku of sql server 2005.

A workaround could be to write a t-sql script to add a column called LogShipping to the table msdb.dbo.sysdbmaintplans and fill it up with 0.

After doing that, you can try to migrate. I think it should work.

Do let us know if that helps

Hope that helps
-nimesh|||A small correction in the suggested work around. The colum name should be log_shipping.

-nimesh|||I'm upgrading a SQL 2000 Enterprise to SQL 2005 (MSDN) Enterprise as a proof-of-concept.

Thanks for the suggestion. I tried this.

I'm still getting the error message "Input string was not in a correct format (mscorlib)" when I migrate a Legacy Maintenance Plan.

I don't understand as the SQL Profiler scripts are clean. Since this appears to be a .NET issue, I don't know how I can trace it.|||

I figured it out!

The Optimizations job had a trailing line-break character in the job step. Once removed, the plan migrated fine!

The migration scripts do not like line-breaks or comments of any kind.

Now that it migrated, I still have more questions...

1. Why didn't the legacy maintenace plans disable? Now I have a SQLMaint and SSIS version of the same job active and running at the same times. The migration could have asked me if I'd like to disable or delete the older jobs.

2. Legacy maintenance plans cannot be deleted from the SSMS GUI. (Refresh after you try.) One must use a combination of sp_delete_maintenance_plan and deleting the associated jobs.

|||(I also removed the log_shipping column from earlier and still had success migrating the plan)

Migrating a Legacy Maintenance Plan?

Has anyone been able to migrate a Legacy Maintenance Plan to the Integration Services style?

I'm using the SQL 2005 RTM, right-clicking the Legacy Maintenance Plan, and selecting "Migrate..."

After a few seconds, it presents the error "Input string was not in the correct format. (mscorlib)"

The only thing that sticks out in SQL Profiler is this statement:
SELECT s.log_shipping AS [LogShipping]
FROM msdb.dbo.sysdbmaintplans AS s
WHERE (s.plan_name=N'MaintenancePlan1')

and this error message:
Invalid column name 'log_shipping'.

but these happened near the beginning of the trace/action.

To the best of my knowledge, there isn't anything special with these Maintenance Plans. The plans have four standard jobs (Optimizations, Integrity Checks, DB Backup, Txn Log Backup). The jobs all have one jobstep, which start with "EXEC master.dbo.xp_sqlmaint ..."What is the sku of sql server 2000 that you are migrating from? What is the sku of the sql server 2005 you are migrating to? Log shipping is present only in the enterprise version and dev sku of sql server 2005.

A workaround could be to write a t-sql script to add a column called LogShipping to the table msdb.dbo.sysdbmaintplans and fill it up with 0.

After doing that, you can try to migrate. I think it should work.

Do let us know if that helps

Hope that helps
-nimesh|||A small correction in the suggested work around. The colum name should be log_shipping.

-nimesh|||I'm upgrading a SQL 2000 Enterprise to SQL 2005 (MSDN) Enterprise as a proof-of-concept.

Thanks for the suggestion. I tried this.

I'm still getting the error message "Input string was not in a correct format (mscorlib)" when I migrate a Legacy Maintenance Plan.

I don't understand as the SQL Profiler scripts are clean. Since this appears to be a .NET issue, I don't know how I can trace it.|||

I figured it out!

The Optimizations job had a trailing line-break character in the job step. Once removed, the plan migrated fine!

The migration scripts do not like line-breaks or comments of any kind.

Now that it migrated, I still have more questions...

1. Why didn't the legacy maintenace plans disable? Now I have a SQLMaint and SSIS version of the same job active and running at the same times. The migration could have asked me if I'd like to disable or delete the older jobs.

2. Legacy maintenance plans cannot be deleted from the SSMS GUI. (Refresh after you try.) One must use a combination of sp_delete_maintenance_plan and deleting the associated jobs.

|||(I also removed the log_shipping column from earlier and still had success migrating the plan)

Monday, March 19, 2012

migrate database maintenance plan

Hi Friends!
Anyone know how can i migrate a lot of Database maintenance plans from one
SQL Server to another? All servers are 7.0 + SP4
Thanks all!!!Check the following articles:
Migrating a Maintenance Plan from One SQL Server to Another
http://www.databasejournal.com/feat...cle.php/3066351
Scripting Database Maintenance Plans
http://www.dbazine.com/sql/sql-articles/cook10
-Sue
On Tue, 24 May 2005 13:53:03 -0700, "Tinchos"
<Tinchos@.discussions.microsoft.com> wrote:

>Hi Friends!
>Anyone know how can i migrate a lot of Database maintenance plans from one
>SQL Server to another? All servers are 7.0 + SP4
>Thanks all!!!
>

migrate database maintenance plan

Hi Friends!
Anyone know how can i migrate a lot of Database maintenance plans from one
SQL Server to another? All servers are 7.0 + SP4
Thanks all!!!Check the following articles:
Migrating a Maintenance Plan from One SQL Server to Another
http://www.databasejournal.com/features/mssql/article.php/3066351
Scripting Database Maintenance Plans
http://www.dbazine.com/sql/sql-articles/cook10
-Sue
On Tue, 24 May 2005 13:53:03 -0700, "Tinchos"
<Tinchos@.discussions.microsoft.com> wrote:
>Hi Friends!
>Anyone know how can i migrate a lot of Database maintenance plans from one
>SQL Server to another? All servers are 7.0 + SP4
>Thanks all!!!
>

migrate database maintenance plan

Hi Friends!
Anyone know how can i migrate a lot of Database maintenance plans from one
SQL Server to another? All servers are 7.0 + SP4
Thanks all!!!
Check the following articles:
Migrating a Maintenance Plan from One SQL Server to Another
http://www.databasejournal.com/featu...le.php/3066351
Scripting Database Maintenance Plans
http://www.dbazine.com/sql/sql-articles/cook10
-Sue
On Tue, 24 May 2005 13:53:03 -0700, "Tinchos"
<Tinchos@.discussions.microsoft.com> wrote:

>Hi Friends!
>Anyone know how can i migrate a lot of Database maintenance plans from one
>SQL Server to another? All servers are 7.0 + SP4
>Thanks all!!!
>

Monday, February 20, 2012

Microsoft SQL Server maintenance plan

On a server running Windows NT 4.0 and Microsoft SQL Server 7 I have set up a database maintenance plan through Enterprise Manager to perform backups, database consistency checks and update statistics. The job fails to start and Event ID:208 is generated within the application log component of the event viewer log. I have set the SqlServerAgent service to start as user sqlservice, a user with administrator rights and as the system account and have logged in as these accounts to run the maintenance plan jobs with the same result.

I have performed this task before on a number of servers without encountering this problem.

ThanksDoes this also occur if you:
specify the sa account or equivalent (if running mixed authentication), use local administrator equivalent accounts,
use domain administrator equivalent accounts?

Also, did you also stop and start the services following each account change?|||Originally posted by DBA
Does this also occur if you:
specify the sa account or equivalent (if running mixed authentication), use local administrator equivalent accounts,
use domain administrator equivalent accounts?

Also, did you also stop and start the services following each account change?

Have used the sa account, domain administrator equivalent account and local administrator equivalent account with same result.

Services were cycled after each change.|||This is not helpful but at this point it could possibly be an issue of maint dlls becomming corrupt / unregistered, etc., some kind of security issue, a service pack or hot fix issue (up to date?), or something else entirely. Some things to think about may include:
Do any maint jobs run? Have any ever run sucesfully? Do non-maint jobs run fine? What is common about those that do / do not? Is the server stand alone, domain member DC, etc. (what kind of domain, any domain issues going on, etc.)? You may wish to try some interactive testing, have you tried:
copying the information from each maint. job into QA and running it interactively from QA with different accounts (note successes, failures, error messages, run a profile / trace while doing so for any that do not immediatly fail.)|||Originally posted by DBA
This is not helpful but at this point it could possibly be an issue of maint dlls becomming corrupt / unregistered, etc., some kind of security issue, a service pack or hot fix issue (up to date?), or something else entirely. Some things to think about may include:
Do any maint jobs run? Have any ever run sucesfully? Do non-maint jobs run fine? What is common about those that do / do not? Is the server stand alone, domain member DC, etc. (what kind of domain, any domain issues going on, etc.)? You may wish to try some interactive testing, have you tried:
copying the information from each maint. job into QA and running it interactively from QA with different accounts (note successes, failures, error messages, run a profile / trace while doing so for any that do not immediatly fail.)

This problem has now been resolved, further research led me to discover that the sqlmaint executable on this server was missing. I do not know the reason for this however as soon as I placed a copy in the Microsoft SQL Server binn directory, I was able to successfully execute the maintenance plan jobs.

Thank you for your prompt assistance.|||RE:
This problem has now been resolved, further research led me to discover that the sqlmaint executable on this server was missing. I do not know the reason for this however as soon as I placed a copy in the Microsoft SQL Server binn directory, I was able to successfully execute the maintenance plan jobs.

Thank you for your prompt assistance.

You are welcome.

It is kind of interesting that: "the sqlmaint executable on this server was missing"; I remember some similar complaints about issues with sql maint plans failing to execute that were apparently addressed by overwriting the sqlmaint files (exe, rll, etc). That was what led me to mention that it might possibly be an issue of corrupted maint exe, rlls, etc. (makes one wonder if something, or some rarely performed process corrupts and / or deletes them).