ora2pg icon indicating copy to clipboard operation
ora2pg copied to clipboard

FATAL: The access token has expired. Please acquire a new token and retry

Open daherndon opened this issue 11 months ago • 1 comments

trying to load a large schema to an Azure PostgreSQL server. we use tokens for our passwords. The tokens expire at 90 minutes or so.....

I was hoping that when I ran my test this way....

ora2pg -T /tmp/allen3 -P 2 -j 2 -t COPY -b ./data -o data.sql -c ./config/ora2pg.conf --pg_pwd $(az account get-access-token --resource-type oss-rdbms --output tsv --query accessToken)

... that ora2pg would execute the azure command for every new session to Postgres. but after 90 minutes of perfect loading from oracle to postgres, the above ora2pg execution fails...

FATAL: The access token has expired. Please acquire a new token and retry.

Is there a way to force ora2pg to use the az CLI command above for every password needed? Thanks Allen Herndon

daherndon avatar Jan 10 '25 21:01 daherndon

There is no solution, Ora2Pg use the parameters given at startup and duplicate the connection when forking process. This feature could be implemented the days I will encounter the problem myself otherwise you can sponsors this features if you want.

darold avatar Feb 14 '25 13:02 darold