Add Server Name to Synonym visual editing GUI in SQL Server as SSMS
Modifications made to extraction and scripting to so that synonyms on server linked objects will correctly extract and script. I have added a text field to the GUI that is currently read only and used to display the server info when viewing the synonym properties. If we want to enable this text field we need to come up with how we want the GUI to work.
Currently the Database & Schema combo boxes list the local server's databases and schemas. If the user files our the server field, then having these drop downs offer only the local database's databases and schemas will be incorrect. The linked server can be of many types of databases, so attempting to extract the catalog information from the target server would be a nightmare. Looking at SSMS, it appears as there GUI is very disfunctional for this. What I would recommend if the user enters a server, could be a drop down with a list of linked servers, the database and schema combo boxes should get converted to text boxes and the user would have to manually type the target database and schema and object name.
@kin & niels : I had to make modifications to statementparser class in order to handle server,database,schema,object & column. Please review statementparser. will follow up with an email
SQL Server @ 10.1.1.69 has database link ORASRV2 created that poings to Oracle 12c @ 10.1.1.69. Under sql server schema [Chinook] I created a synonym ORASRV2_Act as an example of a synonym on a linked server based object.
CREATE SYNONYM [dbo].[ORASRV2_Act] FOR [ORASRV2]..[SYS].[DBA_TABLES]
You can query the object as below
SELECT * from [dbo].[ORASRV2_Act] WHERE OWNER = 'C##DB_LEFT'
SQL Server @ 10.1.1.69 has database link ORASRV2 created that poings to Oracle 12c @ 10.1.1.69. Under sql server schema [Chinook] I created a synonym ORASRV2_Act as an example of a synonym on a linked server based object.
CREATE SYNONYM [dbo].[ORASRV2_Act] FOR [ORASRV2]..[SYS].[DBA_TABLES]
You can query the object as below
SELECT * from [dbo].[ORASRV2_Act] WHERE OWNER = 'C##DB_LEFT'
@Ivan: Server text box is displayed in create synonym window and functionality is working as explained in above comment but ADS allows to create Synonym for those objects which do not exist in the database but SSMS gives an error and don't allow to create.Please see attached screenshot error.png.
Is it expected behaviour?
@Ivan: Server text box is displayed in create synonym window and functionality is working as explained in above comment but ADS allows to create Synonym for those objects which do not exist in the database but SSMS gives an error and don't allow to create.Please see attached screenshot error.png.
Is it expected behaviour?
Issue #14021 |
Closed |
Fixed |
Resolved |
Completion |
No due date |
Fixed Build v18.0.0-devi-261 |
No time estimate |
3 issue links |
relates to #14849
Issue #14849Create Synonym UI : Schema drop down list is not repopulated on removing contents of server box. |
relates to #15503
Issue #15503Query Analyzer Execute edit gives error "Failed to set current schema" with Oracle schema containing a dot. |
relates to #14020
Issue #14020Add permissions to Synonyms in visual editing where supported |
Modifications made to extraction and scripting to so that synonyms on server linked objects will correctly extract and script. I have added a text field to the GUI that is currently read only and used to display the server info when viewing the synonym properties. If we want to enable this text field we need to come up with how we want the GUI to work.
Currently the Database & Schema combo boxes list the local server's databases and schemas. If the user files our the server field, then having these drop downs offer only the local database's databases and schemas will be incorrect. The linked server can be of many types of databases, so attempting to extract the catalog information from the target server would be a nightmare. Looking at SSMS, it appears as there GUI is very disfunctional for this. What I would recommend if the user enters a server, could be a drop down with a list of linked servers, the database and schema combo boxes should get converted to text boxes and the user would have to manually type the target database and schema and object name.
@kin & niels : I had to make modifications to statementparser class in order to handle server,database,schema,object & column. Please review statementparser. will follow up with an email