SQL to check Bitbucket user permission

Bitbucket permission can be assigned at project level or repository level for a group and user. The SQL (MSSQL Server) below can be used to check all projects & repositories permission for a given user, include the access assigned to an individual user or a group. with repo_access as ( select distinct as "Project ID", as "Project Name", as "Repo Name", as "User ID (Individual)", cu.user_name as "Username (Individual)", Concat(cu.

Restore MSSQL Database

Kill active sessions Firstly, it would be better to stop all the applications/services which are connecting to the Database which needs a restore. Then, kill the active sessions as this will block the restore process if there are any active sessions. use master; declare @kill varchar(max) = ''; select @kill = @kill + 'kill ' + convert(varchar(10),S.session_id) + ';' from sys.dm_exec_sessions S join master..sysprocesses P on P.spid = S.session_id where P.

Oracle ODBC with Instant Client

Sometimes we don’t want to have full client installed just for an ODBC connection to Oracle Database, so I had a try with Oracle Instant Client. Download & install required packages Instant Client Package – Basic Instant Client Package – ODBC You can download either Instant Client for Microsoft Windows (32-bit) or Instant Client for Microsoft Windows (64-bit) based on your preference. After we have the packages, unzip them into a directory, all the files should be in same directory.