how to create a user, database and table in sql assistant?

Database

how to create a user, database and table in sql assistant?

Hi.
How to create a user, database and tables in the sql assistant via the scripts?
I want to create a user, and create a database in this user, finally I want to create tables in database.
any document or guide for reference?
Thanks.
5 REPLIES
Enthusiast

Re: how to create a user, database and table in sql assistant?

Check these manuals out:
http://www.info.teradata.com/edownload.cfm?itemid=102320036
http://www.info.teradata.com/edownload.cfm?itemid=102320038

They will provide you with the details surrounding Teradata Data Definition Language including CREATE USER and CREATE DATABASE.
Enthusiast

Re: how to create a user, database and table in sql assistant?

Lol my mistake with the earlier answer.

I had allready created user by using script similar to generated from Teradata Administrator.

The ony questions are:

GRANT ALL ON user_TEST to SysDBA2 with grant option;

GRANT insert, select, restore, dump, checkpoint, table, create view, create macro, create trigger, create database on user_TEST to arch;

I saw them in qery log but those seem not to be some application added commands.

Are those some default one anyway?

CREATE USER "user_test" FROM "GRP_US_TEST"

AS PERM = 0

PASSWORD = "**********"

SPOOL = 300000029651.763

TEMPORARY = 50000001362.8211

ACCOUNT = ('$AL$ANAL&S&D&H')

STARTUP = ''

DEFAULT DATABASE = "VD_US_TEST"

NO FALLBACK

NO BEFORE JOURNAL

NO AFTER JOURNAL

COLLATION = HOST

DEFAULT CHARACTER SET LATIN

DATEFORM=INTEGERDATE

PROFILE="PASSWD_TEST"

DEFAULT ROLE="GRP_US_TEST"

grant select on VD_US_TEST to user_TEST;

grant select on VD_US_TEST_TEST to user_TEST;

grant select on VD_US_TEST_TEST_TEST    to user_TEST;

Teradata Employee

Re: how to create a user, database and table in sql assistant?

I dont think they are default ones .... better ask who granted them. :)

Re: how to create a user, database and table in sql assistant?

How to  create a database and tables in teradata in bteq shell.

Enthusiast

Re: how to create a user, database and table in sql assistant?

Purna,

You can run the ddl to create what you need in bteq.  Make sure the logon id you're using has Create database and create table privileges.