Index creation for sysjobhistory table in RDS SQL Server

0

Hi Everyone!

We are analyzing the performance and the index needs for all tables of a RDS SQL Server instance, we are using a T-SQL script pretty similar to the one shown in this post.

Now, we have a list of tables that we can potentially improve the access performance creating indexes to it, but, for example, if we want to create a index for the table [msdb].[dbo].[sysjobhistory], we cannot because the SQL Server from RDS return to us with this error:

The T-SQL sentence:

CREATE INDEX [missing_index_2_1_sysjobhistory] ON [msdb].[dbo].[sysjobhistory] ([step_id], [run_status],[run_duration]) INCLUDE ([run_date], [run_time])

The result:

Msg 2809, Level 16, State 1, Line 1
The request for procedure 'sysjobhistory' failed because 'sysjobhistory' is a table object.

We know that, with RDS, we have some permissions restricted, as of we doesn't have access to sysadmin role, as example. There is a way to achieve the creation of this index?

We know also that in regular SQL Servers we can do this, as shown in the following link.

Can you help us? Thank you!

1 Answer
0

Hello,

Thank you for reaching out to us on this. I would like to mention that sysjobhistory is a system table and you are not allowed to do any changes on this table. RDS being managed service, it does not allow few tables to be modified as part of managed nature.

I even tried to test any changes to this table and it returned error with permission issues.

Kindly reach out to us directly with the set of permission your user has when trying this creation of index and also what is the exact requirement for this index creation so that we can help you further.

AWS
SUPPORT ENGINEER
answered 2 days ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions