forked from babelfish-for-postgresql/babelfish_extensions
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Fix] Database owner login is unable to view db objects in SSMS (babe…
…lfish-for-postgresql#2925) Currently in babelfish when we create a login (e.g. postjend_svc) and a database (e.g. test) and make postjend_svc owner of test and then connect to SSMS object explorer as login "postjend_svc" to database "test" and try to expand the "Database" field to view the objects. It does not show anything. With this change the login with be able to expand the "Database" field. The issue arised because when the databases are expanded in SSMS, a query is being executed which contains a cross-db query. Currently, we handle cross-db queries by switching the database and current user. This cross-db query is resulting into permission denied error due to lack of permission of the current user (which is switched internally to master_guest) to insert into a table created in "test" db. Task: BABEL-5119, BABEL-5218 Signed-off-by: P Aswini Kumar <[email protected]>
- Loading branch information
Showing
15 changed files
with
1,368 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
-- tsql | ||
USE master | ||
GO | ||
DROP TABLE guest.BABEL5119_t4 | ||
GO | ||
DROP TABLE guest.BABEL5119_t5 | ||
GO | ||
DROP TABLE guest.BABEL5119_t6 | ||
GO | ||
DROP VIEW guest.BABEL5119_v4 | ||
GO | ||
DROP VIEW guest.BABEL5119_v5 | ||
GO | ||
DROP VIEW guest.BABEL5119_v6 | ||
GO | ||
DROP PROCEDURE guest.BABEL5119_p4 | ||
GO | ||
DROP PROCEDURE guest.BABEL5119_p5 | ||
GO | ||
DROP PROCEDURE guest.BABEL5119_p6 | ||
GO | ||
DROP LOGIN login_babel5119_1 | ||
GO | ||
DROP LOGIN login_babel5119_2 | ||
GO | ||
DROP DATABASE BABEL5119_db | ||
GO |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
-- tsql | ||
CREATE DATABASE BABEL5119_db | ||
GO | ||
|
||
USE BABEL5119_db | ||
GO | ||
CREATE TABLE BABEL5119_t1(a int) | ||
GO | ||
CREATE TABLE BABEL5119_t2(a int) | ||
GO | ||
CREATE TABLE BABEL5119_t3(a int) | ||
GO | ||
CREATE VIEW BABEL5119_v1 AS SELECT 1 | ||
GO | ||
CREATE VIEW BABEL5119_v2 AS SELECT 1 | ||
GO | ||
CREATE VIEW BABEL5119_v3 AS SELECT 1 | ||
GO | ||
CREATE PROCEDURE BABEL5119_p1 AS SELECT 1 | ||
GO | ||
CREATE PROCEDURE BABEL5119_p2 AS SELECT 1 | ||
GO | ||
CREATE PROCEDURE BABEL5119_p3 AS SELECT 1 | ||
GO | ||
-- terminate-tsql-conn |
Oops, something went wrong.