<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>connection &#8211; Database Research &amp; Development</title>
	<atom:link href="https://www.dbrnd.com/tag/connection/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.dbrnd.com</link>
	<description>BIGData &#124; NoSQL &#124; MSSQL &#124; MySQL &#124; PostgreSQL</description>
	<lastBuildDate>Tue, 21 Nov 2017 06:04:58 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.0.6</generator>
	<item>
		<title>SQL Server: A network-related or instance-specific error occurred while establishing a connection</title>
		<link>https://www.dbrnd.com/2017/04/sql-server-a-network-related-or-instance-specific-error-occurred-while-establishing-a-connection/</link>
		
		<dc:creator><![CDATA[Anvesh Patel]]></dc:creator>
		<pubDate>Tue, 25 Apr 2017 16:16:35 +0000</pubDate>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Anvesh Patel]]></category>
		<category><![CDATA[connection]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[database research and development]]></category>
		<category><![CDATA[dbrnd]]></category>
		<category><![CDATA[Network related]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Server Administrator]]></category>
		<category><![CDATA[SQL Server Error]]></category>
		<category><![CDATA[SQL Server Monitoring]]></category>
		<category><![CDATA[SQL Server Performance Tuning]]></category>
		<category><![CDATA[SQL Server Programming]]></category>
		<category><![CDATA[SQL Server Tips and Tricks]]></category>
		<category><![CDATA[TSQL]]></category>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=5068</guid>

					<description><![CDATA[SQL Server Error: Cannot connect to .\SQL Server &#8220;A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 &#8211; Error [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2017%2F04%2Fsql-server-a-network-related-or-instance-specific-error-occurred-while-establishing-a-connection%2F&amp;linkname=SQL%20Server%3A%20A%20network-related%20or%20instance-specific%20error%20occurred%20while%20establishing%20a%20connection" title="Facebook" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_twitter" href="https://www.addtoany.com/add_to/twitter?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2017%2F04%2Fsql-server-a-network-related-or-instance-specific-error-occurred-while-establishing-a-connection%2F&amp;linkname=SQL%20Server%3A%20A%20network-related%20or%20instance-specific%20error%20occurred%20while%20establishing%20a%20connection" title="Twitter" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_linkedin" href="https://www.addtoany.com/add_to/linkedin?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2017%2F04%2Fsql-server-a-network-related-or-instance-specific-error-occurred-while-establishing-a-connection%2F&amp;linkname=SQL%20Server%3A%20A%20network-related%20or%20instance-specific%20error%20occurred%20while%20establishing%20a%20connection" title="LinkedIn" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_pinterest" href="https://www.addtoany.com/add_to/pinterest?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2017%2F04%2Fsql-server-a-network-related-or-instance-specific-error-occurred-while-establishing-a-connection%2F&amp;linkname=SQL%20Server%3A%20A%20network-related%20or%20instance-specific%20error%20occurred%20while%20establishing%20a%20connection" title="Pinterest" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_reddit" href="https://www.addtoany.com/add_to/reddit?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2017%2F04%2Fsql-server-a-network-related-or-instance-specific-error-occurred-while-establishing-a-connection%2F&amp;linkname=SQL%20Server%3A%20A%20network-related%20or%20instance-specific%20error%20occurred%20while%20establishing%20a%20connection" title="Reddit" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_pocket" href="https://www.addtoany.com/add_to/pocket?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2017%2F04%2Fsql-server-a-network-related-or-instance-specific-error-occurred-while-establishing-a-connection%2F&amp;linkname=SQL%20Server%3A%20A%20network-related%20or%20instance-specific%20error%20occurred%20while%20establishing%20a%20connection" title="Pocket" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fwww.dbrnd.com%2F2017%2F04%2Fsql-server-a-network-related-or-instance-specific-error-occurred-while-establishing-a-connection%2F&#038;title=SQL%20Server%3A%20A%20network-related%20or%20instance-specific%20error%20occurred%20while%20establishing%20a%20connection" data-a2a-url="https://www.dbrnd.com/2017/04/sql-server-a-network-related-or-instance-specific-error-occurred-while-establishing-a-connection/" data-a2a-title="SQL Server: A network-related or instance-specific error occurred while establishing a connection"></a></p><p>SQL Server Error: Cannot connect to .\SQL Server<br />
&#8220;A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 &#8211; Error Locating Server/Instance Specified) (Microsoft SQL Server, Error: -1)&#8221;</p>
<p>The above error is a very common error in SQL Server. You can find thousand of articles on this error, but still, I am sharing aggregated solution for this error.</p>
<p><strong>The solutions are:</strong></p>
<ul>
<li>SQL Server service status should Running, go to Start -&gt; All Programs -&gt; Microsoft SQL Server -&gt; Configuration Tools -&gt; SQL Server Configuration Manager -&gt; SQL Server Services</li>
<li>Check for SQL Server Browser Service, which should be running</li>
<li>Enable UDP traffic to port 1434 because SQL Server Browser Service runs on it</li>
<li>Windows Firewall should allow the incoming requests of UDP Port 1434</li>
<li>Enable TCP/IP in SQL Server Configuration, go to Start -&gt; All Programs -&gt; Microsoft SQL Server -&gt; Configuration Tools -&gt; SQL Server Configuration Manager -&gt; Select TCP/IP</li>
<li>All remote connections, go to Start -&gt; All Programs -&gt; SQL Server -&gt; Configuration Tools -&gt; SQL Server Surface Area Configuration</li>
</ul>
<p>You must restart SQL Server Services after changes.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>PostgreSQL: The Internal path of a Query Execution to Obtain a Result</title>
		<link>https://www.dbrnd.com/2016/08/postgresql-the-internal-path-of-a-query-execution-to-obtain-a-result-connection-parser-planner-optimizer-executor/</link>
		
		<dc:creator><![CDATA[Anvesh Patel]]></dc:creator>
		<pubDate>Tue, 09 Aug 2016 05:38:29 +0000</pubDate>
				<category><![CDATA[PostgreSQL]]></category>
		<category><![CDATA[Anvesh Patel]]></category>
		<category><![CDATA[connection]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[database research and development]]></category>
		<category><![CDATA[dbrnd]]></category>
		<category><![CDATA[planner]]></category>
		<category><![CDATA[plpgsql]]></category>
		<category><![CDATA[Postgres Query]]></category>
		<category><![CDATA[postgresql]]></category>
		<category><![CDATA[PostgreSQL Administrator]]></category>
		<category><![CDATA[PostgreSQL Error]]></category>
		<category><![CDATA[PostgreSQL Programming]]></category>
		<category><![CDATA[PostgreSQL Tips and Tricks]]></category>
		<category><![CDATA[query executor]]></category>
		<category><![CDATA[query parser]]></category>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=2255</guid>

					<description><![CDATA[I am going to share short notes on, how a query is internally processed in PostgreSQL? There are different stages involved in the PostgreSQL query execution process and I will explain short notes on each and later I will try to write in details for each one of it. Connection: The connection has to be [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F08%2Fpostgresql-the-internal-path-of-a-query-execution-to-obtain-a-result-connection-parser-planner-optimizer-executor%2F&amp;linkname=PostgreSQL%3A%20The%20Internal%20path%20of%20a%20Query%20Execution%20to%20Obtain%20a%20Result" title="Facebook" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_twitter" href="https://www.addtoany.com/add_to/twitter?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F08%2Fpostgresql-the-internal-path-of-a-query-execution-to-obtain-a-result-connection-parser-planner-optimizer-executor%2F&amp;linkname=PostgreSQL%3A%20The%20Internal%20path%20of%20a%20Query%20Execution%20to%20Obtain%20a%20Result" title="Twitter" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_linkedin" href="https://www.addtoany.com/add_to/linkedin?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F08%2Fpostgresql-the-internal-path-of-a-query-execution-to-obtain-a-result-connection-parser-planner-optimizer-executor%2F&amp;linkname=PostgreSQL%3A%20The%20Internal%20path%20of%20a%20Query%20Execution%20to%20Obtain%20a%20Result" title="LinkedIn" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_pinterest" href="https://www.addtoany.com/add_to/pinterest?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F08%2Fpostgresql-the-internal-path-of-a-query-execution-to-obtain-a-result-connection-parser-planner-optimizer-executor%2F&amp;linkname=PostgreSQL%3A%20The%20Internal%20path%20of%20a%20Query%20Execution%20to%20Obtain%20a%20Result" title="Pinterest" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_reddit" href="https://www.addtoany.com/add_to/reddit?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F08%2Fpostgresql-the-internal-path-of-a-query-execution-to-obtain-a-result-connection-parser-planner-optimizer-executor%2F&amp;linkname=PostgreSQL%3A%20The%20Internal%20path%20of%20a%20Query%20Execution%20to%20Obtain%20a%20Result" title="Reddit" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_pocket" href="https://www.addtoany.com/add_to/pocket?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F08%2Fpostgresql-the-internal-path-of-a-query-execution-to-obtain-a-result-connection-parser-planner-optimizer-executor%2F&amp;linkname=PostgreSQL%3A%20The%20Internal%20path%20of%20a%20Query%20Execution%20to%20Obtain%20a%20Result" title="Pocket" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F08%2Fpostgresql-the-internal-path-of-a-query-execution-to-obtain-a-result-connection-parser-planner-optimizer-executor%2F&#038;title=PostgreSQL%3A%20The%20Internal%20path%20of%20a%20Query%20Execution%20to%20Obtain%20a%20Result" data-a2a-url="https://www.dbrnd.com/2016/08/postgresql-the-internal-path-of-a-query-execution-to-obtain-a-result-connection-parser-planner-optimizer-executor/" data-a2a-title="PostgreSQL: The Internal path of a Query Execution to Obtain a Result"></a></p><p><strong>I am going to share short notes on, how a query is internally processed in PostgreSQL?</strong></p>
<p><em>There are different stages involved in the PostgreSQL query execution process and I will explain short notes on each and later I will try to write in details for each one of it. </em></p>
<blockquote><p><strong>Connection:</strong> The connection has to be established from an application program to the PostgreSQL Server. </p></blockquote>
<blockquote><p><strong>Parser:</strong> It creates a query tree after checking of all the query syntax which is sent by an application. </p></blockquote>
<blockquote><p><strong>Rewrite System:</strong> It takes the query tree from the parser and check for any other rules and modification. For example, if the query contains a VIEW, it has to modify the query to select a base table which is related to that view. </p></blockquote>
<blockquote><p><strong>Planner or Optimizer:</strong> It creates all possible query paths and after that it chooses one of the cheapest path for query execution.<br />
For example, It finds two paths, one path is the table scan without an index and second path is the index scan with the indexes. It is estimated  and executes the best path. </p></blockquote>
<blockquote><p><strong>Executor:</strong> It takes the plan from the Planner and extract the required set of the rows. Internally, it manages the pipeline mechanism and one by one it takes the Query-Plan and delivers the required rows.</p></blockquote>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>MySQL: Create FEDERATED Table to SELECT data from another server (Part 3/4)</title>
		<link>https://www.dbrnd.com/2016/01/mysql-create-federated-table-to-select-data-from-another-server-part-3/</link>
					<comments>https://www.dbrnd.com/2016/01/mysql-create-federated-table-to-select-data-from-another-server-part-3/#comments</comments>
		
		<dc:creator><![CDATA[Anvesh Patel]]></dc:creator>
		<pubDate>Sun, 31 Jan 2016 19:42:02 +0000</pubDate>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Anvesh Patel]]></category>
		<category><![CDATA[connection]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[database research and development]]></category>
		<category><![CDATA[dbrnd]]></category>
		<category><![CDATA[FEDERATED Engine]]></category>
		<category><![CDATA[MySQL Command]]></category>
		<category><![CDATA[MySQL Database Administrator]]></category>
		<category><![CDATA[MySQL Database Designing]]></category>
		<category><![CDATA[MySQL Database Programming]]></category>
		<category><![CDATA[MySQL Error]]></category>
		<category><![CDATA[MySQL Performance Tunning]]></category>
		<category><![CDATA[MySQL Query]]></category>
		<category><![CDATA[MySQL Tips and Tricks]]></category>
		<category><![CDATA[remote]]></category>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=1433</guid>

					<description><![CDATA[In the previous post, we have seen a basic theory and configuration of FEDERATED table. In this post, I am going to create a FEDERATED table which is used to SELECT data from another MySQL Server. How to create FEDERATED Tables? Assume that we have two running servers, either both on the same host or [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F01%2Fmysql-create-federated-table-to-select-data-from-another-server-part-3%2F&amp;linkname=MySQL%3A%20Create%20FEDERATED%20Table%20to%20SELECT%20data%20from%20another%20server%20%28Part%203%2F4%29" title="Facebook" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_twitter" href="https://www.addtoany.com/add_to/twitter?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F01%2Fmysql-create-federated-table-to-select-data-from-another-server-part-3%2F&amp;linkname=MySQL%3A%20Create%20FEDERATED%20Table%20to%20SELECT%20data%20from%20another%20server%20%28Part%203%2F4%29" title="Twitter" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_linkedin" href="https://www.addtoany.com/add_to/linkedin?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F01%2Fmysql-create-federated-table-to-select-data-from-another-server-part-3%2F&amp;linkname=MySQL%3A%20Create%20FEDERATED%20Table%20to%20SELECT%20data%20from%20another%20server%20%28Part%203%2F4%29" title="LinkedIn" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_pinterest" href="https://www.addtoany.com/add_to/pinterest?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F01%2Fmysql-create-federated-table-to-select-data-from-another-server-part-3%2F&amp;linkname=MySQL%3A%20Create%20FEDERATED%20Table%20to%20SELECT%20data%20from%20another%20server%20%28Part%203%2F4%29" title="Pinterest" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_reddit" href="https://www.addtoany.com/add_to/reddit?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F01%2Fmysql-create-federated-table-to-select-data-from-another-server-part-3%2F&amp;linkname=MySQL%3A%20Create%20FEDERATED%20Table%20to%20SELECT%20data%20from%20another%20server%20%28Part%203%2F4%29" title="Reddit" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_pocket" href="https://www.addtoany.com/add_to/pocket?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F01%2Fmysql-create-federated-table-to-select-data-from-another-server-part-3%2F&amp;linkname=MySQL%3A%20Create%20FEDERATED%20Table%20to%20SELECT%20data%20from%20another%20server%20%28Part%203%2F4%29" title="Pocket" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F01%2Fmysql-create-federated-table-to-select-data-from-another-server-part-3%2F&#038;title=MySQL%3A%20Create%20FEDERATED%20Table%20to%20SELECT%20data%20from%20another%20server%20%28Part%203%2F4%29" data-a2a-url="https://www.dbrnd.com/2016/01/mysql-create-federated-table-to-select-data-from-another-server-part-3/" data-a2a-title="MySQL: Create FEDERATED Table to SELECT data from another server (Part 3/4)"></a></p><p>In the previous post, we have seen a basic theory and configuration of FEDERATED table. In this post, I am going to create a FEDERATED table which is used to SELECT data from another MySQL Server.</p>
<p><strong>How to create FEDERATED Tables?</strong></p>
<p>Assume that we have two running servers, either both on the same host or different hosts.</p>
<blockquote><p><strong>For example:</strong></p>
<p>Server &#8211; A108 (Remote MySQL Server)<br />
Server &#8211; B108 (Local MySQL Server)</p></blockquote>
<blockquote><p>We need to execute the SELECT command from Server B108 and fetching data from Server A108.<br />
Here, Server A108 is a remote server and Server B108 is a local server. </p></blockquote>
<p><strong>Now create a sample table in Server A108.</strong></p>
<pre class="crayon-plain-tag">CREATE TABLE tbl_RemoteTable 
(
    ID integer
    ,Name VARCHAR(255)
) 
ENGINE=InnoDB;</pre> </p>
<p>Now, create a FEDERATED table in Server B108 to SELECT data from Server A108.<br />
You have to specify FEDERATED engine with remote CONNECTION information. </p>
<pre class="crayon-plain-tag">CREATE TABLE tbl_RemoteTable 
(
    ID integer
    ,Name VARCHAR(255)
) 
ENGINE=FEDERATED
CONNECTION='mysql://root:root@localhost:3306/B108/tbl_RemoteTable';</pre> </p>
<p>As you can see, I created FEDERATED table into Local Server B108 using the connection information of Remote Server A108.</p>
<p>You can access this table like any other table, and if any data insert or delete in remote Table, it automatically updates here because this is a virtual table.<br />
<strong><br />
Below are different format of connection strings:</strong></p>
<pre class="crayon-plain-tag">CONNECTION='mysql://username:password@hostname:port/database/tablename'
CONNECTION='mysql://username@hostname/database/tablename'
CONNECTION='mysql://username:password@hostname/database/tablename'</pre> </p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.dbrnd.com/2016/01/mysql-create-federated-table-to-select-data-from-another-server-part-3/feed/</wfw:commentRss>
			<slash:comments>5</slash:comments>
		
		
			</item>
		<item>
		<title>Script to Find and Kill Running Process in MySQL</title>
		<link>https://www.dbrnd.com/2015/08/show-find-and-kill-running-process-in-mysql/</link>
					<comments>https://www.dbrnd.com/2015/08/show-find-and-kill-running-process-in-mysql/#comments</comments>
		
		<dc:creator><![CDATA[Anvesh Patel]]></dc:creator>
		<pubDate>Fri, 14 Aug 2015 19:40:03 +0000</pubDate>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[MySQL DBA Script]]></category>
		<category><![CDATA[Anvesh Patel]]></category>
		<category><![CDATA[connection]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[kill]]></category>
		<category><![CDATA[MySQL Command]]></category>
		<category><![CDATA[MySQL Database Administrator]]></category>
		<category><![CDATA[MySQL Database Designing]]></category>
		<category><![CDATA[MySQL Database Programming]]></category>
		<category><![CDATA[MySQL Error]]></category>
		<category><![CDATA[MySQL Performance Tunning]]></category>
		<category><![CDATA[MySQL Query]]></category>
		<category><![CDATA[MySQL Tips and Tricks]]></category>
		<category><![CDATA[process]]></category>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=367</guid>

					<description><![CDATA[In this post, I am sharing different ways to show the currently running processes and sessions in MySQL. Also, I am sharing a command for killing any running or sleep process. When DBA is monitoring the database, it requires to find and kill some unwanted processes of MySQL Server. How to find running processes or [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2015%2F08%2Fshow-find-and-kill-running-process-in-mysql%2F&amp;linkname=Script%20to%20Find%20and%20Kill%20Running%20Process%20in%20MySQL" title="Facebook" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_twitter" href="https://www.addtoany.com/add_to/twitter?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2015%2F08%2Fshow-find-and-kill-running-process-in-mysql%2F&amp;linkname=Script%20to%20Find%20and%20Kill%20Running%20Process%20in%20MySQL" title="Twitter" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_linkedin" href="https://www.addtoany.com/add_to/linkedin?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2015%2F08%2Fshow-find-and-kill-running-process-in-mysql%2F&amp;linkname=Script%20to%20Find%20and%20Kill%20Running%20Process%20in%20MySQL" title="LinkedIn" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_pinterest" href="https://www.addtoany.com/add_to/pinterest?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2015%2F08%2Fshow-find-and-kill-running-process-in-mysql%2F&amp;linkname=Script%20to%20Find%20and%20Kill%20Running%20Process%20in%20MySQL" title="Pinterest" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_reddit" href="https://www.addtoany.com/add_to/reddit?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2015%2F08%2Fshow-find-and-kill-running-process-in-mysql%2F&amp;linkname=Script%20to%20Find%20and%20Kill%20Running%20Process%20in%20MySQL" title="Reddit" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_pocket" href="https://www.addtoany.com/add_to/pocket?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2015%2F08%2Fshow-find-and-kill-running-process-in-mysql%2F&amp;linkname=Script%20to%20Find%20and%20Kill%20Running%20Process%20in%20MySQL" title="Pocket" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fwww.dbrnd.com%2F2015%2F08%2Fshow-find-and-kill-running-process-in-mysql%2F&#038;title=Script%20to%20Find%20and%20Kill%20Running%20Process%20in%20MySQL" data-a2a-url="https://www.dbrnd.com/2015/08/show-find-and-kill-running-process-in-mysql/" data-a2a-title="Script to Find and Kill Running Process in MySQL"></a></p><p>In this post, I am sharing different ways to show the currently running processes and sessions in MySQL. </p>
<p>Also, I am sharing a command for killing any running or sleep process. </p>
<p>When DBA is monitoring the database, it requires to find and kill some unwanted processes of MySQL Server.</p>
<p><strong>How to find running processes or sessions?</strong></p>
<p><strong>Below are three different ways:</strong></p>
<pre class="crayon-plain-tag">SELECT * 
FROM INFORMATION_SCHEMA.PROCESSLIST 
WHERE COMMAND != 'Sleep';</pre>
<pre class="crayon-plain-tag">show  processlist;</pre>
<pre class="crayon-plain-tag">/*Execute using MySQL Console*/
mysqladmin -u root -p -i 1 processlist;</pre>
<p><strong>How to kill running processes or sessions?</strong><br />
<pre class="crayon-plain-tag">KILL CONNECTION &lt;processid&gt;</pre>
]]></content:encoded>
					
					<wfw:commentRss>https://www.dbrnd.com/2015/08/show-find-and-kill-running-process-in-mysql/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>PostgreSQL [Video]: Cross Database Queries using DbLink Extension</title>
		<link>https://www.dbrnd.com/2015/05/postgresql-cross-database-queries-using/</link>
					<comments>https://www.dbrnd.com/2015/05/postgresql-cross-database-queries-using/#comments</comments>
		
		<dc:creator><![CDATA[Anvesh Patel]]></dc:creator>
		<pubDate>Fri, 22 May 2015 16:37:08 +0000</pubDate>
				<category><![CDATA[PostgreSQL]]></category>
		<category><![CDATA[PostgreSQL Video]]></category>
		<category><![CDATA[Video Help]]></category>
		<category><![CDATA[Anvesh Patel]]></category>
		<category><![CDATA[connection]]></category>
		<category><![CDATA[cross database query]]></category>
		<category><![CDATA[database research and development]]></category>
		<category><![CDATA[dblink]]></category>
		<category><![CDATA[dblink_connect]]></category>
		<category><![CDATA[foreign data wrapper]]></category>
		<category><![CDATA[plpgsql]]></category>
		<category><![CDATA[postgresql]]></category>
		<category><![CDATA[PostgreSQL Administrator]]></category>
		<category><![CDATA[PostgreSQL Tips and Tricks]]></category>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=184</guid>

					<description><![CDATA[How we can perform cross database queries in PostgreSQL? The different RDBMS systems like Microsoft SQL Server, MySQL, You can select data from one database to another database. What we are doing is we simply select data using database_name.schema.table. In the PostgreSQL, you cannot perform the cross database query like other database technology. In this [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2015%2F05%2Fpostgresql-cross-database-queries-using%2F&amp;linkname=PostgreSQL%20%5BVideo%5D%3A%20Cross%20Database%20Queries%20using%20DbLink%20Extension" title="Facebook" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_twitter" href="https://www.addtoany.com/add_to/twitter?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2015%2F05%2Fpostgresql-cross-database-queries-using%2F&amp;linkname=PostgreSQL%20%5BVideo%5D%3A%20Cross%20Database%20Queries%20using%20DbLink%20Extension" title="Twitter" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_linkedin" href="https://www.addtoany.com/add_to/linkedin?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2015%2F05%2Fpostgresql-cross-database-queries-using%2F&amp;linkname=PostgreSQL%20%5BVideo%5D%3A%20Cross%20Database%20Queries%20using%20DbLink%20Extension" title="LinkedIn" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_pinterest" href="https://www.addtoany.com/add_to/pinterest?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2015%2F05%2Fpostgresql-cross-database-queries-using%2F&amp;linkname=PostgreSQL%20%5BVideo%5D%3A%20Cross%20Database%20Queries%20using%20DbLink%20Extension" title="Pinterest" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_reddit" href="https://www.addtoany.com/add_to/reddit?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2015%2F05%2Fpostgresql-cross-database-queries-using%2F&amp;linkname=PostgreSQL%20%5BVideo%5D%3A%20Cross%20Database%20Queries%20using%20DbLink%20Extension" title="Reddit" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_pocket" href="https://www.addtoany.com/add_to/pocket?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2015%2F05%2Fpostgresql-cross-database-queries-using%2F&amp;linkname=PostgreSQL%20%5BVideo%5D%3A%20Cross%20Database%20Queries%20using%20DbLink%20Extension" title="Pocket" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fwww.dbrnd.com%2F2015%2F05%2Fpostgresql-cross-database-queries-using%2F&#038;title=PostgreSQL%20%5BVideo%5D%3A%20Cross%20Database%20Queries%20using%20DbLink%20Extension" data-a2a-url="https://www.dbrnd.com/2015/05/postgresql-cross-database-queries-using/" data-a2a-title="PostgreSQL [Video]: Cross Database Queries using DbLink Extension"></a></p><p><iframe width="849" height="478" src="https://www.youtube.com/embed/-vk712oS0VM?feature=oembed" frameborder="0" gesture="media" allowfullscreen></iframe></p>
<p><strong>How we can perform cross database queries in PostgreSQL?</strong></p>
<blockquote><p>The different RDBMS systems like Microsoft SQL Server, MySQL, You can select data from one database to another database. What we are doing is we simply select data using database_name.schema.table.<br />
In the PostgreSQL, you cannot perform the cross database query like other database technology.</p></blockquote>
<p>In this post, I am going to demonstrate DbLink extension of PostgreSQL which is used to connect one database to another database.</p>
<blockquote><p>Using DbLink extension, you can perform cross database queries in the PostgreSQL.</p></blockquote>
<p>In this demonstration, I have created two different databases. Respective names &#8220;Database_One&#8221; and &#8220;Database_Two&#8221;.</p>
<blockquote><p>I created one sample table into &#8220;Database_One&#8221; and using DbLink, going to SELECT this table from &#8220;Database_Two&#8221;.<br />
Now, We have to configure DbLink extension in &#8220;Database_Two&#8221;.</p></blockquote>
<p><strong>Below is a full demonstration of this:</strong><br />
<strong>Step 1: Create First sample table and database:</strong></p><pre class="crayon-plain-tag">CREATE DATABASE Database_One;

CREATE TABLE public.tbl_Employee
(
	EmpID INT PRIMARY KEY
	,EmpName CHARACTER VARYING
	,EmpGender CHAR(1)
);

INSERT INTO public.tbl_Employee
VALUES
(1,'Anvesh','M')
,(2,'Neevan','M')
,(3,'Martin','M');</pre><p>
<strong>Step 2: Create Second sample table and database:<br />
</strong></p><pre class="crayon-plain-tag">CREATE DATABASE Database_Two;</pre><p>
<strong>Now, I am going to SELECT Databasee_One data from Database_Two so we have to execute all below scripts on Database_Two to configure DbLink extension for cross database queries.</strong></p>
<hr />
<p><strong>Step 1: Connect to Database_Two:</strong></p>
<p><strong>Step 2: Install / Create DBLink Extenstion:</strong></p><pre class="crayon-plain-tag">CREATE EXTENSION dblink;</pre><p>
<p><strong>Step 3: Verify the system tables of DBLink:</strong></p><pre class="crayon-plain-tag">SELECT pg_namespace.nspname, pg_proc.proname 
FROM pg_proc, pg_namespace 
WHERE pg_proc.pronamespace=pg_namespace.oid 
   AND pg_proc.proname LIKE '%dblink%';</pre><p>
<p><strong>Step 4: Test the connection for Database_One:</strong></p>
<pre class="crayon-plain-tag">SELECT dblink_connect('host=localhost user=dbrnd password=dbrnd dbname=database_one');</pre>
<p><strong>Step 5: Create foreign data wrapper and server for global authentication.<br />
You can use this server object for cross database queries:</strong></p><pre class="crayon-plain-tag">CREATE FOREIGN DATA WRAPPER dbrnd VALIDATOR postgresql_fdw_validator;
CREATE SERVER demodbrnd FOREIGN DATA WRAPPER dbrnd OPTIONS (hostaddr '127.0.0.1', dbname 'database_one');</pre><p>
<p><strong>Step 6: Mapping of user and server:</strong></p><pre class="crayon-plain-tag">CREATE USER MAPPING FOR dbrnd SERVER demodbrnd OPTIONS (user 'dbrnd', password 'dbrnd');</pre><p>
<p><strong>Step 7: Test this server:</strong></p>
<pre class="crayon-plain-tag">SELECT dblink_connect('demodbrnd');</pre>
<p><strong>Step 8: Now, you can SELECT the data of Database_One from Database_Two:</strong></p>
<p>It is creating a virtual table so we have to specify return data type.<br />
<pre class="crayon-plain-tag">SELECT * FROM public.dblink
('demodbrnd','SELECT EmpID,EmpName FROM public.tbl_Employee') 
AS DATA(EmpID INTEGER,EmpName CHARACTER VARYING);</pre>
<p><strong>The Result:</strong><br />
<pre class="crayon-plain-tag">EmpID  |  EmpName
-------------------------
  1    |  "Anvesh"
  2    |  "Neevan"
  3    |  "Martin"</pre>
]]></content:encoded>
					
					<wfw:commentRss>https://www.dbrnd.com/2015/05/postgresql-cross-database-queries-using/feed/</wfw:commentRss>
			<slash:comments>38</slash:comments>
		
		
			</item>
	</channel>
</rss>
