Problems when I'm creating a stored procedure

Database
Enthusiast

Problems when I'm creating a stored procedure

Hi guys!

When I'm trying to create a stored procedure into, Teradata SQL Assistant, I receive this message error:
"SPL1040:E(L6), Invalid definition for stored procedure 'E(3524): The user does not have CREATE PROCEDURE access to database MYDATABASE.' "

This is my script:

CREATE PROCEDURE MyStoredProcedure (IN FIELD1P VARCHAR(50), IN FIELD2P VARCHAR(50))

BEGIN
INSERT INTO MY_TABLE(FIELD1 ,FIELD2)
VALUES (FIELD1P ,FIELD2P);
END;

Ps: FIELD1 and FIELD2 are VARCHAR(50) Type into MY_TABLE table.

Thanks for help,
Anderson

2 REPLIES
Teradata Employee

Re: Problems when I'm creating a stored procedure

As clearly defined in the error message .... you need to have CREATE PROCEDURE rights on the database for the user you are using!

You (DB admin) can either do that using Teradata Administrator or by using GRANT command! For details refer to the manuals!

And also it is a good practice to fully qualify the DB object name e.g. Database1.StoredProcedure1.

HTH!

Regards,

Adeel
Enthusiast

Re: Problems when I'm creating a stored procedure

I got access but now I got another error:

"5863: Problem encountered during compilation phase of C code."

What should I have to resolve this?

Thanks,
Anderson