Views in DataGrip

I can't seem to find a way to edit an existing view (of mine) -- unless if I pull up the code from another source that I have. How do I just look at/alter the code behind a view in my own schema? Any help is appreciated

Modify View doesn't let me see the code behind the view or alter it

7 comments

Hello Raj,

To view the DDL script for any DB object you can via Table editor's DDL tab. See also an example in another thread.

0

Thanks Andrey. Copy DDL only allows me to look at the field names in the table. However, I am looking to see the code that's driving the view. How can that be accomplished? Thanks!

1

Have you checked DDL tab in Table Editor?

0

I'm having the same issue, still. What was the fix to this? 

I have checked the ddl tab in table editor and all it shows is

-- auto-generated definition
-- No source text available

 

2

Andrey; 

When I go into an Oracle Database, the DDL for the view is not available. It exists in the database. I can see it in Toad. We promote our views through a ticketing system so, in order for me to see it in Toad, it has to be in the database. That said, I have tried with an MSSQL database as well, to no avail. I see the same information as I posted above for both. 

I am using JetBrains DataGrip 2017.1.5 (build 171.4694.58)

Here are the details from the test connection function: 

SQL Server: 

Database Microsoft SQL Server (ver.11.00.65940

Identifier case sensitivity: mixed (plain), mixed (delimited)

Driver (JDBC 3.0): jTDS Type 4 JDBC Driver for MS SQL Server and Sybase (ver. 1.3.1)

 

Oracle: 

Database: Oracle (ver. Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP, Advanced Analytics and Real Application Testing options)

Identifier case sensitivity: upper (plain), exact (delimited)

Driver (JDBC4.0): Oracle JDBC driver (ver. 12.1.0.2.0)

 

 

 

2
Could you please try the latest version from https://www.jetbrains.com/datagrip/download There was related issue fixed: https://youtrack.jetbrains.com/issue/DBE-4853 
 
 
 
If you still have the problem could you show the example DDL for the view. Is it system vew or user-defined? Thanks.
1

Andrey; 

 

Thank you for your suggestion. I am now able to see ddl for views in our database. 

What worked for me: https://www.jetbrains.com/help/datagrip/working-with-the-database-tool-window.html#db_resolve_problems 

List item number 3. 

Thank you for your assistance. 

 

0

Please sign in to leave a comment.