User does not have CREATE TABLE access to database DBC - teradata

I am using the tdload utility of Teradata to import data into an existing empty table in my database.
The command I'm running is :
tdload -h 192.168.xxx.xxx -u dbc -p dbc -f path/to/file.csv
-t AdventureWorksDW.DemoTable MyJob
I get the following error after running the command
RDBMS error 3524: The user does not have CREATE TABLE access to database DBC.
How can I fix this?

Although you defined the AdventureWorksDW as Database for Target Table, the underlying TPT still needs a working database (for temporary / working tables). These temp tables are by default created in you user database (you're using DBC user). You can work on this by either using another user or defining the "--TargetWorkingDatabase" parameter.

Related

OrientDB Console.bat errors out with invalid username password for drop database command

Using the OrientDB Console.bat for manage oreient-db databases shows some inconsistent behaviour.
1) I created a new db named demox using the below command :
orientdb> create database plocal:../databases/demox root root plocal graph
Creating database [plocal:../databases/demox] using the storage type [plocal]...
2018-04-12 19:10:26:775 INFO Storage 'plocal:../databases/demox' is
created under OrientDB distribution : 2.2.33 (build 77584cd6827f647cf4aa231cf27bd6f10bc04e2c, branch 2.2.x)
Database created successfully.
Current database is: plocal:../databases/demox
2) Next i try to run the drop database command and it errors out saying invalid username or password
orientdb {db=demox}> drop database plocal:../databases/demox root root
Error: com.orientechnologies.orient.core.exception.OSecurityAccessException: User or password not valid for database: 'demox'
DB name="demox"
orientdb {db=demox}>
However If you see the credentials used in step1 and step2 both are same.
I am not sure where the issue is , or am i missing something in the drop database command.
Why would the console error out even when i am using the same credentials for drop-database command as the one i have used while creating the database
use the same command but with the credentials of admin (user:admin pass:admin)
drop database plocal:../databases/demox admin admin
If you have any more questions about this feel free to ask.

wso2 api analytics schema

I have installed wso2 APIManager and APIAnalytics,I want to change the APIANalytics datasource from h2 to mysql
In the tutorial they mentioned to create the equivalent database schema for WSO2_ANALYTICS_PROCESSED_DATA_STORE_DB
Where can I find the schemas for the database
Thanks
prabhat
You need to perform following steps to configure your wso2-am-analytics on mysql.
step 1. create all required databases in mysql db. just create it nothing else
create database wso2am_stats_db; --use existing one of wso2-am
create database wso2metrics_db; --use existing one of wso2-am
create database wso2_processed_data_store;
create database wso2carbon_db;
create database wso2_geolocation_db;
create database wso2_event_store;
step 2: configure these database in configuraton files under /wso2am-analytics-2.0.0/repository/conf/datasources/. there are 5 of them which you need to edit and change the database details.
analytics-datasources.xml
geolocation-datasources.xml
master-datasources.xml
metrics-datasources.xml
stats-datasources.xml
Step 3 :
once you are done, then start your server with -Dsetup (only once) this will create all tables needed. for example: sh bin/wso2server.sh -Dsetup
fore more read this article: Setting up MySQL

Checkpoint table does not exist even after creating it

I have created checkpoint table ggate for replicat rep1 but still I am getting following error:
2014-09-04 23:38:21 ERROR OGG-00446 Oracle GoldenGate Delivery for
Oracle, REP1.prm: Checkpoint table ggate.checkpoint does not exist.
Please create the table or recreate the REP1 group using the correct
table.
2014-09-04 23:38:21 ERROR OGG-01668 Oracle GoldenGate Delivery for
Oracle, REP1.prm: PROCESS ABENDING.
Can anyone tell me how to resolve it?
In this kind of situations you should:
Have you actually run the ADD CHECKPOINTTABLE? if not run it
Check if the checkpoint table actually exists in the database - if it has been created - try to drop it (DROP CHECKPOINTTABLE) and recreate it (ADD CHECKPOINTTABLE)
Check if the checkpoint parameter is correctly set in the GLOBALS config file
Restart the MGR and Extract/Replicat processes
Verify if the user has access on the database to the checkpoint table (insert, update, delete rights)
If nothing works, run 10046 flag on the target database and check what the GoldenGate Replicat process is executing on the database and when it actually fails (what it wants to do on the database and try to do the same commands by yourself)
This is a simple troubleshooting initiative:
Are you using a traditional non-CDB database or a PDB?
Are you using Classic Architecture or Microservices Architecture? - Different approaches when adding a checkpoint table.
How are you running ADD CHECKPOINTTABLE? From GGSCI/AdminClient or from HTML5 page?
In Classic Architecture, do you have CHECKPOINTTABLE parameter set in GLOBALS? (CHECKPOINTTABLE [container.] owner.table)
Who are you logged into the database as when using DBLOGIN USERIDALIAS?
What replicat are you using? - Classic, Coordinated, Integrated, Parallel?
Check the schema where the table is suppose to be? If not there, you can query the DBA_TABLES view for the name of the checkpoint table and see who owns it.
A lot of times when the checkpint table cannot be created it is due to not updating the GLOBALS file and/or connecting as the correct user to the database.

How do I prevent flyway from creating the schema during init

I'm trying to start using flyway v2.3 on an existing Oracle 11g schema that does not contain the schema_history table
In my flyway.properties i've set the flyway.user to the schema owner and i've set the flyway.schemas property to the same value
When running init from the command line I expected flyway to only create the schema_history table but it fails with this message:
$ ./flyway.cmd init
Flyway (Command-line Tool) v.2.3
Creating schema "myschema" ...
ERROR: Unable to create schema "myschema"
ERROR: Caused by: java.sql.SQLSyntaxErrorException: ORA-01031: insufficient privileges
Why is flyway attempting to create the schema? I only want it to create the schema_history table in the schema I configured
The command is correct. Please note that flyway.schemas is case-sensitive and automatically filled with the default schema of the user if left empty.
I suspect the value you put in flyway.schemas is in the wrong case. Just leave it empty and you should be ok.
So you have to be sure you want to work on schema which belongs to user name with which you login. If you want to work in different schema you have to specify inside flyway.properties.
I've just had the same problem in Flyway Maven plugin 3.1.
I turned out that I have created my user with lowercase name
CREATE USER myuser ...
And I gave Flyway
flyway.user=myuser
But while connecting my user's name was cast to uppercase, so Flyway reported that user of name MYUSER did not exist.
Solution: Create and use Oracle DB user with uppercase name.

specify default schema for a database in db2 client

Do we have any way to specify default schema in cataloged DBs in db2 client in AIX.
The problem is , when it's connecting to DB, it's taking user ID as default schema and that's where it's failing.
We have too many scripts that are doing transactions to DB without specifying schema in their db2 sql statements. So it's not feasible to change scripts at all.
Also we can't create users to match schema.
You can try to type SET SCHEMA=<your schema> ; before executing your queries.
NOTE: Not sure if this work (I am without a DB2 database at the moment, but it seems that work) and depending on your DB2 version.
You can create a stored procedure that just changes the current schema and then set the SP as connect proc. You can test some conditions before make that schema change, for example if the stored procedure is executed from the AIX server directly with a given user.
You configure the database to use this SP each time a connection is established by modifying connect_proc
http://pic.dhe.ibm.com/infocenter/db2luw/v10r5/topic/com.ibm.db2.luw.admin.config.doc/doc/r0057371.html
http://pic.dhe.ibm.com/infocenter/db2luw/v10r5/topic/com.ibm.db2.luw.admin.dbobj.doc/doc/c0057372.html
You can create alias in the new user schema that points to the tables with the other schema. Refer these links :
http://pic.dhe.ibm.com/infocenter/db2luw/v10r5/topic/com.ibm.db2.luw.sql.ref.doc/doc/r0000910.html
http://bytes.com/topic/db2/answers/181247-do-you-have-always-specify-schema-when-using-db2-clp

Resources