Permission Denied when doing a Deployment Run in dbt - dbt

I am trying to deploy the master branch of my dbt repository to create the tables in the production schema. My Data Warehouse is in redshift.
The error that I am getting is "permission denied for schema"
I tried running the compiled queries to create these tables from target/run/ directory in dbt. On running these queries in redshift, they run fine without any error. What permissions am I missing that the deployment job is failing to create the tables?
dbt run failed
Database error: permission denied

Kindly check if you are trying to create a new schema in the code. This is the common mistake all developers do. Check the configuration and change the schema properties
If you are trying to create in the existing schema, please check the permission of the user from which you are trying to create the table

Related

Oracle replication process error ORA-09925: Unable to create audit trail file

When I run script RMAN for replication database oracle its return error
connected to auxiliary database (not started)
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 08/11/2016 14:16:44
RMAN-05501: aborting duplication of target database
RMAN-03015: error occurred in stored script Memory Script
RMAN-04014: startup failed: ORA-09925: Unable to create audit trail file
Linux-x86_64 Error: 13: Permission denied
Additional information: 9925
I sow adump directory permissions and owners there were everything okay
Do you have audit_file_dest parameter defined, and has sufficient permissions, especially writeable ?
Moreover, your disk, which holds that directory's files, should have enough space.

Entity Framework MVC code first, migration to production server

I've created a project using EF Version 6.0, with settings of AutomaticMigrationsEnabled = true;
Which worked fine, i could able to deploy in production server on first time, It created desire database tables.
Now for second update, I've get script out from migration so that i can able to run in production server. but i tried many Package Manager commands, but it does creating empty .sql files.
My second Migration has name "201601181549424_Version-1.2.0", i used following sequence of steps and commands to generate .sql file.
Added desire data classes (which will be creating tables in database) and MVC views and controller.
Run Package Manger Command is "ADD-MIGRATION Version-1.2.0" has created 201601181549424_Version-1.2.0" file in Migration folder
Than "UPDATE-DATABASE" - has updated local database, check everything works fine.
Than "UPDATE-DATABASE -Script" - has created empty.sql file. I am looking to get sql file with creation of database tables in sql file.
Can you please help me understand how i can deploy this in production database.
Thanks,
I figured out by this way..
Make desire changes to model, (INSERT OR UPDATE MODEL)
Add-Migration
Update-Database -Script
(Which will create script and can store for QA or production deployment purpose)
Update-Database
(Above command will update model in to local database)

PostGIS/PostgreSQL - ERROR: must be owner of type spheroid

Hope you are well.
I am trying to move a PostGIS data table from one server to another. I have installed postgresql on the target machine, configured it to allow sensible authentication (username/password). I have also used yum to install the postgis2_91 package (including debuginfo, devel, docs and utils).
When i initially tried to restore the sql dump to the target server i got a load of errors, i put this down to postgis not being installed as it was complaining about the "geometry" data type.
I believe i need to follow these instructions (from spatially enable database) http://trac.osgeo.org/postgis/wiki/UsersWikiPostGIS21CentOS6pgdg however, when i tried to run the command below I got an error saying "ERROR: must be owner of the spheroid", this is while I'm logged in as the "postgres" user which I believe has full permissions?
CREATE EXTENSION postgis;
Edit - I managed to fix this by completely removing postgres and postgis, then tried the procedure again and it worked. No idea why it didn't work but it is now resolved.
Any ideas?
Thanks
Paul

load local data files into hive table failed when using hive

when i tried to load local data files into hive table,it report error while moving files.And i found the link,which give comments to fix this issue.I follow this step ,but it still can't work.
http://answers.mapr.com/questions/3565/getting-started-with-hive-load-the-data-from-sample-table txt-into-the-table-fails
After mkdir /user/hive/tmp,and set hive.exec.scratchdir= /user/hive/tmp,it still report RuntimeException Cannot make directory:file/user/hive/tmp/hive_2013* How can I fix this issue?Who are familiar with hive can help me?Thanks!
hive version is 0.10.0
hadoop version is 1.1.2
I suspect a permission issue here, because you are using MapR distribution.
Make sure that the user trying to create the directory has permissions to create the directory on CLDB.
Easy way to debug here is to do
$hadoop fs -chmod -R 777 /user/hive
and then try to load the data, to confirm if it's permission issue.

rake aborted! ERROR: must be owner of database

I am working through Michael Hartl's excellent tutorial but when trying to prepare the test database with the command:
bundle exec rake db:test:prepare
I get this error message:
ERROR: must be owner of database sample_app_test...
which I never got when using the development database, because I had created the following database role for my Rails app:
CREATE ROLE demo_app WITH CREATEDB LOGIN
(this is using Postgresql)
Does anyone understand why this is failing in the test environment?
TIA...
Did you ensure the ownership of the test DB? try running the \l command on Postgres console client and check the ownerships. you can also try the following query:
ALTER DATABASE sample_app_test OWNER TO demo_app;
First post, writing this down for posterity. I was having the same problem but was able to fix it. You just have to make sure you were/are signed in as a superuser when you create your databases (or the one that is throwing the error).
I was logging into psql with this code:
sudo sudo -u postgres psql
And created my databases. This is bad. You want to log in with these superuser credentials:
sudo su - postgres
And then after you're logged in to postgres:
psql
Then create your databases. You can kill your old databases with the command
DROP DATABASE "database_to_drop";
Recreate them and you should be good to go!