Teradata: User & Database Creation
➠
User Creation: Creating a sample teradata user used in various examples within the website.
CREATE USER tutorial_user AS
PASSWORD=tutorial_user
PERM = 100000000 -- 100 MB
SPOOL= 10000000 -- 10 MB
;
*** User has been created.
*** Total elapsed time was 1 second.
➠
Database Creation: Creating a sample teradata database used in various examples within the website.
CREATE DATABASE tutorial_db
FROM DBC
AS
PERM = 1000000000 -- 1000 MB
;
*** Database has been created.
*** Total elapsed time was 1 second.
➠
Grant on Database: Providing complete access(creation/dropping/modifying objects) on tutorial_db to tutorial_user.
GRANT ALL ON tutorial_db TO tutorial_user;
➠
Access to DBC Tables: Providing select access to tutorial_user on DBC data dictionary tables.
GRANT SELECT ON dbc TO tutorial_user;
➠
Change Password
MODIFY USER tutorial_user AS PASSWORD= "NewPassword";
➠
Default Database
MODIFY USER tutorial_user AS DEFAULT DATABASE=tutorial_db;
➠ Access to specific object creation
- Procedure Creation Access
GRANT CREATE PROCEDURE ON tutorial_user TO tutorial_user;
- Function Creation Access
GRANT CREATE FUNCTION ON tutorial_user to tutorial_user with grant option;
GRANT DROP FUNCTION ON tutorial_user to tutorial_user with grant option;
GRANT EXECUTE FUNCTION ON tutorial_user to tutorial_user with grant option;