Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 877
  • Last Modified:

DB2 current schema

If I have an instance of a JDBC DB2 connection, how do I get the current schema?

Either a SQL statement would work, or just a JDBC method call.
0
mbevilacqua
Asked:
mbevilacqua
1 Solution
 
Dave FordSoftware Developer / Database AdministratorCommented:

This works for me ....
select current_schema  
from   sysibm.sysdummy1
;

Open in new window

0
 
mbevilacquaAuthor Commented:
Ah, sysdummy1, i was using sysdummy. Cheers!
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now