Just a quick work post.
If you get an error [Microsoft SQL-DMO (ODBC SQLState: 42S02)] Error 208: [Microsoft][ODBC SQL Server Driver][SQL Server]Invalid object name 'msdb.dbo.log_shipping_databases'.
Then you must have upgraded the SQL 7 server to SQL 2000 and are trying to run the maint utilities.
You are missing the databases.
Here is the script to insert the necessary tables.
USE msdbCREATE TABLE [log_shipping_databases] (
[database_name] [sysname] NOT NULL ,
[maintenance_plan_id] [uniqueidentifier] NULL
) ON [PRIMARY]
GO
CREATE TABLE [log_shipping_monitor] (
[monitor_server_name] [sysname] NOT NULL ,
[logon_type] [int] NOT NULL ,
[logon_data] [varbinary] (256) NULL
) ON [PRIMARY]
GO
CREATE TABLE [log_shipping_plan_databases] (
[plan_id] [uniqueidentifier] NOT NULL ,
[source_database] [sysname] NOT NULL ,
[destination_database] [sysname] NOT NULL ,
[load_delay] [int] NOT NULL ,
[load_all] [bit] NOT NULL ,
[last_file_copied] [nvarchar] (500) COLLATE SQL_Latin1_General_CP1_CS_AS NULL ,
[date_last_copied] [datetime] NULL ,
[last_file_loaded] [nvarchar] (500) COLLATE SQL_Latin1_General_CP1_CS_AS NULL ,
[date_last_loaded] [datetime] NULL ,
[copy_enabled] [bit] NOT NULL ,
[load_enabled] [bit] NOT NULL ,
[recover_db] [bit] NOT NULL ,
[terminate_users] [bit] NOT NULL
) ON [PRIMARY]
GO
CREATE TABLE [log_shipping_plan_history] (
[sequence_id] [int] IDENTITY (1, 1) NOT NULL ,
[plan_id] [uniqueidentifier] NOT NULL ,
[source_database] [sysname] NOT NULL ,
[destination_database] [sysname] NOT NULL ,
[activity] [bit] NOT NULL CONSTRAINT [DFlog_shippactiv__636EBA21] DEFAULT (0),
[succeeded] [bit] NOT NULL ,
[num_files] [int] NOT NULL CONSTRAINT [DFlog_shippnum_f__6462DE5A] DEFAULT (0),
[last_file] [nvarchar] (256) COLLATE SQL_Latin1_General_CP1_CS_AS NULL ,
[end_time] [datetime] NOT NULL CONSTRAINT [DFlog_shippend_t__65570293] DEFAULT (getdate()),
[duration] [int] NULL CONSTRAINT [DFlog_shippdurat__664B26CC] DEFAULT (0),
[error_number] [int] NOT NULL CONSTRAINT [DFlog_shipperror__673F4B05] DEFAULT (0),
[message] [nvarchar] (500) COLLATE SQL_Latin1_General_CP1_CS_AS NULL ,
UNIQUE NONCLUSTERED
(
[sequence_id]
) ON [PRIMARY]
) ON [PRIMARY]
GO
CREATE TABLE [log_shipping_plans] (
[plan_id] [uniqueidentifier] NOT NULL ,
[plan_name] [sysname] NOT NULL ,
[description] [nvarchar] (500) COLLATE SQL_Latin1_General_CP1_CS_AS NULL ,
[source_server] [sysname] NOT NULL ,
[source_dir] [nvarchar] (500) COLLATE SQL_Latin1_General_CP1_CS_AS NOT NULL ,
[destination_dir] [nvarchar] (500) COLLATE SQL_Latin1_General_CP1_CS_AS NOT NULL ,
[copy_job_id] [uniqueidentifier] NOT NULL ,
[load_job_id] [uniqueidentifier] NOT NULL ,
[history_retention_period] [int] NOT NULL ,
[file_retention_period] [int] NOT NULL ,
[maintenance_plan_id] [uniqueidentifier] NULL ,
[backup_job_id] [uniqueidentifier] NULL ,
[share_name] [nvarchar] (500) COLLATE SQL_Latin1_General_CP1_CS_AS NULL ,
PRIMARY KEY CLUSTERED
(
[plan_id]
) ON [PRIMARY]
) ON [PRIMARY]
GO
CREATE TABLE [log_shipping_primaries] (
[primary_id] [int] IDENTITY (1, 1) NOT NULL ,
[primary_server_name] [sysname] NOT NULL ,
[primary_database_name] [sysname] NOT NULL ,
[maintenance_plan_id] [uniqueidentifier] NULL ,
[backup_threshold] [int] NOT NULL ,
[threshold_alert] [int] NOT NULL ,
[threshold_alert_enabled] [bit] NOT NULL ,
[last_backup_filename] [nvarchar] (500) COLLATE SQL_Latin1_General_CP1_CS_AS NULL ,
[last_updated] [datetime] NULL ,
[planned_outage_start_time] [int] NOT NULL ,
[planned_outage_end_time] [int] NOT NULL ,
[planned_outage_weekday_mask] [int] NOT NULL ,
[source_directory] [nvarchar] (500) COLLATE SQL_Latin1_General_CP1_CS_AS NULL ,
PRIMARY KEY CLUSTERED
(
[primary_id]
) ON [PRIMARY]
) ON [PRIMARY]
GO
CREATE TABLE [log_shipping_secondaries] (
[primary_id] [int] NULL ,
[secondary_server_name] [sysname] NOT NULL ,
[secondary_database_name] [sysname] NOT NULL ,
[last_copied_filename] [nvarchar] (500) COLLATE SQL_Latin1_General_CP1_CS_AS NULL ,
[last_loaded_filename] [nvarchar] (500) COLLATE SQL_Latin1_General_CP1_CS_AS NULL ,
[last_copied_last_updated] [datetime] NULL ,
[last_loaded_last_updated] [datetime] NULL ,
[secondary_plan_id] [uniqueidentifier] NULL ,
[copy_enabled] [bit] NULL ,
[load_enabled] [bit] NULL ,
[out_of_sync_threshold] [int] NULL ,
[threshold_alert] [int] NULL ,
[threshold_alert_enabled] [bit] NULL ,
[planned_outage_start_time] [int] NULL ,
[planned_outage_end_time] [int] NULL ,
[planned_outage_weekday_mask] [int] NULL ,
[allow_role_change] [bit] NULL CONSTRAINT [DFlog_shippallow__49AEE81E] DEFAULT (0),
FOREIGN KEY
(
[primary_id]
) REFERENCES [log_shipping_primaries] (
[primary_id]
)
) ON [PRIMARY]
GO
CREATE TABLE [logmarkhistory] (
[database_name] [nvarchar] (128) COLLATE SQL_Latin1_General_CP1_CS_AS NOT NULL ,
[mark_name] [nvarchar] (128) COLLATE SQL_Latin1_General_CP1_CS_AS NOT NULL ,
[description] [nvarchar] (255) COLLATE SQL_Latin1_General_CP1_CS_AS NULL ,
[user_name] [nvarchar] (128) COLLATE SQL_Latin1_General_CP1_CS_AS NOT NULL ,
[lsn] [numeric](25, 0) NOT NULL ,
[mark_time] [datetime] NOT NULL
) ON [PRIMARY]
GO
You may get some errors about objects already existing, but just ignore these errors. The script does not check existence before creating. Not hard to do, just under some time issues right now.
Cheers
Dying daily to live forever.
Welcome, my attempt to post some personal thoughts on interesting topics.
| Mon | Tue | Wed | Thu | Fri | Sat | Sun |
|---|---|---|---|---|---|---|
| << < | > >> | |||||
| 1 | 2 | 3 | 4 | |||
| 5 | 6 | 7 | 8 | 9 | 10 | 11 |
| 12 | 13 | 14 | 15 | 16 | 17 | 18 |
| 19 | 20 | 21 | 22 | 23 | 24 | 25 |
| 26 | 27 | 28 | 29 | 30 | 31 | |
14553 visits to this site