Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

Execute an in-line powershell script

I need to automate a SQL script against an Oracle database using a Bamboo build via PowerShell inline commands. The credentials are not to be displayed in the inline script but managed via variables.

My code looks like this

$user = "<username>"
$password = "<password>" 
$tnsalias = "<TNS_ALIAS>"
$SqlQuery = "@C:\Test.sql"
$bambooExecutionLog = "C:\Test.log"
C:\sqlplus $bambooUser/$bambooPassword@$tnsalias $SqlQuery

However, it fails with the following error message

ORA-01017: invalid username/password; logon denied

Any help/suggestions would be appreciated.

1 answer

I managed to resolve the issue myself :-)

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Bamboo

Bamboo 9.0 is now available

Hey there, Data Center community! I'm Martyna Wojtas and I am the Product Manager for Bamboo Data Center. I’m excited to share that Bamboo 9.0 is now available. We purpose-built this platform to help...

302 views 0 7
Read article

Atlassian Community Events