<?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>Blog do Andre Fonseca &#187; vms</title>
	<atom:link href="http://metronus.com/blog/category/vms/feed/" rel="self" type="application/rss+xml" />
	<link>http://metronus.com/blog</link>
	<description>blog sobre tecnologia, automação e idéias em geral</description>
	<lastBuildDate>Thu, 09 Sep 2010 00:42:26 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1-alpha</generator>
		<item>
		<title>Erro ao conectar RDB via odbc (VMS )</title>
		<link>http://metronus.com/blog/2009/03/17/vmsrdb/#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed</link>
		<comments>http://metronus.com/blog/2009/03/17/vmsrdb/#comments</comments>
		<pubDate>Tue, 17 Mar 2009 20:45:28 +0000</pubDate>
		<dc:creator>Andre</dc:creator>
				<category><![CDATA[automação]]></category>
		<category><![CDATA[rdb]]></category>
		<category><![CDATA[vms]]></category>

		<guid isPermaLink="false">http://blog.metronus.com/2009/03/17/vmsrdb/</guid>
		<description><![CDATA[Esse post é para eu lembrar como se faz para resolver um problema. Quando tenta-se conectar a um RDB que está num alpha via ODBC (tem que ter o driver para isso) e aparece o erro [ORACLE][ODBC][RDB]RDB-F-BAD_DB_HANDLE &#8230;. As configurações do obdc, em meu caso pelo menos, são: Service : Generic e String : attache [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fmetronus.com%2Fblog%2F2009%2F03%2F17%2Fvmsrdb%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fmetronus.com%2Fblog%2F2009%2F03%2F17%2Fvmsrdb%2F&amp;source=aoqfonseca&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>Esse post é para eu lembrar como se faz para resolver um problema. Quando tenta-se conectar a um RDB que está num alpha via ODBC (tem que ter o driver para isso) e aparece o erro [ORACLE][ODBC][RDB]RDB-F-BAD_DB_HANDLE &#8230;.<br />
As configurações do obdc, em meu caso pelo menos, são: Service : Generic e String : attache &#8216;filename file$db&#8217;;<br />
Googleando a internet achei que a solução seria (funcionou no meu caso)<br />
1 &#8211; Log no seu aplha<br />
2 &#8211; Vá para o diretório sys$manager<br />
3 &#8211; Veja o log do banco ( faça um dir por dir *SQLSRV_DIS*.LOG<br />
4- Entre no arquivo&#8230; nas últimas linhas deve aparecer algo parecido com :</p>
<div class="codecolorer-container text blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">---EVENT BEG: EVENT_LOG ------------------------ Tue Mar 11 12:02:41.340 2008— %SQLSRV-I-EVENT_LOG, event logged at line 2814 in file CMD.C;1 %SQLSRV-I-CONNECTNAME, Connect : CONNECT_0000028 %SQLSRV-I-CONNECTSTATE, Connect state: 4 %SQLSRV-I-USERNAME, User name: FIELD %SQLSRV-I-NODENAME, Node : 192.168.1.1 %SQLSRV-I-APPLNAME, Application : odbcad32 %SQLSRV-I-SERVICENAME, Service : GENERIC ---EVENT END: EVENT_LOG ------------------------ Tue Mar 11 12:02:41.360 2008— ---EVENT BEG: EVENT_LOG ------------------------ Tue Mar 11 12:02:41.670 2008— %SQLSRV-I-EVENT_LOG, event logged at line 4455 in file COM_DIALOG.C;1 %SQLSRV-E-READERR, Error on read %SYSTEM-F-LINKDISCON, network partner disconnected logical link ---EVENT END: EVENT_LOG ------------------------ Tue Mar 11 12:02:41.680 2008— ---EVENT BEG: EVENT_LOG ------------------------ Tue Mar 11 12:02:41.700 2008— %SQLSRV-I-EVENT_LOG, event logged at line 286 in file DISP.C;1 %SQLSRV-W-EXCEPTION_RAISE, Exception raised: DBS_SYSERVICEFAILED %SQLSRV-I-CONNECTNAME, Connect : CONNECT_0000028 %SQLSRV-I-CONNECTSTATE, Connect state: 2 %SQLSRV-I-USERNAME, User name: FIELD %SQLSRV-I-NODENAME, Node : 192.168.1.1 %SQLSRV-I-APPLNAME, Application : odbcad32 %SQLSRV-I-SERVICENAME, Service : GENERIC ---EVENT END: EVENT_LOG ------------------------ Tue Mar 11 12:02:41.710 2008— ---EVENT BEG: EVENT_LOG ------------------------ Tue Mar 11 12:02:41.940 2008— %SQLSRV-I-EVENT_LOG, event logged at line 2814 in file CMD.C;1 %SQLSRV-I-CONNECTNAME, Connect : CONNECT_0000029 %SQLSRV-I-CONNECTSTATE, Connect state: 4 %SQLSRV-I-USERNAME, User name: FIELD %SQLSRV-I-NODENAME, Node : 192.168.1.1 %SQLSRV-I-APPLNAME, Application : odbcad32 %SQLSRV-I-SERVICENAME, Service : GENERIC ---EVENT END: EVENT_LOG ------------------------ Tue Mar 11 12:02:41.960 2008—</div></td></tr></tbody></table></div>
<p>A origem deste problema vem da questão da versão do SQL que está sendo executado (Versão 7) sendo assim é necessário mudar a versão do serviço generic para a 7.1 , para isso tem que ser feito os passos</p>
<p>1- Va para o sys$system<br />
2- execute run sqlsrv_manager71<br />
3 &#8211; Vai aparecer o prompt SQLSRV<br />
4 &#8211; Digite o comando : show service generic full;</p>
<div class="codecolorer-container text blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">Service GENERIC<br />
State: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;RUNNING<br />
Owner: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;SQLSRV$DEFLT<br />
Owner Password: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Protocol: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SQL/Services &nbsp; &nbsp; Default Connect Username: &nbsp; &nbsp; &nbsp;Default Connect Password: &nbsp; &nbsp; SQL version: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;STANDARD &nbsp; &nbsp; Autostart: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;on &nbsp; &nbsp; Process init: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Attach: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Schema: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Reuse: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;SESSION &nbsp; &nbsp; Database Authorization: &nbsp; CONNECT USERNAME &nbsp; &nbsp; dbsrc file: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;SQL init file: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Appl Transaction Usage: &nbsp; SERIAL &nbsp; &nbsp; Idle User Timeout: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Idle Exec Timeout: &nbsp; &nbsp; &nbsp; &nbsp;1800 seconds &nbsp; &nbsp; Min Executors: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;2 &nbsp; &nbsp; Max Executors: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;10 &nbsp; &nbsp; Running Executors: &nbsp; &nbsp; &nbsp; &nbsp;2 &nbsp; &nbsp; Clients Per Executor: &nbsp; &nbsp; 1 &nbsp; &nbsp; Active Clients: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 1 Access to service GENERIC &nbsp; &nbsp; Granted to users: &nbsp; &nbsp; &nbsp; &nbsp; PUBLIC &nbsp;PRIVILEGED_USER 'SQLSRV$DEFLT' SQLSRV&gt;</div></td></tr></tbody></table></div>
<p>5 &#8211; Execute a sequencia</p>
<div class="codecolorer-container text blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">SQLSRV&gt; shutdown service generic;<br />
SQLSRV&gt; alter service generic sql version 7.1;<br />
SQLSRV&gt; show service generic full;<br />
SQLSRV&gt; start service generic;<br />
SQLSRV&gt; exit</div></td></tr></tbody></table></div>
]]></content:encoded>
			<wfw:commentRss>http://metronus.com/blog/2009/03/17/vmsrdb/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
