dbeaver / dbeaver/dbeaver

Cannot save changes to stored procedures through data editor

Open
#32,643 1 comment 0 reactions 1 assignee Claimed by @HocKu7 View on GitHub
x:mssql xf:metadata
Dominant language
Java
Stars
51.8k
Forks
4.4k
Avg merge
3d 8h
Merged PRs (30d)
188

Description

### Description

When applying database filters, cannot save changes in stored procedure or functions through data editor/Source tab. Getting a script generate error: "Cannot invoke "org.jkiss.dbeaver.model.struct.DBSObject.getDataSource()" because "object" is null".
Noticed that toolbar button for Active catalog/schema shows and does not let me change it. When disabling database filters, this shows dbo@master and saving stored procedure works fine.

### DBeaver Version

Community Edition v. 24.0.4.202405051837

### Operating System

Windows 10 Enterprise v. 22H2 os build 19045.4291

### Database and driver

DB name and version: Microsoft SQL server 2017 (RTM- CU31) (KB5016884) - 14.0.3456.2 (X64)
Driver and version: MS SQL server / SQL Server
Microsoft JDBC Driver for SQL Server (MSSQL)
Release 12.4.1.jre11, 12.4.1.x64

### Steps to reproduce

1. Goto Edit Connection>General>Filters>Databases/Catalogs
2. Click on Enable checkbox
3. Add Alentpr% into Include. Need to filter all Databases that start with Alentpr.
4. Click Ok and Ok again.
5. Open connection to SQL server instance.
6. Filtered database works fine.
7. Open any database and then schemas>dbo>procedures.
8. Right click on any stored procedure and select View procedure.
9. Go to source tab.
10. Make any change.
11. Click on button on bottom right of screen called Save...
12. Will get error message stated in description above.
13. Noticed that toolbar button for active schema shows N/A.

To fix:
15. Disable filter from 2.
16. Steps 7 to 11 works fine by opening a new script with Alter stored procedure
17. Toolbar button from 13 shows dbo@master.

### Additional context

Only have office extension installed. Using native dark theme.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.