<?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>108.bz &#187; Backup Exec</title>
	<atom:link href="http://www.108.bz/posts/tag/backup-exec/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.108.bz</link>
	<description>Wandering futilities...</description>
	<lastBuildDate>Fri, 27 May 2011 09:08:43 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.1</generator>
		<item>
		<title>Abusing Backup Exec&#8217;s internal database</title>
		<link>http://www.108.bz/posts/it/abusing-backup-exec-internal-database/</link>
		<comments>http://www.108.bz/posts/it/abusing-backup-exec-internal-database/#comments</comments>
		<pubDate>Mon, 15 Mar 2010 23:18:35 +0000</pubDate>
		<dc:creator>Giuliano</dc:creator>
				<category><![CDATA[IT]]></category>
		<category><![CDATA[Backup]]></category>
		<category><![CDATA[Backup Exec]]></category>
		<category><![CDATA[Perl]]></category>
		<category><![CDATA[Reverse Engineering]]></category>
		<category><![CDATA[Symantec]]></category>

		<guid isPermaLink="false">http://www.108.bz/?p=348</guid>
		<description><![CDATA[What&#8217;s the point of having data stored somewhere if you can&#8217;t access it and turn it into useful information? Of course the means to do so should be safe, supported, non destructive and flexible if not easy. But usually all you&#8217;re left with is some kind of &#8220;reporting&#8221; feature that necessarily doesn&#8217;t do exactly what [...]]]></description>
			<content:encoded><![CDATA[<p>What&#8217;s the point of having data stored somewhere if you can&#8217;t access it and turn it into useful information? Of course the means to do so should be safe, supported, non destructive and flexible if not easy. But usually all you&#8217;re left with is some kind of &#8220;reporting&#8221; feature that necessarily doesn&#8217;t do <i>exactly</i> what you need, doesn&#8217;t output in a convenient format and so on.</p>
<p>But enough squabbling: in this article I&#8217;ll deal with Backup Exec&#8217;s internal database.<br />
Here&#8217;s what I&#8217;m trying to do:</p>
<ul>
<li>Look up all the &#8220;Duplicate&#8221; Jobs. Show when they started, how long they took to complete, the rate, &#8230;</li>
<li>For each one of them, try and find the relevant tapes.</li>
</ul>
<p>I will use the generated report to know which media I should eject out of the library for safe storage. The report will also allow me to quickly and easily update the Excel worksheets where we keep track of how backup&#8217;s going.</p>
<p>Our BE database runs on Microsoft SQL Server Express. First thing to do is configure the instance to allow remote TCP/IP connections. Refer to this <a href="http://blogs.msdn.com/sqlexpress/archive/2005/05/05/415084.aspx">post</a>, and <a href="http://support.microsoft.com/default.aspx?scid=kb;EN-US;914277">KB914277</a>.</p>
<p>Then I&#8217;m able to point <a href="http://www.microsoft.com/downloads/details.aspx?displaylang=en&#038;FamilyID=c243a5ae-4bd1-4e3d-94b8-5a0f62bf7796">SQL Server Management Studio</a> at it<sup class='footnote'><a href='#fn-348-1' id='fnref-348-1'>1</a></sup>, and see how the BEDB database is organized. </p>
<p>The view named <span style="font-family: Bitstream Vera Sans Mono,Courier New,monospace;">vwJobHistorySummary</span> is the equivalent of what is seen in BE&#8217;s GUI, under <i>Job Monitor</i> &rarr; <i>Job List</i> &rarr; <i>Job History</i>. Easy enough to find out.</p>
<p>What&#8217;s not that immediate to guess is how Media IDs relate to Job IDs: skimming through the database tables doesn&#8217;t help&#8230; How could you reverse engineer BE GUI and discover what SQL queries it&#8217;s doing to carry out its job? In fact, there&#8217;s a way to &#8220;sniff&#8221; SQL queries while they&#8217;re running:</p>
<ul>
<li>open up BE GUI and select (but don&#8217;t open) a completed Job in <i>Job History</i>.</li>
<li>run <i>SQL Server Profiler</i>.</li>
<li>create a <i>New Trace</i>.</li>
<li>Under the <i>Event Selection</i> tab, deselect everything except <i>SQL:BatchStarting</i>. This is not a particularly crowded database, hence no need for filters.</li>
<li>Double click on the previously selected Job; SQL Profiler should capture a query similar to:</li>
</ul>
<div class="codecolorer-container sql blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:550px;"><div class="sql codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #993333; font-weight: bold;">SELECT</span> <span style="color: #66cc66;">*</span> <span style="color: #993333; font-weight: bold;">FROM</span> dbo<span style="color: #66cc66;">.</span>vwJobHistory <span style="color: #993333; font-weight: bold;">WHERE</span><br />
JobHistoryID<span style="color: #66cc66;">=</span><span style="color: #ff0000;">'8507cfa9-8417-44ae-88e6-9ac19a0333a9'</span> <span style="color: #993333; font-weight: bold;">ORDER</span> <span style="color: #993333; font-weight: bold;">BY</span> <span style="color: #66cc66;">&#91;</span>JHD<span style="color: #66cc66;">.</span>StartTime<span style="color: #66cc66;">&#93;</span><br />
<span style="color: #993333; font-weight: bold;">FOR</span> XML AUTO</div></div>
<p>Looks like Job details are fetched as globs of XML data, perfect to throw our beloved Regular Expressions at.</p>
<p>You can find the script I made at the end of the post. The obligatory notes are:</p>
<ul>
<li>By convention, in our scenario, Policies used to create Duplicate jobs bear a name ending with &#8220;-D&#8221;. I&#8217;m SELECting the last Job IDs with a similar pattern; change it according to your needs, for instance if you&#8217;re interested in all the tape directed Jobs (and not just the Duplicate ones).</li>
<li>Columns are as follow:
<ul>
<li>Job name. In case you wonder, &#8220;FSIWDTH&#8221; means: Full Saturday, Incremental Weekdays, Duplicate on Thursday.</li>
<li>Actual start timestamp.</li>
<li>End timestamp.</li>
<li>Elapsed time (seconds).</li>
<li>Total bytes written. No bytes written? I skip this Job.</li>
<li>Rate (MBytes/minute). Oddly, BE doesn&#8217;t seem to always get this value right.</li>
</ul>
</li>
<li>The &#8220;<span style="font-family: Bitstream Vera Sans Mono,Courier New,monospace;">convert( varchar(</span>&#8221; stuff in the main query is needed to fetch dates in a non driver-dependent format (see FreeTDS <a href="http://www.freetds.org/faq.html#dateformat">FAQ</a>).</li>
<li>Dates are stored in UTC timezone. I make sure of adding the local TZ offset before printing them out.</li>
</ul>
<p>Example output:</p>
<div class="codecolorer-container text blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:550px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">./be_job_media_report.pl <br />
Sel SERVER03-FSIWDTH-D;20100311 09:15;20100312 11:26;94239;602103130444;405<br />
AK8008L3<br />
AK8011L3<br />
Sel SERVER07-FSIWDTH-D;20100311 09:00;20100311 09:15;921;5133161638;452<br />
AK8011L3<br />
Sel SERVER16-FSIWDWE-D;20100310 10:35;20100310 17:34;25155;5352;0<br />
AK8011L3<br />
Sel SERVER13-FSIWDWE-D;20100310 09:00;20100310 17:29;30572;230425324573;515<br />
AK7140L1<br />
AK8011L3</div></div>
<p>And the script itself:</p>
<div class="codecolorer-container perl blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:550px;height:300px;"><div class="perl codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;">#!/usr/bin/perl </span><br />
<span style="color: #666666; font-style: italic;"># Giuliano - http://www.108.bz</span><br />
<span style="color: #000000; font-weight: bold;">use</span> strict<span style="color: #339933;">;</span><br />
<span style="color: #000000; font-weight: bold;">use</span> DBI<span style="color: #339933;">;</span><br />
<span style="color: #000000; font-weight: bold;">use</span> List<span style="color: #339933;">::</span><span style="color: #006600;">Uniq</span> <a href="http://perldoc.perl.org/functions/qw.html"><span style="color: #000066;">qw</span></a><span style="color: #009900;">&#40;</span>uniq<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #000000; font-weight: bold;">use</span> Time<span style="color: #339933;">::</span><span style="color: #006600;">Piece</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #000000; font-weight: bold;">sub</span> pretty_time<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$)</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$time</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #0000ff;">$time</span> <span style="color: #339933;">=</span> Time<span style="color: #339933;">::</span><span style="color: #006600;">Piece</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">strptime</span><span style="color: #009900;">&#40;</span><a href="http://perldoc.perl.org/functions/shift.html"><span style="color: #000066;">shift</span></a><span style="color: #339933;">,</span> <span style="color: #ff0000;">&quot;%Y-%m-%d %H:%M:%S&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;"># 2010-03-10 16:34:19</span><br />
&nbsp; &nbsp; <span style="color: #0000ff;">$time</span> <span style="color: #339933;">+=</span> <span style="color: #0000ff;">$time</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">localtime</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">tzoffset</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <a href="http://perldoc.perl.org/functions/return.html"><span style="color: #000066;">return</span></a> <span style="color: #0000ff;">$time</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">strftime</span><span style="color: #009900;">&#40;</span><span style="color: #ff0000;">'%Y%m%d %H:%M'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span><br />
<br />
<span style="color: #000000; font-weight: bold;">sub</span> print_last_jobids<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$$</span><span style="color: #339933;">;</span><span style="color: #0000ff;">$)</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">my</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$dbh</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">$number</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">$jobname_like</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">@_</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$q</span> <span style="color: #339933;">=</span> <span style="color: #cc0000; font-style: italic;">&lt;&lt;EOQ;<br />
SELECT TOP 20 JobHistoryID, JobName,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; convert( varchar(30), OriginalStartTime, 120),<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; convert( varchar(30), ActualStartTime, 120),<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; convert( varchar(30), EndTime, 120),<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ElapsedTimeSeconds,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; FinalJobStatus, FinalErrorCode, TotalDataSizeBytes, TotalRateMBMin<br />
FROM vwJobHistorySummary<br />
-- WHERE<br />
-- Jobname LIKE '$jobname_like'<br />
ORDER BY ActualStartTime DESC<br />
EOQ</span><br />
&nbsp; &nbsp; <span style="color: #0000ff;">$q</span> <span style="color: #339933;">=~</span> <span style="color: #009966; font-style: italic;">s/-- (WHERE)/$1/</span> <span style="color: #b1b100;">if</span> <span style="color: #0000ff;">$jobname_like</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #0000ff;">$q</span> <span style="color: #339933;">=~</span> <span style="color: #009966; font-style: italic;">s/-- (Jobname LIKE)/$1/</span> <span style="color: #b1b100;">if</span> <span style="color: #0000ff;">$jobname_like</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$sth</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">$dbh</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">prepare</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$q</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #0000ff;">$sth</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">execute</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$row</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">while</span> <span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">$row</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">$sth</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">fetchrow_arrayref</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$row</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">8</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #666666; font-style: italic;"># TotalDataSizeBytes &gt; 0</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$row</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">3</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> pretty_time<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$row</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">3</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$row</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">4</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> pretty_time<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$row</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">4</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a href="http://perldoc.perl.org/functions/printf.html"><span style="color: #000066;">printf</span></a> <span style="color: #ff0000;">&quot;%s;%.f<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">,</span> <span style="color: #009900;">&#40;</span><a href="http://perldoc.perl.org/functions/join.html"><span style="color: #000066;">join</span></a> <span style="color: #ff0000;">';'</span><span style="color: #339933;">,</span> <span style="color: #339933;">@</span><span style="color: #009900;">&#123;</span><span style="color: #0000ff;">$row</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">3</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">4</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">5</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">8</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">$row</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">9</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; print_media_by_jobhistoryid<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$dbh</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">$row</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
<span style="color: #009900;">&#125;</span><br />
<br />
<span style="color: #000000; font-weight: bold;">sub</span> print_media_by_jobhistoryid<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$$</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">my</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$dbh</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">$jobid</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">@_</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$sth</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">$dbh</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">prepare</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">&lt;&lt;</span>EOQ<br />
SELECT <span style="color: #339933;">*</span> FROM dbo<span style="color: #339933;">.</span>vwJobHistory where<br />
JobHistoryID<span style="color: #339933;">=</span><span style="color: #ff0000;">'$jobid'</span> ORDER BY <span style="color: #009900;">&#91;</span>JHD<span style="color: #339933;">.</span>StartTime<span style="color: #009900;">&#93;</span><br />
FOR XML AUTO<br />
EOQ<br />
&nbsp; &nbsp; <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #0000ff;">$sth</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">execute</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">@media</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$row</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">while</span> <span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">$row</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">$sth</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">fetchrow_arrayref</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$record</span> <span style="color: #339933;">=</span> <a href="http://perldoc.perl.org/functions/join.html"><span style="color: #000066;">join</span></a> <span style="color: #ff0000;">';'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">@$row</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://perldoc.perl.org/functions/push.html"><span style="color: #000066;">push</span></a> <span style="color: #0000ff;">@media</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">$1</span> <span style="color: #b1b100;">if</span> <span style="color: #0000ff;">$record</span> <span style="color: #339933;">=~</span> <span style="color: #009966; font-style: italic;">/Data=&quot;(.*?)&quot;/</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; <a href="http://perldoc.perl.org/functions/print.html"><span style="color: #000066;">print</span></a> <span style="color: #339933;">+</span><span style="color: #009900;">&#40;</span><a href="http://perldoc.perl.org/functions/join.html"><span style="color: #000066;">join</span></a> <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">,</span> uniq<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span><a href="http://perldoc.perl.org/functions/sort.html"><span style="color: #000066;">sort</span></a> <span style="color: #339933;">=&gt;</span> <span style="color: #cc66cc;">1</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">@media</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span> <span style="color: #b1b100;">if</span> <span style="color: #0000ff;">@media</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span><br />
<br />
<span style="color: #666666; font-style: italic;">### Main</span><br />
<br />
<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$dbh</span> <span style="color: #339933;">=</span> DBI<span style="color: #339933;">-&gt;</span><span style="color: #006600;">connect</span><span style="color: #009900;">&#40;</span><span style="color: #ff0000;">'dbi:Sybase:server=bedbdatasource;database=BEDB'</span><span style="color: #339933;">,</span><span style="color: #ff0000;">'DOMAIN\username'</span><span style="color: #339933;">,</span><span style="color: #ff0000;">'password'</span><span style="color: #009900;">&#41;</span> <span style="color: #b1b100;">or</span> <a href="http://perldoc.perl.org/functions/die.html"><span style="color: #000066;">die</span></a><span style="color: #339933;">;</span><br />
print_last_jobids<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$dbh</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">10</span><span style="color: #339933;">,</span> <span style="color: #ff0000;">'%-D'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
<a href="http://perldoc.perl.org/functions/exit.html"><span style="color: #000066;">exit</span></a><span style="color: #339933;">;</span></div></div>
<div class='footnotes'>
<div class='footnotedivider'></div>
<ol>
<li id='fn-348-1'>No need to enable TCP/IP on the instance, if Management Studio is installed on BE server itself <span class='footnotereverse'><a href='#fnref-348-1'>&#8617;</a></span></li>
</ol>
</div>
 <img src="http://www.108.bz/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=348" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://www.108.bz/posts/it/abusing-backup-exec-internal-database/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

