I am trying to run a job on the server. This job is called 'OrdersTransfer' and it has 2 steps:
First step:
is called 'Transfer' and it transfers all records from a table called ordersbyday to a master table called orders
Second step:
is called 'DropandCreate' and it drops table called ordersbyday and then recreates it again


use msdb
EXEC sp_add_job @job_name = 'OrdersTransfer',
@enabled = 1,
@description = 'daily orders transfer from OrderbyDay table to master Orders table',
@delete_level = 1

use msdb
EXEC sp_add_jobstep @job_name = 'OrdersTransfer',@step_id = 1,
@step_name = 'Transfer',
@subsystem = 'TSQL',
@command =
'INSERT INTO basmala_38.dbo.Orders (OrderId, OrderDate, OrderTime, BranchId, MemberId, EmpId, DocDate, Status,TotalPoints, TotalMoney)
SELECT OrderId, OrderDate, OrderTime, BranchId, MemberId, EmpId, DocDate, Status, TotalPoints, TotalMoney
FROM basmala_38.dbo.OrdersByDAy'

use msdb
EXEC sp_add_jobstep @job_name = 'OrdersTransfer', @step_id = 2,
@step_name = 'DropandCreate',
@subsystem = 'TSQL',
@command =
Declare @dynSQL1 varchar (100)
,@dynSQL2 varchar (100)
,@dynSQL3 varchar (100)
,@dynSQL4 varchar (100)
,@dynSQL5 varchar (100)

select @dynSQL1 = ''if exists (select * from dbo.sysobjects where id = object_id ''
select @dynSQL2 = @DynaSql1 + ''(N''[basmala_38].[dbo].[OrdersByDay]'') and OBJECTPROPERTY(id, N''IsUserTable'') = 1) ''
select @dynSQL3 = @DynaSql2 + ''drop table [basmala_38].[dbo].[OrdersByDay] Go''

select @dynSQL5 = ''
CREATE TABLE [basmala_38].[dbo].[Orders] (
[OrderId] [int] NOT NULL ,
[OrderDate] [smalldatetime] NOT NULL ,
[OrderTime] [smalldatetime] NULL ,
[BranchId] [tinyint] NULL ,
[MemberId] [bigint] NULL ,
[EmpId] [int] NULL ,
[DocDate] [smalldatetime] NULL ,
[Status] [nvarchar] (15) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[TotalPoints] [int] NULL ,
[TotalMoney] [money] NULL

select @dynSQL5 = @dynSQL5 + ''Go''

select @dynSQL5 = ''
ALTER TABLE [basmala_38].[dbo].[OrdersByDay] WITH NOCHECK ADD



use msdb
EXEC sp_add_jobserver @job_name = 'OrdersTransfer',
@server_name = N'(ServerIp Address)'

use msdb
EXEC sp_start_job @job_name = 'OrdersTransfer'

USE msdb
EXEC sp_update_jobschedule @job_name = 'OrdersTransfer',
@name = 'ScheduledOrdersTransfer',
@freq_type = 4, -- daily
@freq_interval = 1,
@active_start_time = 00000

All steps run successfully execpt one step which is:

use msdb
EXEC sp_add_jobserver @job_name = 'OrdersTransfer',
@server_name = N'(Server IP Address)'

N.b I write the server name as as the server Ip Address

The error generated is:

Only members of the sysadmin role can execute this stored procedure.

I tried to enter with sa login but it also failed.
N.B: The sql serveragent has a local system domain
I do not know what is wrong?

Thanks a lot