All Forums Database
sckim805 3 posts Joined 02/11
03 Apr 2011
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.

robpaller 159 posts Joined 05/09
05 Apr 2011

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.

wicik 35 posts Joined 06/12
11 Mar 2013

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;

Adeel Chaudhry 773 posts Joined 04/08
11 Mar 2013

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

-- If you are stuck at something .... consider it an opportunity to think anew.

purna88 2 posts Joined 05/14
14 May 2014

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

VandeBergB 182 posts Joined 09/06
17 May 2014

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.

Some drink from the fountain of knowledge, others just gargle.

You must sign in to leave a comment.