{"id":29501,"date":"2017-03-07T07:00:07","date_gmt":"2017-03-07T14:00:07","guid":{"rendered":"https:\/\/virtual-dba.com\/?p=29501"},"modified":"2021-02-10T18:20:41","modified_gmt":"2021-02-11T01:20:41","slug":"accessing-db2-command-line","status":"publish","type":"post","link":"https:\/\/virtual-dba.com\/blog\/accessing-db2-command-line\/","title":{"rendered":"Accessing Db2 from the Command Line"},"content":{"rendered":"<p>Most Db2 DBAs administer Db2 at the command line. The command line provides a rich and powerful interface with Db2, and has a lot of options. Many other users may wish to access Db2 at the command line as well. Developers and system administrators are just a few of the people who might find the Db2 command line useful.<\/p>\n<h2>Command Line on Server or Client<\/h2>\n<p>The first thing to decide when accessing Db2 from the command line is whether that command line will be on the database server or on a client. A client is any machine with a network connection to the database server and the Db2 client software installed. Db2 client software is available for free on the <a href=\"http:\/\/www-01.ibm.com\/support\/docview.wss?uid=swg27007053\" target=\"_blank\" rel=\"noopener noreferrer\">Db2 Download Db2 Fix Packs by version page<\/a>. On that page, select the most recent fix pack for the version you want, and on the next page, select the operating system you wish to install it on. Finally, select the &#8220;Data Server Client&#8221; download.<\/p>\n<p>If you are connecting on the server directly, there is some setup to do for your ID. If you are connecting from a client, you will first have to catalog the node and the database.<\/p>\n<h2>Types of Command Line Available<\/h2>\n<p>The type of command line you choose to use can vary based on the operating system and choices you make. On AIX and Linux, a Bash or KSH command line is the main focus. On Windows, you can use a Db2 command window or a PowerShell command line. Db2 also offers an interactive Command Line Processor and a CLPPlus that offers some additional features and Oracle SQLPlus compatability.<\/p>\n<h2>Using a Bash or KSH Command Line<\/h2>\n<p>On a Linux or Unix server, you should be able to use your current shell. Bash and KSH are really identical here in terms of how you access Db2. There are several pieces of information that you&#8217;ll need to be successful:<\/p>\n<ul>\n<li>The location of the db2profile for the Db2 instance<\/li>\n<li>The name of the Db2 database<\/li>\n<\/ul>\n<p>The first part of setting up command line access from Bash or KSH is to source the proper db2profile for the instance. The location for this is $INSTHOME\/sqllib\/db2profile. $INSTHOME is the home directory of the Db2 instance owner. If you know the name of the Db2 instance, you can look this up by finding the entry for the db2instance owner in \/etc\/passwd:<\/p>\n<pre><code>$ cat \/etc\/passwd |grep db2inst1\ndb2inst1:x:999:999::\/db2home\/db2inst1:<\/code><\/pre>\n<p>In this example, the instance owner\u2019s home directory is \/db2home\/db2inst1\/.<\/p>\n<p>Once you have the location, sourcing the db2profile is a simple, one-line command:<\/p>\n<pre><code>. \/db2home\/db2inst1\/sqllib\/db2profile<\/code><\/pre>\n<p>If there is only one instance on the server or client that you will be accessing, then this line can be added to your .profile, .bash_profile, or .bashrc file so that it is automatically sourced any time you log in.<\/p>\n<p>Once you have sourced the db2profile, you can list the databases available for connection in the database directory:<\/p>\n<pre><code>$ db2 list db directory\n\n System Database Directory\n\n Number of entries in the directory = 1\n\nDatabase 1 entry:\n\n Database alias                       = SAMPLE\n Database name                        = SAMPLE\n Local database directory             = \/db2home\/db2inst1\n Database release level               = 14.00\n Comment                              =\n Directory entry type                 = Indirect\n Catalog database partition number    = 0\n Alternate server hostname            =\n Alternate server port number         =<\/code><\/pre>\n<p>If the database you are looking for is not listed here, you cannot connect to it. You may have to <a href=\"http:\/\/db2commerce.com\/2011\/04\/14\/how-to-catalog-a-db2-database\/\" target=\"_blank\" rel=\"noopener noreferrer\">catalog it<\/a> if you are connecting from a client, or you may have the wrong instance.<\/p>\n<p>If you are working on a server with multiple Db2 instances and need to switch from one Db2 instance to another, you need to source the db2profile of the other Db2 instance you wish to access. Only one db2profile can be sourced at any one time, and therefore only one Db2 instance can be accessed at any one time. It is best to terminate your Db2 sessions before sourcing a different instance\u2019s db2profile. If you do not, you may get an SQL1013N error when trying to connect to a database that exists in the database directory for the new instance.<\/p>\n<h2>Using a PowerShell Command Line<\/h2>\n<p>My favorite command line on a Windows Db2 server is the PowerShell command line. I like it because it is more similar to a Linux\/UNIX shell than the standard Windows command line. Like Bash or KSH, there are a couple of steps you have to perform to set things up here.<\/p>\n<p>First, for full functionality, you\u2019ll need to run powershell as an administrator. You may be able to run some commands without this, but there are some odd failures that you&#8217;ll run into.<\/p>\n<p>To be able to execute Db2 commands on a Windows server with a single copy and a single instance, execute:<\/p>\n<pre><code>set-item -path env:Db2CLP -value \"**$**\"<\/code><\/pre>\n<p>This can also be added to your $profile so it is automatically in place when you start PowerShell.<\/p>\n<p>Once you have set this environment variable, you can list the databases available for connection in the database directory, exactly like at a Bash or KSH prompt:<\/p>\n<pre><code>PS C:\\Windows\\system32&gt; db2 list db directory\n\n System Database Directory\n\n Number of entries in the directory = 1\n\nDatabase 1 entry:\n\n Database alias                       = SAMPLE\n Database name                        = SAMPLE\n Local database directory             = C:\n Database release level               = 14.00\n Comment                              =\n Directory entry type                 = Indirect\n Catalog database partition number    = 0\n Alternate server hostname            =\n Alternate server port number         =<\/code><\/pre>\n<p>If the database you are looking for is not listed here, you cannot connect to it. You may have to catalog it if you are connecting from a client, or you may have the wrong instance.<\/p>\n<h2>Using the Db2 Command Line Processor(CLP) in Interactive Mode<\/h2>\n<p>Some people enjoy using the Db2 CLP in interactive mode. I\u2019m not a huge fan of this because I think command history is easier from a standard command line, I like to pipe output to OS commands, and I like to use other OS-level commands without prefixing them with a bang (!). Interactive mode does keep you from having to enter &#8220;db2&#8242; before every command.<\/p>\n<p>To access Db2 in this way, simply start up one of the command lines described above and enter \u201cdb2\u201d and then hit enter. On Windows, this is also accessible as an option in the IBM Db2 file on the programs menu to start a &#8220;Command Line Processor&#8221;.<\/p>\n<p>Once in this interactive mode, you use the same commands you do at a Bash\/KSH\/PowerShell command line, but without the &#8220;db2&#8221; prefix. To list the databases available for connection:<\/p>\n<pre><code>db2 =&gt; list db directory\n\n System Database Directory\n\n Number of entries in the directory = 1\n\nDatabase 1 entry:\n\n Database alias                       = SAMPLE\n Database name                        = SAMPLE\n Local database directory             = \/db2home\/db2inst1\n Database release level               = 14.00\n Comment                              =\n Directory entry type                 = Indirect\n Catalog database partition number    = 0\n Alternate server hostname            =\n Alternate server port number         =\n\ndb2 =&gt;<\/code><\/pre>\n<h2>Using Db2&#8217;s CLPPlus<\/h2>\n<p>There are things to love about CLPPlus and frustrating things as well. It behaves more like Oracle&#8217;s SQLPlus than other Db2 command line interfaces. You can run SQLPlus scripts with it. The use of type 4 JDBC drivers and connection strings can be a bit frustrating for those of us used to local connections. Formatting output is easier with CLPPlus, but there are some difficulties running certain utilities.<\/p>\n<p>To use CLPPlus, you must establish a database connection from an existing command line session. Also, TCPIP must be enabled (in the Db2COMM registry variable), and the SVCENAME DBM cfg parameter must be set to a valid value. Once all that is done, establishing a connection looks like this:<\/p>\n<pre><code>&gt; clpplus -nw ecrooks@localhost:50000\/sample\nCLPPlus: Version 1.6\nCopyright (c) 2009, 2011, IBM CORPORATION.  All rights reserved.\n\nEnter password: **********\n\nDatabase Connection Information :\n---------------------------------\nHostname = localhost\nDatabase server = Db2\/AIX64  SQL10057\nSQL authorization ID = ecrooks\nLocal database alias = SAMPLE\nPort = 50000\n\nSQL&gt;<\/code><\/pre>\n<p>The -nw keeps Db2 from launching clpplus as a separate program requiring X11 forwarding on Linux and UNIX, and instead launches it in the existing window.<\/p>\n<p>Navigating this command line environment takes a bit more practice and work. <a href=\"https:\/\/www.youtube.com\/watch?v=3PndCKWlpJk\" target=\"_blank\" rel=\"noopener noreferrer\">A good video on the basics<\/a> is available from IBM. Several other good resources for clplus are available online:<\/p>\n<ul>\n<li><a href=\"http:\/\/www.db2dean.com\/Previous\/clpPlus.html\" target=\"_blank\" rel=\"noopener noreferrer\">http:\/\/www.db2dean.com\/Previous\/clpPlus.html<\/a><\/li>\n<li><a href=\"http:\/\/www.databasejournal.com\/features\/db2\/article.php\/3868406\/CLPPLUS-IBM-Db2s-New-Command-Line-Processor.htm\" target=\"_blank\" rel=\"noopener noreferrer\">http:\/\/www.databasejournal.com\/features\/db2\/article.php\/3868406\/CLPPLUS-IBM-Db2s-New-Command-Line-Processor.htm<\/a><\/li>\n<li><a href=\"http:\/\/www.idug.org\/p\/bl\/et\/blogaid=334\" target=\"_blank\" rel=\"noopener noreferrer\">http:\/\/www.idug.org\/p\/bl\/et\/blogaid=334<\/a><\/li>\n<\/ul>\n<p><strong>Summary<\/strong><br \/>\nAt XTIVIA, our Db2 DBAs are command line geeks. We prefer the command line to GUIs for administering and working with Db2. The command line is a simple and reliable interface that makes scripting and automation for Db2 easy. Db2 command line environments are simple to set up in just a few steps.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Most Db2 DBAs administer Db2 at the command line. The command line provides a rich and powerful interface with Db2, and has a lot of options. Many other users may wish to access Db2 at the command line as well. Developers and system administrators are just a few of the people who might find the [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":30258,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_et_pb_use_builder":"","_et_pb_old_content":"","_et_gb_content_width":"","content-type":"","footnotes":""},"categories":[4166,17],"tags":[976,18],"class_list":["post-29501","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blog","category-db2","tag-command-line","tag-db2"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.1 (Yoast SEO v27.1.1) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>How to Access IBM DB2 LUW from the Command Line<\/title>\n<meta name=\"description\" content=\"In this blog post we&#039;re going to show you how to access DB2 from the command line from one of our top IBM DB2 LUW DBA experts.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/virtual-dba.com\/blog\/accessing-db2-command-line\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Accessing Db2 from the Command Line\" \/>\n<meta property=\"og:description\" content=\"In this blog post we&#039;re going to show you how to access DB2 from the command line from one of our top IBM DB2 LUW DBA experts.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/virtual-dba.com\/blog\/accessing-db2-command-line\/\" \/>\n<meta property=\"og:site_name\" content=\"Virtual-DBA Remote DBA Services &amp; Support - Certified Database Experts\" \/>\n<meta property=\"article:published_time\" content=\"2017-03-07T14:00:07+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-02-11T01:20:41+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/virtual-dba.com\/media\/ibm-db2-luw-command-line-2.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"557\" \/>\n\t<meta property=\"og:image:height\" content=\"291\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"XTIVIA\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@virtual_dba\" \/>\n<meta name=\"twitter:site\" content=\"@virtual_dba\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"XTIVIA\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/virtual-dba.com\/blog\/accessing-db2-command-line\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/virtual-dba.com\/blog\/accessing-db2-command-line\/\"},\"author\":{\"name\":\"XTIVIA\",\"@id\":\"https:\/\/virtual-dba.com\/#\/schema\/person\/2d86f74bed0c3f1b49100f7fdf7d78d1\"},\"headline\":\"Accessing Db2 from the Command Line\",\"datePublished\":\"2017-03-07T14:00:07+00:00\",\"dateModified\":\"2021-02-11T01:20:41+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/virtual-dba.com\/blog\/accessing-db2-command-line\/\"},\"wordCount\":1245,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/virtual-dba.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/virtual-dba.com\/blog\/accessing-db2-command-line\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/virtual-dba.com\/wp-content\/uploads\/ibm-db2-luw-command-line-2.jpg\",\"keywords\":[\"command line\",\"db2\"],\"articleSection\":[\"Blog\",\"Db2\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/virtual-dba.com\/blog\/accessing-db2-command-line\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/virtual-dba.com\/blog\/accessing-db2-command-line\/\",\"url\":\"https:\/\/virtual-dba.com\/blog\/accessing-db2-command-line\/\",\"name\":\"How to Access IBM DB2 LUW from the Command Line\",\"isPartOf\":{\"@id\":\"https:\/\/virtual-dba.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/virtual-dba.com\/blog\/accessing-db2-command-line\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/virtual-dba.com\/blog\/accessing-db2-command-line\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/virtual-dba.com\/wp-content\/uploads\/ibm-db2-luw-command-line-2.jpg\",\"datePublished\":\"2017-03-07T14:00:07+00:00\",\"dateModified\":\"2021-02-11T01:20:41+00:00\",\"description\":\"In this blog post we're going to show you how to access DB2 from the command line from one of our top IBM DB2 LUW DBA experts.\",\"breadcrumb\":{\"@id\":\"https:\/\/virtual-dba.com\/blog\/accessing-db2-command-line\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/virtual-dba.com\/blog\/accessing-db2-command-line\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/virtual-dba.com\/blog\/accessing-db2-command-line\/#primaryimage\",\"url\":\"https:\/\/virtual-dba.com\/wp-content\/uploads\/ibm-db2-luw-command-line-2.jpg\",\"contentUrl\":\"https:\/\/virtual-dba.com\/wp-content\/uploads\/ibm-db2-luw-command-line-2.jpg\",\"width\":557,\"height\":291,\"caption\":\"ibm-db2-luw-accessing-command-line\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/virtual-dba.com\/blog\/accessing-db2-command-line\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/virtual-dba.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Accessing Db2 from the Command Line\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/virtual-dba.com\/#website\",\"url\":\"https:\/\/virtual-dba.com\/\",\"name\":\"Virtual-DBA Remote DBA Services &amp; Support - Certified Database Experts\",\"description\":\"Remote Database Administration\",\"publisher\":{\"@id\":\"https:\/\/virtual-dba.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/virtual-dba.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/virtual-dba.com\/#organization\",\"name\":\"Virtual-DBA: Remote DBA | Remote Database Administration\",\"alternateName\":\"Virtual-DBA powered by XTIVIA\",\"url\":\"https:\/\/virtual-dba.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/virtual-dba.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/virtual-dba.com\/wp-content\/uploads\/V-DBA-Database-Services-and-Support-Featured-Logo.jpg\",\"contentUrl\":\"https:\/\/virtual-dba.com\/wp-content\/uploads\/V-DBA-Database-Services-and-Support-Featured-Logo.jpg\",\"width\":557,\"height\":291,\"caption\":\"Virtual-DBA: Remote DBA | Remote Database Administration\"},\"image\":{\"@id\":\"https:\/\/virtual-dba.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/x.com\/virtual_dba\",\"https:\/\/www.linkedin.com\/showcase\/36220649\/\",\"https:\/\/www.youtube.com\/channel\/UCx3AIeUQ2ziTLKZSJDZ-SEg\"],\"description\":\"Eliminate database downtime and spiraling costs with XTIVIA\u2019s Virtual-DBA. In today\u2019s always-on business world, gaps in 24x7 on-call DBA support, neglected maintenance and security, or a stretched team struggling with overwhelming workloads can lead to costly disruptions and threaten business continuity. XTIVIA\u2019s Virtual-DBA provides the immediate, expert database administration you need, exactly when you need it, ensuring optimal performance, ironclad security, and significant cost savings without the burden of expanding your in-house team. The goal of Virtual-DBA is to provide a cost-effective solution for organizations seeking to optimize the security, management, maintenance, availability, and performance of their critical business systems, whether self-managed or cloud-managed (e.g., AWS RDS, Azure SQL Database). We accomplish this through a comprehensive remote DBA service offering designed specifically to meet the Oracle\u00ae, DB2\u00ae, Informix\u00ae, MySQL\u2122, PostgreSQL\u00ae, MongoDB\u00ae, MariaDB, and Microsoft SQL Server\u00ae, CockroachDB, Databricks, AWS, and Azure needs of our clients.\",\"email\":\"info@xtivia.com\",\"telephone\":\"8886853101\",\"legalName\":\"XTIVIA, Inc\",\"foundingDate\":\"1992-05-01\",\"numberOfEmployees\":{\"@type\":\"QuantitativeValue\",\"minValue\":\"201\",\"maxValue\":\"500\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/virtual-dba.com\/#\/schema\/person\/2d86f74bed0c3f1b49100f7fdf7d78d1\",\"name\":\"XTIVIA\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/virtual-dba.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/0d3648a00e319a37cf8d6d19f762acfbbb4fd0320fd8a6d6b1e64f44a2a6f259?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/0d3648a00e319a37cf8d6d19f762acfbbb4fd0320fd8a6d6b1e64f44a2a6f259?s=96&d=mm&r=g\",\"caption\":\"XTIVIA\"},\"url\":\"https:\/\/virtual-dba.com\/author\/xtivia\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"How to Access IBM DB2 LUW from the Command Line","description":"In this blog post we're going to show you how to access DB2 from the command line from one of our top IBM DB2 LUW DBA experts.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/virtual-dba.com\/blog\/accessing-db2-command-line\/","og_locale":"en_US","og_type":"article","og_title":"Accessing Db2 from the Command Line","og_description":"In this blog post we're going to show you how to access DB2 from the command line from one of our top IBM DB2 LUW DBA experts.","og_url":"https:\/\/virtual-dba.com\/blog\/accessing-db2-command-line\/","og_site_name":"Virtual-DBA Remote DBA Services &amp; Support - Certified Database Experts","article_published_time":"2017-03-07T14:00:07+00:00","article_modified_time":"2021-02-11T01:20:41+00:00","og_image":[{"width":557,"height":291,"url":"https:\/\/virtual-dba.com\/media\/ibm-db2-luw-command-line-2.jpg","type":"image\/jpeg"}],"author":"XTIVIA","twitter_card":"summary_large_image","twitter_creator":"@virtual_dba","twitter_site":"@virtual_dba","twitter_misc":{"Written by":"XTIVIA","Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/virtual-dba.com\/blog\/accessing-db2-command-line\/#article","isPartOf":{"@id":"https:\/\/virtual-dba.com\/blog\/accessing-db2-command-line\/"},"author":{"name":"XTIVIA","@id":"https:\/\/virtual-dba.com\/#\/schema\/person\/2d86f74bed0c3f1b49100f7fdf7d78d1"},"headline":"Accessing Db2 from the Command Line","datePublished":"2017-03-07T14:00:07+00:00","dateModified":"2021-02-11T01:20:41+00:00","mainEntityOfPage":{"@id":"https:\/\/virtual-dba.com\/blog\/accessing-db2-command-line\/"},"wordCount":1245,"commentCount":0,"publisher":{"@id":"https:\/\/virtual-dba.com\/#organization"},"image":{"@id":"https:\/\/virtual-dba.com\/blog\/accessing-db2-command-line\/#primaryimage"},"thumbnailUrl":"https:\/\/virtual-dba.com\/wp-content\/uploads\/ibm-db2-luw-command-line-2.jpg","keywords":["command line","db2"],"articleSection":["Blog","Db2"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/virtual-dba.com\/blog\/accessing-db2-command-line\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/virtual-dba.com\/blog\/accessing-db2-command-line\/","url":"https:\/\/virtual-dba.com\/blog\/accessing-db2-command-line\/","name":"How to Access IBM DB2 LUW from the Command Line","isPartOf":{"@id":"https:\/\/virtual-dba.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/virtual-dba.com\/blog\/accessing-db2-command-line\/#primaryimage"},"image":{"@id":"https:\/\/virtual-dba.com\/blog\/accessing-db2-command-line\/#primaryimage"},"thumbnailUrl":"https:\/\/virtual-dba.com\/wp-content\/uploads\/ibm-db2-luw-command-line-2.jpg","datePublished":"2017-03-07T14:00:07+00:00","dateModified":"2021-02-11T01:20:41+00:00","description":"In this blog post we're going to show you how to access DB2 from the command line from one of our top IBM DB2 LUW DBA experts.","breadcrumb":{"@id":"https:\/\/virtual-dba.com\/blog\/accessing-db2-command-line\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/virtual-dba.com\/blog\/accessing-db2-command-line\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/virtual-dba.com\/blog\/accessing-db2-command-line\/#primaryimage","url":"https:\/\/virtual-dba.com\/wp-content\/uploads\/ibm-db2-luw-command-line-2.jpg","contentUrl":"https:\/\/virtual-dba.com\/wp-content\/uploads\/ibm-db2-luw-command-line-2.jpg","width":557,"height":291,"caption":"ibm-db2-luw-accessing-command-line"},{"@type":"BreadcrumbList","@id":"https:\/\/virtual-dba.com\/blog\/accessing-db2-command-line\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/virtual-dba.com\/"},{"@type":"ListItem","position":2,"name":"Accessing Db2 from the Command Line"}]},{"@type":"WebSite","@id":"https:\/\/virtual-dba.com\/#website","url":"https:\/\/virtual-dba.com\/","name":"Virtual-DBA Remote DBA Services &amp; Support - Certified Database Experts","description":"Remote Database Administration","publisher":{"@id":"https:\/\/virtual-dba.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/virtual-dba.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/virtual-dba.com\/#organization","name":"Virtual-DBA: Remote DBA | Remote Database Administration","alternateName":"Virtual-DBA powered by XTIVIA","url":"https:\/\/virtual-dba.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/virtual-dba.com\/#\/schema\/logo\/image\/","url":"https:\/\/virtual-dba.com\/wp-content\/uploads\/V-DBA-Database-Services-and-Support-Featured-Logo.jpg","contentUrl":"https:\/\/virtual-dba.com\/wp-content\/uploads\/V-DBA-Database-Services-and-Support-Featured-Logo.jpg","width":557,"height":291,"caption":"Virtual-DBA: Remote DBA | Remote Database Administration"},"image":{"@id":"https:\/\/virtual-dba.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/x.com\/virtual_dba","https:\/\/www.linkedin.com\/showcase\/36220649\/","https:\/\/www.youtube.com\/channel\/UCx3AIeUQ2ziTLKZSJDZ-SEg"],"description":"Eliminate database downtime and spiraling costs with XTIVIA\u2019s Virtual-DBA. In today\u2019s always-on business world, gaps in 24x7 on-call DBA support, neglected maintenance and security, or a stretched team struggling with overwhelming workloads can lead to costly disruptions and threaten business continuity. XTIVIA\u2019s Virtual-DBA provides the immediate, expert database administration you need, exactly when you need it, ensuring optimal performance, ironclad security, and significant cost savings without the burden of expanding your in-house team. The goal of Virtual-DBA is to provide a cost-effective solution for organizations seeking to optimize the security, management, maintenance, availability, and performance of their critical business systems, whether self-managed or cloud-managed (e.g., AWS RDS, Azure SQL Database). We accomplish this through a comprehensive remote DBA service offering designed specifically to meet the Oracle\u00ae, DB2\u00ae, Informix\u00ae, MySQL\u2122, PostgreSQL\u00ae, MongoDB\u00ae, MariaDB, and Microsoft SQL Server\u00ae, CockroachDB, Databricks, AWS, and Azure needs of our clients.","email":"info@xtivia.com","telephone":"8886853101","legalName":"XTIVIA, Inc","foundingDate":"1992-05-01","numberOfEmployees":{"@type":"QuantitativeValue","minValue":"201","maxValue":"500"}},{"@type":"Person","@id":"https:\/\/virtual-dba.com\/#\/schema\/person\/2d86f74bed0c3f1b49100f7fdf7d78d1","name":"XTIVIA","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/virtual-dba.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/0d3648a00e319a37cf8d6d19f762acfbbb4fd0320fd8a6d6b1e64f44a2a6f259?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/0d3648a00e319a37cf8d6d19f762acfbbb4fd0320fd8a6d6b1e64f44a2a6f259?s=96&d=mm&r=g","caption":"XTIVIA"},"url":"https:\/\/virtual-dba.com\/author\/xtivia\/"}]}},"_links":{"self":[{"href":"https:\/\/virtual-dba.com\/wp-json\/wp\/v2\/posts\/29501","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/virtual-dba.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/virtual-dba.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/virtual-dba.com\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/virtual-dba.com\/wp-json\/wp\/v2\/comments?post=29501"}],"version-history":[{"count":0,"href":"https:\/\/virtual-dba.com\/wp-json\/wp\/v2\/posts\/29501\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/virtual-dba.com\/wp-json\/wp\/v2\/media\/30258"}],"wp:attachment":[{"href":"https:\/\/virtual-dba.com\/wp-json\/wp\/v2\/media?parent=29501"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/virtual-dba.com\/wp-json\/wp\/v2\/categories?post=29501"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/virtual-dba.com\/wp-json\/wp\/v2\/tags?post=29501"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}