Can Not Create New Replication After Changing Server Name

Dec 5, 2005

After i changed my computer's name(eg. the original computer name is 'SERVER-1',I has changed it to 'SERVER-2'),I can not create a new replication in SQL Server 2005.The error message :

View 5 Replies


ADVERTISEMENT

Replication - Changing A Server

Oct 26, 2005

This is very important.

View 1 Replies View Related

SQL Server 2008 :: Changing Alt Snapshot Folder For Merge Replication?

Sep 22, 2015

I have a merge replication. Currently works fine. Publisher & Distributor are on the same server. I need to change the location of the alternate folder for the snapshot files.

I’ll probably just change it through the GUI, but would I use sp_changedistpublisher or sp_changemergepublication if I were scripting everything?

My real concern is the subscribers. Do I have to ‘tell’ the subscribers where the alt folder has been changed to? Do I just run sp_changemergepullsubscription on the subscribers?

View 1 Replies View Related

Adding New Table In Replication And Changing One Column Replication Database

Jan 17, 2002

Hi,

In my production box is running on SQL7.0 with Merge replication and i want add one more table and i want add one more column existing replication table. Any body guide me how to add .This is very urgent
Regards
Don

View 1 Replies View Related

Replication Issues After A Database Restore - Unable To Drop Or Create Transactional Replication

Sep 13, 2007

Hi,I have transactional replication set up on on of our MS SQL 2000 (SP4)Std Edition database serverBecause of an unfortunate scenario, I had to restore one of thepublication databases. I scripted the replication module and droppedthe publication first. Then did a full restore.When I try to set up the replication thru the script, it created thepublication with the following error messageServer: Msg 2714, Level 16, State 5, Procedure SYNC_FCR ToGPRPTS_GL00100, Line 1There is already an object named 'SYNC_FCR To GPRPTS_GL00100' in thedatabase.It seems the previous replication has set up these system viewsSYNC_FCR To GPRPTS_GL00100. And I have tried dropping the replicationmodule again to see if it drops the views but it didn't.The replication fails with some wired error & complains about thisviews when I try to run the synch..I even tried running the sp_removedbreplication to drop thereplication module, but the views do not seem to disappear.My question is how do I remove these system views or how do I make thereplication work without using these views or create new views.. Whyis this creating those system views in the first place?I would appreciate if anyone can help me fix this issue. Please feelfree to let me know if any additional information or scripts needed.Thanks in advance..Regards,Aravin Rajendra.

View 2 Replies View Related

Changing Replication Topology

Apr 2, 2015

I have a replicated database on 2008 R2 being moved to a new instance with 2014. Application regression testing is complete and all tests are good.

The current transactional replication topology is Publishing subscriber: the distributor is local and pushes to a subscription on an intermediary server. This server then has an identical publication and local distributor which then pushes to a subscription on a customer's server. There's no business case for this setup, it's just how it was created at the time.

I want to change this to a Central Distributor model when we do the move to speed things up and remove any extra potential points of failure.

The customer has a requirement that during this process, their subscription database remain online, all tables are fully populated and replication pick up exactly where it was left off. This is a completely new scenario for me and I was hoping to just be able to rebuild the subscription from scratch.

Is there a way to do this move and topology change and meet the customer's requirement?

View 2 Replies View Related

Changing Datatype In A Table Used For Replication ?

Feb 28, 2002

Changing datatype in a table used for merge replication ?

I'm trying to change the data type on a column in a table that is used for a merge-replication with another (identical) DB.

I get this error:
Cannot alter the table '[Tablename]' because it is being published for replication.

I've tried to remove that specific table from the publication (Publication properties -> Articles tab) so I can change the data type and then put the table back into the publication, but I can't (probably because it's a MERGE rep.)

Any ideas ?

/CN

View 1 Replies View Related

Changing 'sa' Password Breaks Replication

Apr 17, 2008

We are currently using continuous transactional replication from an OLTP type database to a Reporting database. We recently changed the 'sa' password for the first time since replication was introduced and now the Replication Log Reader job fails to start.

This is the error from the Job Log:

Message
2008-04-14 15:18:24.894 Copyright (c) 2005 Microsoft Corporation
2008-04-14 15:18:24.894 Microsoft SQL Server Replication Agent: logread
2008-04-14 15:18:24.894
2008-04-14 15:18:24.894 The timestamps prepended to the output lines are expressed in terms of UTC time.
2008-04-14 15:18:24.894 User-specified agent parameter values:
-Publisher OASV-SQL1
-PublisherDB georgiaoas
-Distributor OASV-SQL1
-DistributorSecurityMode 1
-Continuous
-XJOBID 0xCE146F975BC43043AB1ECBF42F801C43
-XJOBNAME OASV-SQL1-georgiaoas-1
-XSTEPID 2
-XSUBSYSTEM LogReader
-XSERVER OASV-SQL1
-XCMDLINE 0
-XCancelEventHandle 00000730
-XParentProcessHandle 0000075C
2008-04-14 15:18:25.034 Status: 0, code: 20015, text: 'Login failed for user 'sa'.'.
2008-04-14 15:18:25.034 Login failed for user 'sa'.


When we change the 'sa' password back to the previous value, we can start the Log Reader without issue.

We have tried restarting the SQL Server Agent process without success. We have not restarted the SQL Server process due to the server hosting production databases.

Any ideas?

View 1 Replies View Related

Replication :: Changing Password For Remote Distributor

Jul 22, 2015

We have inherited a remote distribution db where the password has been lost.  I would like to confirm that if you change the password in the distributor properties-->publishers--> administrative link password that the password will be changed on all publishers without having to resnap the publications?

View 3 Replies View Related

Merge Replication - Changing Values From Filtered Column

Nov 6, 2006

Hi

I'm working with merge replication between Sql Server 2005 and Sql Server 2005 Mobile. I'm using dynamic filtering by function HOST_NAME (... where Table.FilteredColumn = HOST_NAME())

When I'm trying to chagne values from filtered column on the client side (Table.FileteredColumn) I get error message that the column is read-only.

How can I change data in filtered column? Is this possible?

 

View 3 Replies View Related

How Do I Create A Package That Imports An Excel File Where Column Names Are Changing.

Sep 29, 2006

Hi,

Our company wants to allow our customers the ability to import employee data. Each customer's employee data changes depending on things like organisation structure etc. so the format of the data to be imported needs to change. We can do a lot of this with dynamic SQL, but are looking at moving it to SSIS as we think it will save us a lot of pain later on and for other features in SSIS.

We're stuck at a fairly early part of the process as we don't know how to dynamically import our spreadsheet. So far our best idea is to connect to the excel connection as the only step in the data task and then to use a script task on the control task, write code to connect to the excel source (set the excel source to not treat the first row as headers so we can do a 'select top 1 *...' ) then create a dynamic sql command to create the table.

Once this is done we would then have another data task that actually puts the data into the newly created table. This all sounds very difficult though. What are the options for doing what we want to do... have a feeling that we're missing something basic.

Any help appreciated,
TIA, Anthony.

View 4 Replies View Related

How Can I Create Replication

Jul 15, 2005

hi,

View 6 Replies View Related

Replication :: Cannot Create Snapshot

Jun 3, 2015

We have a database which was replicated with merge replication. we added a few table and a field to another. When I try to create the snapshot I get:

An error was raised during trigger execution. The batch has been aborted and the user transaction, if any, has been rolled back. 

I have detached and re-attached the db, removed all triggers from the tables, and still I cannot recreate the snapshot the last step before the error as listed in the monitor is generating all procedures for all table articles 49%.

View 9 Replies View Related

Replication - Can Not Create Publication Database

Jul 23, 2005

Hi,I am trying to use Enterprise Manager Wizard to create a newPublication database but I got the following message.Error 2812: Could not find stored procedureMyDB.dbo.sp_MSadd_logreader_agentThere seems that some replication stored procedures.Any help?Thanks in Advance

View 1 Replies View Related

Running Create Replication Script

Feb 25, 2006

I am about to replace a SQL Server which is replicated to about 25 computers. The replacement PC (and SQL Server) will have the same name. I intend to generate a Create Replication Script before shutting down the old PC and to run it on the new one.

Should I also create and use a Remove Replication script and run it on the old PC before shutting it down? I am thinking that I might need to do this to remove Replication infromation from the subcribers before running the Create script.

In other words, is it OK (or not OK) to run the Create script with the subcribers already in existence? Is there possibly a way to run the Create script on the sever and skip updating of the subcribers?

Thanks,

Dick Campbell

View 4 Replies View Related

Replication :: Not Create New Constraint Range For Subscriber

Jul 14, 2015

I have a merge replication in place.  I increased the identity_range to 100000 for a table.  I have done this both ways, via the properties of the publication on SSMS, and via TSQL.  I have call sp_adjustpublisheridentityrange.  Then I recreated the sanpshot.  EXEC sp_adjustpublisheridentityrange @table_name = N'Label', @table_owner = N'caseup';but after synchronization, the range defined in the table's constraint has not changed and now all of the identity values are used up.  All inserts are failing.What needs to be done to force the publisher to recreate the identity range on a subscriber(s).

View 3 Replies View Related

Unable To Create Replication Publisher W2k3sql2000sp3a

Nov 27, 2006

Hi,

I`m trying to setup our sql2000 sp3a sql server as a Publisher.When i use the wizard to config Publishing and Distribution wizard. I recieve the following error:

Sql Enterprise manager could not configure server as the distributor. Error 14133 Could not execute instdist.sql. Check instdist.out in the install directory.

I`ve checked the install directory and cannot find the file instdist.out file. I assume that it failed before completeing this stage.

Has anyone come across this error before and any ideas on how to resolve would be appreciated.
Thanks in Advance,

Steve



View 1 Replies View Related

How To Create Merge Replication With Latest Update Always From Subscribers

May 13, 2006

Hi ,

I am trying to create Replication Topology (Merge Replication) like below.

Subscriber1 --> Publisher <-- Subscriber2.

I have created both subscribers with Subscription Type as Server with Priority as 75. I am updating the Column A of Row_10 in Subscriber1 on time say 11 am. After i am running the Starting synchronizing agent from Subscriber1. The value propagated to Publisher now publisher contains the latest value in Column A. Uptonow the Subscriber2 is not synchronized with Publisher.

Now in Subscriber2 also Column A of Row_10 is updated say at 11.10 am. Actually now Publisher contains the value from Subscriber1 for that Column and in Subscriber2 we have the same column updated.

Now i am running the Synchronization in Subscriber2, i am getting the result which is not expected. Here Publisher's value is propagated to Subscriber2. But as per real scenario Subscriber2 has the Latest value which is updated on 11.10 AM.

I don't know what am i missing here. Actually merge replication should see the time stamp and it has to decide winner. But here it always considers publisher as a winner and puts the data to Subscriber.

Can anyone help ?

Thanks in advance

View 4 Replies View Related

Application Locks Up When Trying To Write To Db After A Replication Where I Create The Database.

Jan 3, 2008

Hello all,

When I create a new database and replicate to it using BeginMonitoredBackgroundSync :







Code Block

public void BeginMonitoredBackgroundSync(string User)
{
CreateReplicationInstance(User);
repl.BeginSynchronize(
OnSimplifiedSynchronizeComplete,
SqlCeReplication_OnStartTableUpload,
SqlCeReplication_OnStartTableDownload,
SqlCeReplication_OnSynchronization,
repl);
}




private void CreateReplicationInstance(string User)
{
repl = new SqlCeReplication();
string host = repl.HostName;
repl.HostName = User;
string dbFilePath = "";


dbFilePath = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase) +
"\" + repl.HostName + ".sdf";
string myConnectionString = string.Format("Data Source = {0};PWD = {1}", dbFilePath, sqlSettings.Items["SqlPassword"]);

repl.InternetUrl = dynamicsReplicationSettings.ReplicationSettingsItems["InternetUrl"];
repl.PublisherSecurityMode = SecurityType.DBAuthentication;
repl.Publisher = dynamicsReplicationSettings.ReplicationSettingsItems["Publisher"];
repl.PublisherDatabase = dynamicsReplicationSettings.ReplicationSettingsItems["PublisherDatabase"];
repl.PublisherLogin = dynamicsReplicationSettings.ReplicationSettingsItems["PublisherLogin"];
repl.PublisherPassword = dynamicsReplicationSettings.ReplicationSettingsItems["PublisherPassword"];
repl.Publication = dynamicsReplicationSettings.ReplicationSettingsItems["Publication"];

repl.Subscriber = "RemoteSubscription" + repl.HostName;
repl.SubscriberConnectionString = myConnectionString;

repl.ConnectionRetryTimeout = 120;
repl.LoginTimeout = 120;
repl.CompressionLevel = 6;

if (File.Exists(dbFilePath))
{
FileInfo info = new FileInfo(dbFilePath);
if (info.Length <= 20480)
{
File.Delete(dbFilePath);
repl.AddSubscription(System.Data.SqlServerCe.AddOption.CreateDatabase);
}
}
else
{
repl.AddSubscription(System.Data.SqlServerCe.AddOption.CreateDatabase);
}

primeConnection();

}
After the replication finishes, I dispose the replication object like so:





Code Block

void OnAsyncSynchronizeComplete(IAsyncResult asyncResult)
{

try
{
repl.EndSynchronize(asyncResult);
if (repl != null)
{
repl.Dispose();
repl = null;

}
if (ReplicationComplete != null) ReplicationComplete(this, true);
}
catch(Exception ex)
{
if (ReplicationComplete != null) ReplicationComplete(ex, false);
}

}

Then later, if I try to update, insert or delete to the database, the application will hang. I can read from it, but I cannot write. If I close the application down and open it back up without replicating, I will not get any lockups. It also will not hang up after any replications prior to the create replication. I think I am doing something wrong in the initial replication that is holding on to some connection to the DB causing it to lock up. Has anyone seen anything like this before?

View 1 Replies View Related

Replication :: Failing To Create Subscription For One Node But Working For Other Nodes

Oct 12, 2015

Merge replication fails on one node with error. The merge process could not update the list of subscriptions.

(Source: MSSQL_REPL, Error number: MSSQL_ REPL-2147201010)
Cannot insert duplicate key row in object 'dbo.sysmergepublications' with unique index 'nc1sysmergepublications'.

The duplicate key value is . (Source: MSSQLServer, Error number: 2601)The subscription could not be created.

(Source: MSSQLServer, Error number: 14057) works fine on other subscribers.

View 4 Replies View Related

DBCC OPENTRAN Shows REPLICATION On A Server That Is Not Configured For Replication

Aug 22, 2007

Hello,

I have this problem on a Production database.

DBCC OPENTRAN shows "REPLICATION" on a server that is not configured for replication. The transaction log is almost as large as the database (40GB) with a Simple recovery model. I would like to find out how the log can be truncated in such a situation.

Thank you.

View 4 Replies View Related

Changing Server Name

Dec 7, 1999

Hi all,

I need to change the NT Server computer name (and the SQL Server name). I know how to do it in NT, but how would I go about changing the SQL Server name. Can anyone help me with this? Is this an easy process?

Thanks,
LC

View 3 Replies View Related

Changing Server Name

Jan 29, 2004

Hi. Sorry to be asking this. I know there is a KB article with the steps for changing a SQL2K server name, but I can't find it for the life of me.

Anyone have it tagged?

TIA

View 3 Replies View Related

Changing Server Name

Oct 8, 2015

We are going to install new SQL Server 2014 on Windows 2012 R2. There is a copy of this server which is running on SQL Server 2005. This one has old operating system and wont be able upgrade to SQL Server 2014.

After doing some checks on 2014 we would like to change this server-name with the old server-name which is running on 2005.how can we change the server-name?

View 4 Replies View Related

Changing The Name Of The Server Name

Jun 17, 2008

Hi Experts,

Can someone help me in knowing what is the impact if I happens to change the name of the computer / name of the Server name.

Thanks in advance

View 1 Replies View Related

Changing The Server Name

Apr 22, 2007

Hi Guys,



I am using a MS SQL Server 2005 express edition for storing the meta-files of a b2b application.



The SQL 2005 is installed localy. Now I must change my server (machine) name cause a internal application need this action.



What is the best practice to do this?



I've got 2 databases and a lot of tabeles within the installed sql server.



I am happy for all tutorials or instructions to handle this proposal nearyl perfectyl.



Many Regards



View 1 Replies View Related

Changing Collation Of Server

Mar 15, 2001

I need to change the default collation of all dbs on all my servers to SQL_Latin1_General_CP1_CI_AI from SQL_Latin1_General_CP1_CI_AS. We need to do compares and sorts and want to ignore accents -- something that wasn't clear when we built the servers. I know this has to do with "re-building databases" -- maybe even including the master -- but I'm not certain exactly what this means. Thanks!

View 1 Replies View Related

Changing Host Server Name

Oct 24, 2000

At work, we are in the process of moving a server running SQL Server 7 from one domain to another. A part of this domain change will necessitate that the server be renamed. In a couple of tests that we ran we found that changing the domain does not cause problems, but changing the server name does. How does one register the databases with the new server name without reinstalling everything from scratch?

Any assistance would be greatly appreciated as we are under a time crunch here. Please reply to my email as I am unable to check this board often.

Thanks,
Mike Sinnott

View 1 Replies View Related

Changing The Server Name An IP Address

Nov 2, 1999

I have SQL ver 7.0 running on NT ver 4.0 sp5

I had to change the name of the server from server1 to server2
now I am Getting a message

"Your SQL server installation is either corrupt or has been tampered with (Unknown package id). Please rerun setup"

is there any other way besides rerunning setup ?

Thanks in Advance ??

Peter

View 2 Replies View Related

Changing IP Address On Server

Aug 19, 2002

We changed the TCP/IP address on on of our BDC's this weekend (also runs SQL 6.5). Now some of our client workstations are not able to connect to the database using TCP/IP. They can connect with named pipes, but it doesn't "stick" on a reboot. It goes back to connecting with tcp/ip. Some of the client workstations can connect with tcp/ip. Could someone help me with this? I'm confused. I can ping the server by name from the workstations and it resolves the tcp/ip address correctly.

View 2 Replies View Related

Changing Physical SQL Server

Jul 23, 2005

Hello all,We are in the process of upgrading our SQL physical server (with SS2k). Inthe process we will change the OS form NT4 to W2K. What is the best way tocopy all my databases and SQL logins, roles, jobs, alerts, etc. from myactual (old) SQL Server to my new one?Thanks for your time.Yannick

View 2 Replies View Related

Changing Domain For SQL Server

Apr 13, 2006

Hi all,I've done some sniffing around but apart from one post in thisnewsgroup haven't been able to find much on this topic.We have recently moved (well, quite a while ago but that's by-the-by)from an NT domain to an AD domain. One of our SQL Servers is stilljoined to the NT domain and, since this domain is soon to bedecommissioned, I need to join this SQL Server to the AD domain.Is there anything I should be on the lookout for WRT this move?As far as I can see, the only thing this would cause an issue withwould be permissions for "logins" etc. This shouldn't be an issue asthe only logins on this SQL Server are either local or from WindowsAuthenticated from our AD domain.Any advice would be greatly appreciated.Many thanks,Ian

View 1 Replies View Related

Changing Schedules For A Job Outside SQL Server

Aug 31, 2006

Below is the script of a Job called "eFIMS_SendEmail" that I wish torun. The intention is that every day of the week the job will executea SPROC at timed intervals. For example, the SundayRun schedule willrun once every 1 hours from 00:30:00 to 23:59:59However, the clients have stated that they want an interface to this toenable them easily to change the start time and frequency interval foreach day. It's an easy matter for me to paint them a form from withinthe target application to enable the user to enter the start time andinterval for each day. I can then pass these as parameters to a SPROC.How can I use these values to change the schedules for the job? Forexample, if wanted to change SundayRun from once every 1 hours to onceevery 30 mins? I know I could do it the hard way, by using stringmanipulation (e.g. find string 'SundayRun', then look for the nextoccurrence of @active_start_time, @freq_subday_type,@freq_subday_interval etc. and do some replacement) but this seemssomewhat tricky.Many thanksEdward-- Script generated on 8/31/2006 9:27 AM-- By: sa-- Server: BISMARKBEGIN TRANSACTIONDECLARE @JobID BINARY(16)DECLARE @ReturnCode INTSELECT @ReturnCode = 0IF (SELECT COUNT(*) FROM msdb.dbo.syscategories WHERE name =N'[Uncategorized (Local)]') < 1EXECUTE msdb.dbo.sp_add_category @name = N'[Uncategorized (Local)]'-- Delete the job with the same name (if it exists)SELECT @JobID = job_idFROM msdb.dbo.sysjobsWHERE (name = N'eFIMS_SendEmail')IF (@JobID IS NOT NULL)BEGIN-- Check if the job is a multi-server jobIF (EXISTS (SELECT *FROM msdb.dbo.sysjobserversWHERE (job_id = @JobID) AND (server_id <0)))BEGIN-- There is, so abort the scriptRAISERROR (N'Unable to import job ''eFIMS_SendEmail'' since thereis already a multi-server job with this name.', 16, 1)GOTO QuitWithRollbackENDELSE-- Delete the [local] jobEXECUTE msdb.dbo.sp_delete_job @job_name = N'eFIMS_SendEmail'SELECT @JobID = NULLENDBEGIN-- Add the jobEXECUTE @ReturnCode = msdb.dbo.sp_add_job @job_id = @JobID OUTPUT ,@job_name = N'eFIMS_SendEmail', @owner_login_name = N'sa', @description= N'No description available.', @category_name = N'[Uncategorized(Local)]', @enabled = 0, @notify_level_email = 0, @notify_level_page =0, @notify_level_netsend = 0, @notify_level_eventlog = 2,@delete_level= 0IF (@@ERROR <0 OR @ReturnCode <0) GOTO QuitWithRollback-- Add the job stepsEXECUTE @ReturnCode = msdb.dbo.sp_add_jobstep @job_id = @JobID,@step_id = 1, @step_name = N'SendEmail', @command = N'EXECstpSendEmailConfirmation', @database_name = N'194-eFIMS', @server =N'', @database_user_name = N'', @subsystem = N'TSQL',@cmdexec_success_code = 0, @flags = 4, @retry_attempts = 0,@retry_interval = 1, @output_file_name = N'', @on_success_step_id = 0,@on_success_action = 1, @on_fail_step_id = 0, @on_fail_action = 2IF (@@ERROR <0 OR @ReturnCode <0) GOTO QuitWithRollbackEXECUTE @ReturnCode = msdb.dbo.sp_update_job @job_id = @JobID,@start_step_id = 1IF (@@ERROR <0 OR @ReturnCode <0) GOTO QuitWithRollback-- Add the job schedulesEXECUTE @ReturnCode = msdb.dbo.sp_add_jobschedule @job_id = @JobID,@name = N'SundayRun', @enabled = 1, @freq_type = 8, @active_start_date= 20060831, @active_start_time = 3000, @freq_interval = 1,@freq_subday_type = 8, @freq_subday_interval = 1,@freq_relative_interval = 0, @freq_recurrence_factor = 1,@active_end_date = 99991231, @active_end_time = 235959IF (@@ERROR <0 OR @ReturnCode <0) GOTO QuitWithRollbackEXECUTE @ReturnCode = msdb.dbo.sp_add_jobschedule @job_id = @JobID,@name = N'MondayRun', @enabled = 1, @freq_type = 8, @active_start_date= 20060831, @active_start_time = 3000, @freq_interval = 2,@freq_subday_type = 4, @freq_subday_interval = 30,@freq_relative_interval = 0, @freq_recurrence_factor = 1,@active_end_date = 99991231, @active_end_time = 235959IF (@@ERROR <0 OR @ReturnCode <0) GOTO QuitWithRollbackEXECUTE @ReturnCode = msdb.dbo.sp_add_jobschedule @job_id = @JobID,@name = N'TuesdayRun', @enabled = 1, @freq_type = 8, @active_start_date= 20060831, @active_start_time = 4000, @freq_interval = 4,@freq_subday_type = 4, @freq_subday_interval = 40,@freq_relative_interval = 0, @freq_recurrence_factor = 1,@active_end_date = 99991231, @active_end_time = 235959IF (@@ERROR <0 OR @ReturnCode <0) GOTO QuitWithRollbackEXECUTE @ReturnCode = msdb.dbo.sp_add_jobschedule @job_id = @JobID,@name = N'WednesdayRun', @enabled = 1, @freq_type = 8,@active_start_date = 20060830, @active_start_time = 3000,@freq_interval = 8, @freq_subday_type = 4, @freq_subday_interval = 30,@freq_relative_interval = 0, @freq_recurrence_factor = 1,@active_end_date = 99991231, @active_end_time = 235959IF (@@ERROR <0 OR @ReturnCode <0) GOTO QuitWithRollbackEXECUTE @ReturnCode = msdb.dbo.sp_add_jobschedule @job_id = @JobID,@name = N'ThursdayRun', @enabled = 1, @freq_type = 8,@active_start_date = 20060831, @active_start_time = 3500,@freq_interval = 16, @freq_subday_type = 4, @freq_subday_interval = 35,@freq_relative_interval = 0, @freq_recurrence_factor = 1,@active_end_date = 99991231, @active_end_time = 235959IF (@@ERROR <0 OR @ReturnCode <0) GOTO QuitWithRollbackEXECUTE @ReturnCode = msdb.dbo.sp_add_jobschedule @job_id = @JobID,@name = N'FridayRun', @enabled = 1, @freq_type = 8, @active_start_date= 20060831, @active_start_time = 3000, @freq_interval = 32,@freq_subday_type = 4, @freq_subday_interval = 30,@freq_relative_interval = 0, @freq_recurrence_factor = 1,@active_end_date = 99991231, @active_end_time = 235959IF (@@ERROR <0 OR @ReturnCode <0) GOTO QuitWithRollbackEXECUTE @ReturnCode = msdb.dbo.sp_add_jobschedule @job_id = @JobID,@name = N'SaturdayRun', @enabled = 1, @freq_type = 8,@active_start_date = 20060831, @active_start_time = 0, @freq_interval =64, @freq_subday_type = 8, @freq_subday_interval = 1,@freq_relative_interval = 0, @freq_recurrence_factor = 1,@active_end_date = 99991231, @active_end_time = 235959IF (@@ERROR <0 OR @ReturnCode <0) GOTO QuitWithRollback-- Add the Target ServersEXECUTE @ReturnCode = msdb.dbo.sp_add_jobserver @job_id = @JobID,@server_name = N'(local)'IF (@@ERROR <0 OR @ReturnCode <0) GOTO QuitWithRollbackENDCOMMIT TRANSACTIONGOTO EndSaveQuitWithRollback:IF (@@TRANCOUNT 0) ROLLBACK TRANSACTIONEndSave:

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved