Skip to main content
  • Log in
  • twitter
  • linkedin
  • facebook

Dataprix main menu

  • Blogs
  • Software
  • News and resources
Home

Main tematic navigation

  • Business Intelligence
  • Data Science
  • Cloud
  • Databases
  • Security
  • ERP

Use SYSDUMMY1 in DB2 to obtain the actual server name

By Oscar_paredes on Mon, 11/18/2019 - 08:16
  • Read more about Use SYSDUMMY1 in DB2 to obtain the actual server name
  • Log in or register to post comments

By using the auxiliar table sysdummy1 you can query information about a server with DB2 installed.

Next query shows how to obtain the DB2 server name where the session is connected:

SELECT CURRENT SERVER
 FROM SYSIBM.SYSDUMMY1

 

Subscribe to SQL Tips

Popular today

How to do an update from a select with summarized registers in SQLServer

A very powerful way to do a table's update in a SQL Server database is to link it with another table with a join, and updating the fields…

Useful Oracle SQL queries and scripts

Don't you have a chop with useful queries to use in your daily adventures and desventures with the database? I include in this first post a…

Tips for UPSERT or update using insert in SQL Server

In many cases, especially in ETL processes or data loading to a data warehouse, for example, we would rather use a single sentence or the…

Easily export data from Oracle to flat file

A simple way to export data from a query, table, etc.. of an oracle database to a flat file is to use the SPOOL command in SQLPlus. This…

How to disable autocommit option in SQL Server Management Studio

Have you ever wondered how to disable the autocommit option in Sql Server Management Studio? The answer is quick. Simply uncheck the option…

Four questions to identify a developer with no knowledge of database

I leave here this link to a page where a small test posed to do in job interviews for database developers. Here this kind of test I do not…

Defragment to optimize MySQL tables

  In MySQL, when you delete records from a table, space is reallocated automatically. It is as empty space and forming new attachments will…

Listagg: New Oracle 11.2 function to summarize and aggregate strings

  In a LinkedIn debate about how to update from a select with summarized registers in SQL Server, Sergio Romero has shared an interesting…

Oracle10g: Manual standby database (initial approach)

An Oracle database in Standby is an exact copy of an operational database on a remote server, used as a backup, and copy for reference,…

DB2 Top 10 SQL for execution time

SQL Command to obtain the Top Ten of SELECT SQL sentences with more execution time in your DB2 database:

Breadcrumb

  1. Home
  2. SQL Tips

Creative Commons License  This work is licensed under a Creative Commons Attribution-Share Alike 3.0 Unported License.

Footer menu

  • Contact
Clear keys input element