Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How to run database queries?

Matthew Grivich April 22, 2020

I think I'm running into the problem described at: https://community.atlassian.com/t5/Bitbucket-questions/starting-bitbucket-hangs-on-quot-migrating-home-directory-quot/qaq-p/785834

But it is not clear how to run database queries, such as 

    

UPDATE DATABASECHANGELOGLOCK SET LOCKED=0, LOCKGRANTED=null, LOCKEDBY=null where ID=1;


I'm on Windows Server 2008, and attempting to update my bitbucket installation

2 answers

0 votes
Matthew Grivich May 5, 2020

Thanks for the reply. I ended up:

* While logged in to the server, and at a command prompt, clone the repository with local commands

* Renaming the old Atlassian Bitbucket folder

* Make and configure a new Atlassian Bitbucket install

* Push the repository to the new install

The git commands are described here: https://www.atlassian.com/git/tutorials/git-move-repository Except <url to ORI repo> was a file path: C:\Atlassian\ApplicationData\Bitbucket\shared\data\repositories\1

0 votes
Evan Slaughter
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 5, 2020

Hey @Matthew Grivich,

I hope you've since been able to run this update statement on the database you're using with Bitbucket, but in case you're still stuck - you should be able to check the contents of your bitbucket.properties file on the server, which contains the information that Bitbucket is using to connect to the external database.

From there, you should be able to then use those credentials to log in and connect to the same external database that Bitbucket is using - and then execute the query you mentioned to set the value of that particular table's record appropriately.

  • Just a heads up that for more info on what it takes to connect to the external database and execute the query, this is going to depend on the kind of database you're using. Those both should be pretty quick and easy tasks, but if you get stuck there - it may help to review the resources available for the kind of database on connecting to and executing queries against that database type.

Hope this helps!

Thanks,

Evan Slaughter

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events