hello, I'm running this query
the one for jira 7.0.x onwards (postgresql).
when I run the query I get
-------------------------------------------------------------------
psql:query.sql:16: ERROR: relation "cwd_user" does not exist
LINE 4: FROM cwd_user u
^
-------------------------------------------------------------------
I'm running it with this command.
psql --host=xxxxxxxxxx --port=5432 --username=user1 --password --dbname=db -f query.sql
Any ideas what could be the problem?
Thanks.
Hello @[deleted] ,
Thanks for reaching out and the formatting of your query is good and I just ran a test using the same syntax via the following exe using the top query from the document you listed as my test file and everything went through without error:
$ psql --host=localhost --port=5432 --username=test --dbname=jiradb -f sql_query.sql
Directory | Username | Last Login
-------------------------+----------+------------------------
Jira Internal Directory | admin | 2020-03-18 11:55:24-05
(1 row)
The error you are seeing is indicating the cwd_user table is not present in the database you're searching in. I would recomend double checking the dbname variable in the query to make sure there are no typos, and that it lines up with the DB listed in the dbconfig.xml located at the root of your Jira home directory.
Regards,
Earl
Yes the problem was that I was using the wrong database.
Thanks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.