<?xml version="1.0" encoding="iso-8859-1"?>
<rss version="2.0" xml:base="http://www.red-gate.com/MessageBoard/" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
 <title>Red Gate forums</title>
 <link>http://www.red-gate.com/MessageBoard/</link>
 <description>Product Support and Discussion</description>
 <language>en</language>
 <copyright>Copyright Red Gate Software Ltd</copyright>
 <managingEditor>internalsupport@red-gate.com</managingEditor>
 <webMaster>internalsupport@red-gate.com</webMaster>
 <docs>http://blogs.law.harvard.edu/tech/rss</docs>
 <ttl>60</ttl>
 <lastBuildDate>Sat, 25 May 2013 09:27:25 GMT</lastBuildDate>
 <pubDate>Sat, 25 May 2013 09:27:25 GMT</pubDate>
 <image>
  <url>http://www.red-gate.com/messageboard/templates/subRed/images/logo_phpBB.gif</url>
  <title>Red Gate forums</title>
  <link>http://www.red-gate.com/MessageBoard/</link>
 </image>
 <item>
  <title>More about IBM 000-283 certification exam</title>
  <link>http://www.red-gate.com/MessageBoard/viewtopic.php?p=62151#62151</link>
  <description>I can read more IBM 000-283 certification exam objectives and topics from the official site. However, I want to get more study materials or practice exam for it. Please recommend it.</description>
  <category>Scream</category>
  <comments>http://www.red-gate.com/MessageBoard/posting.php?mode=reply&amp;t=17259</comments>
  <dc:creator>janson</dc:creator>
  <pubDate>Sat, 25 May 2013 08:39:13 GMT</pubDate>
  <guid isPermaLink="true">http://www.red-gate.com/MessageBoard/viewtopic.php?p=62151#62151</guid>
 </item>
 <item>
  <title>Request for XpsPrint.dll</title>
  <link>http://www.red-gate.com/MessageBoard/viewtopic.php?p=62150#62150</link>
  <description>I have a signature for XpsPrint.dll - StartXpsPrintJob, but nowhere to put it.  I was hoping someone could create the new module.  Thank you again for the great service provided to the .Net community.
&lt;br /&gt;

&lt;br /&gt;
I will post the signature below until the topic is created.
&lt;br /&gt;
&lt;/span&gt;&lt;table width=&quot;90%&quot; cellspacing=&quot;1&quot; cellpadding=&quot;3&quot; border=&quot;0&quot; align=&quot;center&quot;&gt;&lt;tr&gt; 	  &lt;td&gt;&lt;span class=&quot;genmed&quot;&gt;&lt;b&gt;Code:&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;	&lt;/tr&gt;	&lt;tr&gt;	  &lt;td class=&quot;code&quot;&gt;
&lt;br /&gt;
#region P/Invokes
&lt;br /&gt;

&lt;br /&gt;
public static void StartXpsPrintJobSafe&amp;#40;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; string printerName, string jobName, string outputFileName,
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; SafeWaitHandle progressEvent, SafeWaitHandle completeEvent,
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; bool&amp;#91;&amp;#93; pagesToPrint,
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; bool getPrintJob, out IXpsPrintJob printJob,
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; out IXpsPrintJobStream documentStream,
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; bool getTicketStream, out IXpsPrintJobStream ticketStream&amp;#41;
&lt;br /&gt;
&amp;#123;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; if &amp;#40;string.IsNullOrWhiteSpace&amp;#40;printerName&amp;#41;&amp;#41;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; throw new ArgumentNullException&amp;#40;&amp;quot;printerName&amp;quot;&amp;#41;;
&lt;br /&gt;

&lt;br /&gt;
&amp;nbsp; &amp;nbsp; byte&amp;#91;&amp;#93; pagesToPrintB = null;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; UInt32 cpagesToPrintB = 0;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; if &amp;#40;pagesToPrint != null &amp;amp;&amp;amp; pagesToPrint.Length &amp;gt; 0&amp;#41;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;#123;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; pagesToPrintB = pagesToPrint
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .Select&amp;#40;b =&amp;gt; b ? &amp;#40;byte&amp;#41;1 &amp;#58; &amp;#40;byte&amp;#41;0&amp;#41;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .ToArray&amp;#40;&amp;#41;;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cpagesToPrintB = &amp;#40;UInt32&amp;#41;pagesToPrintB.Length;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;#125;
&lt;br /&gt;

&lt;br /&gt;
&amp;nbsp; &amp;nbsp; IntPtr ppPrintJob = IntPtr.Zero;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; IntPtr ppTicketStream = IntPtr.Zero;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; // memory is allocated by StartXpsPrintJob, we just specify we want something
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; if &amp;#40;getPrintJob&amp;#41;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;#123;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ppPrintJob = Marshal.AllocCoTaskMem&amp;#40;Marshal.SizeOf&amp;#40;typeof&amp;#40;IntPtr&amp;#41;&amp;#41;&amp;#41;;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Marshal.StructureToPtr&amp;#40;IntPtr.Zero, ppPrintJob, false&amp;#41;;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;#125;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; if &amp;#40;getTicketStream&amp;#41;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;#123;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ppTicketStream = Marshal.AllocCoTaskMem&amp;#40;Marshal.SizeOf&amp;#40;typeof&amp;#40;IntPtr&amp;#41;&amp;#41;&amp;#41;;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Marshal.StructureToPtr&amp;#40;IntPtr.Zero, ppTicketStream, false&amp;#41;;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;#125;
&lt;br /&gt;

&lt;br /&gt;
&amp;nbsp; &amp;nbsp; // take references on safehandles
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; IntPtr pProgressEvent = IntPtr.Zero;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; IntPtr pCompleteEvent = IntPtr.Zero;
&lt;br /&gt;

&lt;br /&gt;
&amp;nbsp; &amp;nbsp; if &amp;#40;progressEvent != null&amp;#41;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;#123;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; bool success = false;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; progressEvent.DangerousAddRef&amp;#40;ref success&amp;#41;;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if &amp;#40;!success&amp;#41;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; throw new ObjectDisposedException&amp;#40;&amp;quot;progressEvent&amp;quot;&amp;#41;;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; pProgressEvent = progressEvent.DangerousGetHandle&amp;#40;&amp;#41;;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;#125;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; if &amp;#40;completeEvent != null&amp;#41;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;#123;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; bool success = false;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; completeEvent.DangerousAddRef&amp;#40;ref success&amp;#41;;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if &amp;#40;!success&amp;#41;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; throw new ObjectDisposedException&amp;#40;&amp;quot;completeEvent&amp;quot;&amp;#41;;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; pCompleteEvent = completeEvent.DangerousGetHandle&amp;#40;&amp;#41;;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;#125;
&lt;br /&gt;

&lt;br /&gt;
&amp;nbsp; &amp;nbsp; RuntimeHelpers.PrepareConstrainedRegions&amp;#40;&amp;#41;;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; try
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;#123;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Preservesig is set, so this will throw on failure
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; StartXpsPrintJob&amp;#40;printerName, jobName, outputFileName,
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; pProgressEvent, pCompleteEvent,
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; pagesToPrintB, cpagesToPrintB,
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ppPrintJob, out documentStream, ppTicketStream&amp;#41;;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;#125;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; finally
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;#123;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if &amp;#40;pProgressEvent != IntPtr.Zero&amp;#41;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; progressEvent.DangerousRelease&amp;#40;&amp;#41;;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if &amp;#40;pCompleteEvent != IntPtr.Zero&amp;#41;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; completeEvent.DangerousRelease&amp;#40;&amp;#41;;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;#125;
&lt;br /&gt;

&lt;br /&gt;
&amp;nbsp; &amp;nbsp; if &amp;#40;getPrintJob&amp;#41;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;#123;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; IntPtr pPrintJob = &amp;#40;IntPtr&amp;#41;Marshal.PtrToStructure&amp;#40;ppPrintJob, typeof&amp;#40;IntPtr&amp;#41;&amp;#41;;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; printJob = &amp;#40;IXpsPrintJob&amp;#41;Marshal.GetTypedObjectForIUnknown&amp;#40;pPrintJob, typeof&amp;#40;IXpsPrintJob&amp;#41;&amp;#41;;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Marshal.FreeCoTaskMem&amp;#40;ppPrintJob&amp;#41;;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;#125;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; else
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;#123;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; printJob = null;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;#125;
&lt;br /&gt;

&lt;br /&gt;
&amp;nbsp; &amp;nbsp; if &amp;#40;getTicketStream&amp;#41;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;#123;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; IntPtr pTicketStream = &amp;#40;IntPtr&amp;#41;Marshal.PtrToStructure&amp;#40;ppTicketStream, typeof&amp;#40;IntPtr&amp;#41;&amp;#41;;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ticketStream = &amp;#40;IXpsPrintJobStream&amp;#41;Marshal.GetTypedObjectForIUnknown&amp;#40;pTicketStream, typeof&amp;#40;IXpsPrintJobStream&amp;#41;&amp;#41;;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Marshal.FreeCoTaskMem&amp;#40;ppTicketStream&amp;#41;;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;#125;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; else
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;#123;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ticketStream = null;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;#125;
&lt;br /&gt;
&amp;#125;
&lt;br /&gt;

&lt;br /&gt;
&amp;#91;DllImport&amp;#40;&amp;quot;XpsPrint.dll&amp;quot;, EntryPoint = &amp;quot;StartXpsPrintJob&amp;quot;, PreserveSig = false&amp;#41;&amp;#93;
&lt;br /&gt;
private static extern void StartXpsPrintJob&amp;#40;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; // 0
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;#91;MarshalAs&amp;#40;UnmanagedType.LPWStr&amp;#41;&amp;#93; String printerName,
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;#91;MarshalAs&amp;#40;UnmanagedType.LPWStr&amp;#41;&amp;#93; String jobName,
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; // 2
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;#91;MarshalAs&amp;#40;UnmanagedType.LPWStr&amp;#41;&amp;#93; String outputFileName,
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; IntPtr progressEvent,&amp;nbsp; &amp;nbsp;// HANDLE
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; // 4
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; IntPtr completionEvent, // HANDLE
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;#91;MarshalAs&amp;#40;UnmanagedType.LPArray, SizeParamIndex = 6&amp;#41;&amp;#93; byte&amp;#91;&amp;#93; printablePagesOn,
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; // 6
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; UInt32 printablePagesOnCount,
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; IntPtr xpsPrintJob,
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; // 8
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; out IXpsPrintJobStream documentStream,
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; IntPtr printTicketStream&amp;#41;;
&lt;br /&gt;

&lt;br /&gt;
#endregion
&lt;br /&gt;

&lt;br /&gt;
#region Structures
&lt;br /&gt;

&lt;br /&gt;
&amp;#91;Guid&amp;#40;&amp;quot;7a77dc5f-45d6-4dff-9307-d8cb846347ca&amp;quot;&amp;#41;&amp;#93;
&lt;br /&gt;
&amp;#91;InterfaceType&amp;#40;ComInterfaceType.InterfaceIsIUnknown&amp;#41;&amp;#93;
&lt;br /&gt;
internal interface IXpsPrintJobStream
&lt;br /&gt;
&amp;#123;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; void Read&amp;#40;&amp;#91;MarshalAs&amp;#40;UnmanagedType.LPArray&amp;#41;&amp;#93; byte&amp;#91;&amp;#93; pv, uint cb, out uint pcbRead&amp;#41;;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; void Write&amp;#40;&amp;#91;MarshalAs&amp;#40;UnmanagedType.LPArray&amp;#41;&amp;#93; byte&amp;#91;&amp;#93; pv, uint cb, out uint pcbWritten&amp;#41;;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; void Close&amp;#40;&amp;#41;;
&lt;br /&gt;
&amp;#125;
&lt;br /&gt;

&lt;br /&gt;
&amp;#91;Guid&amp;#40;&amp;quot;5ab89b06-8194-425f-ab3b-d7a96e350161&amp;quot;&amp;#41;&amp;#93;
&lt;br /&gt;
&amp;#91;InterfaceType&amp;#40;ComInterfaceType.InterfaceIsIUnknown&amp;#41;&amp;#93;
&lt;br /&gt;
internal interface IXpsPrintJob
&lt;br /&gt;
&amp;#123;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; void Cancel&amp;#40;&amp;#41;;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; void GetJobStatus&amp;#40;out XPS_JOB_STATUS jobStatus&amp;#41;;
&lt;br /&gt;
&amp;#125;
&lt;br /&gt;

&lt;br /&gt;
&amp;#91;StructLayout&amp;#40;LayoutKind.Sequential&amp;#41;&amp;#93;
&lt;br /&gt;
internal struct XPS_JOB_STATUS
&lt;br /&gt;
&amp;#123;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; public UInt32 jobId;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; public Int32 currentDocument;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; public Int32 currentPage;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; public Int32 currentPageTotal;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; public XPS_JOB_COMPLETION completion;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; public Int32 jobStatus; 
&lt;br /&gt;
&amp;#125;;
&lt;br /&gt;

&lt;br /&gt;
internal enum XPS_JOB_COMPLETION
&lt;br /&gt;
&amp;#123;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; XPS_JOB_IN_PROGRESS = 0,
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; XPS_JOB_COMPLETED = 1,
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; XPS_JOB_CANCELLED = 2,
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; XPS_JOB_FAILED = 3
&lt;br /&gt;
&amp;#125;
&lt;br /&gt;

&lt;br /&gt;
internal enum WAIT_RESULT
&lt;br /&gt;
&amp;#123;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; WAIT_OBJECT_0 = 0,
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; WAIT_ABANDONED = 0x80,
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; WAIT_TIMEOUT = 0x102,
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; WAIT_FAILED = -1
&lt;br /&gt;
&amp;#125;
&lt;br /&gt;

&lt;br /&gt;
#endregion
&lt;br /&gt;
&lt;/td&gt;	&lt;/tr&gt;&lt;/table&gt;&lt;span class=&quot;postbody&quot;&gt;</description>
  <category>PInvoke.Net</category>
  <comments>http://www.red-gate.com/MessageBoard/posting.php?mode=reply&amp;t=17258</comments>
  <dc:creator>mgaffigan</dc:creator>
  <pubDate>Sat, 25 May 2013 00:06:15 GMT</pubDate>
  <guid isPermaLink="true">http://www.red-gate.com/MessageBoard/viewtopic.php?p=62150#62150</guid>
 </item>
 <item>
  <title>Run out of diskspace in SQL Data compare SDK</title>
  <link>http://www.red-gate.com/MessageBoard/viewtopic.php?p=62149#62149</link>
  <description>Hi,
&lt;br /&gt;
Is there an option to set in the SQL Data Compare API to place the temp files into a different path instead of the C:\ drive?
&lt;br /&gt;
I am comparing a large databases with many tables and the default temp files are in C drive which I don't have much empty space.
&lt;br /&gt;
Thanks</description>
  <category>SQL Comparison SDK 10</category>
  <comments>http://www.red-gate.com/MessageBoard/posting.php?mode=reply&amp;t=17257</comments>
  <dc:creator>Philn</dc:creator>
  <pubDate>Sat, 25 May 2013 00:02:57 GMT</pubDate>
  <guid isPermaLink="true">http://www.red-gate.com/MessageBoard/viewtopic.php?p=62149#62149</guid>
 </item>
 <item>
  <title>SQL Prompt versus SSMS 2012 intellisense</title>
  <link>http://www.red-gate.com/MessageBoard/viewtopic.php?p=62148#62148</link>
  <description>Hi folks - 
&lt;br /&gt;

&lt;br /&gt;
I just installed SSMS 2012.  I've been using SQL PRompt 5 with SSMS 2008 R2 until now and like it.  However in SSMS 2012 Microsoft seems to have improved the internal intellisense.  Also both the intellisense and SQL Prompt are on by default so I have two layered suggestion boxes popping up.  Can someone clarify how SQL Prompt differs from the built-in offering?
&lt;br /&gt;

&lt;br /&gt;
Thanks,
&lt;br /&gt;

&lt;br /&gt;
John</description>
  <category>SQL Prompt 5</category>
  <comments>http://www.red-gate.com/MessageBoard/posting.php?mode=reply&amp;t=17256</comments>
  <dc:creator>freecell1</dc:creator>
  <pubDate>Fri, 24 May 2013 18:31:07 GMT</pubDate>
  <guid isPermaLink="true">http://www.red-gate.com/MessageBoard/viewtopic.php?p=62148#62148</guid>
 </item>
 <item>
  <title>sql prompt fails to format forceseek index hint (sql 2012)</title>
  <link>http://www.red-gate.com/MessageBoard/viewtopic.php?p=62147#62147</link>
  <description>SQL prompt fails to format below index hint, MSDN documentation is below.
&lt;br /&gt;
This is a major problem now, I cannot use sqlprompt period for formatting since most of my scripts uses the forceseek hint.
&lt;br /&gt;
Thank you
&lt;br /&gt;

&lt;br /&gt;
WITH ( FORCESEEK(1(CntyCd, PclId, PclSeqNbr)))
&lt;br /&gt;

&lt;br /&gt;

&lt;br /&gt;
SELECT CONCAT(@D, k.AddrAptNbr, @D, k.AddrCarrt, @D, k.AddrDirLeftCd, @D, k.AddrDirRightCd, @D, k.AddrHse1Nbr, @D,
&lt;br /&gt;
                                               k.AddrHse2Nbr, @D, k.AddrModeCd, @D, k.AddrPfx1Cd, @D, k.AddrSfx1Cd, @D, k.AddrSfx2Cd, @D, k.AddrStreetName, @D,
&lt;br /&gt;
                                               LTRIM(k.AddrTypCd), @D, k.CbsaCd, @D, k.CensId, @D, LTRIM(k.CSZTypInd), @D, k.DPIDCd, @D, k.DpvCd, @D,
&lt;br /&gt;
                                               k.GeoMatchCd, @D, k.LatDegr, @D, k.LongDegr, @D, k.MatchCd, @D, k.OrigAddr1, @D, k.OrigAddr2, @D, k.OrigAddr3, @D,
&lt;br /&gt;
                                               k.OrigCityName, @D, k.OrigStCd, @D, k.StdAddr1, @D, k.StdHse1Nbr, @D, k.StdHse2Nbr, @D, k.StreetNamePfx, @D,
&lt;br /&gt;
                                               k.StdCityName, @D, k.StdStCd, @D, k.OrigZipCd, @D, k.StdZipCd)
&lt;br /&gt;
                                 FROM   tTrans.TransSitus AS k WITH ( FORCESEEK(1(CntyCd, BatchDt, BatchSeq)))
&lt;br /&gt;
                                 WHERE  k.CntyCd = @CntyCd
&lt;br /&gt;
                                        AND k.BatchDt = t.BatchDt
&lt;br /&gt;
                                        AND k.BatchSeq = t.BatchSeq
&lt;br /&gt;
                                        AND k.SitusSeq = 1
&lt;br /&gt;

&lt;br /&gt;

&lt;br /&gt;

&lt;br /&gt;
&lt;a href=&quot;http://msdn.microsoft.com/en-us/library/ms187373.aspx&quot; target=&quot;_blank&quot;&gt;http://msdn.microsoft.com/en-us/library/ms187373.aspx&lt;/a&gt;
&lt;br /&gt;

&lt;br /&gt;
WITH  ( &amp;lt;table_hint&amp;gt; [ [, ]...n ] )
&lt;br /&gt;

&lt;br /&gt;
&amp;lt;table_hint&amp;gt; ::= 
&lt;br /&gt;
[ NOEXPAND ] { 
&lt;br /&gt;
    INDEX  ( index_value [ ,...n ] ) | INDEX =  ( index_value )    | FORCESEEK [( index_value ( index_column_name  [ ,... ] ) ) ]
&lt;br /&gt;
  | FORCESCAN
&lt;br /&gt;
  | FORCESEEK
&lt;br /&gt;
  | HOLDLOCK 
&lt;br /&gt;
  | NOLOCK 
&lt;br /&gt;
  | NOWAIT
&lt;br /&gt;
  | PAGLOCK 
&lt;br /&gt;
  | READCOMMITTED 
&lt;br /&gt;
  | READCOMMITTEDLOCK 
&lt;br /&gt;
  | READPAST 
&lt;br /&gt;
  | READUNCOMMITTED 
&lt;br /&gt;
  | REPEATABLEREAD 
&lt;br /&gt;
  | ROWLOCK 
&lt;br /&gt;
  | SERIALIZABLE 
&lt;br /&gt;
  | SPATIAL_WINDOW_MAX_CELLS = integer
&lt;br /&gt;
  | TABLOCK 
&lt;br /&gt;
  | TABLOCKX 
&lt;br /&gt;
  | UPDLOCK 
&lt;br /&gt;
  | XLOCK 
&lt;br /&gt;
}</description>
  <category>SQL Prompt 5</category>
  <comments>http://www.red-gate.com/MessageBoard/posting.php?mode=reply&amp;t=17255</comments>
  <dc:creator>gokhanvarol@gmail.com</dc:creator>
  <pubDate>Fri, 24 May 2013 16:00:59 GMT</pubDate>
  <guid isPermaLink="true">http://www.red-gate.com/MessageBoard/viewtopic.php?p=62147#62147</guid>
 </item>
 <item>
  <title>Formatting cursor logic indents weird</title>
  <link>http://www.red-gate.com/MessageBoard/viewtopic.php?p=62146#62146</link>
  <description>Here's a kill user script I found on the web a long time ago, I've flattened it out to show what it looks like before SQL Prompt format
&lt;br /&gt;

&lt;br /&gt;
&lt;/span&gt;&lt;table width=&quot;90%&quot; cellspacing=&quot;1&quot; cellpadding=&quot;3&quot; border=&quot;0&quot; align=&quot;center&quot;&gt;&lt;tr&gt; 	  &lt;td&gt;&lt;span class=&quot;genmed&quot;&gt;&lt;b&gt;Code:&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;	&lt;/tr&gt;	&lt;tr&gt;	  &lt;td class=&quot;code&quot;&gt;DECLARE @strSQL VARCHAR&amp;#40;255&amp;#41;
&lt;br /&gt;

&lt;br /&gt;
--PRINT 'Killing Users'
&lt;br /&gt;
--PRINT '-----------------'
&lt;br /&gt;
CREATE TABLE #tmpUsers &amp;#40;
&lt;br /&gt;
spid INT,
&lt;br /&gt;
eid INT,
&lt;br /&gt;
STATUS VARCHAR&amp;#40;30&amp;#41;,
&lt;br /&gt;
loginname VARCHAR&amp;#40;50&amp;#41;,
&lt;br /&gt;
hostname VARCHAR&amp;#40;50&amp;#41;,
&lt;br /&gt;
blk INT,
&lt;br /&gt;
dbname VARCHAR&amp;#40;50&amp;#41;,
&lt;br /&gt;
cmd VARCHAR&amp;#40;30&amp;#41;,
&lt;br /&gt;
request_id INT
&lt;br /&gt;
&amp;#41;
&lt;br /&gt;

&lt;br /&gt;
INSERT INTO #tmpUsers
&lt;br /&gt;
EXEC SP_WHO
&lt;br /&gt;

&lt;br /&gt;
DECLARE LoginCursor CURSOR READ_ONLY
&lt;br /&gt;
FOR
&lt;br /&gt;
SELECT spid,
&lt;br /&gt;
&amp;nbsp; &amp;nbsp;dbname
&lt;br /&gt;
FROM #tmpUsers
&lt;br /&gt;
WHERE dbname = @dbname
&lt;br /&gt;

&lt;br /&gt;
DECLARE @spid VARCHAR&amp;#40;10&amp;#41;
&lt;br /&gt;
DECLARE @dbname2 VARCHAR&amp;#40;40&amp;#41;
&lt;br /&gt;

&lt;br /&gt;
OPEN LoginCursor
&lt;br /&gt;

&lt;br /&gt;
FETCH NEXT
&lt;br /&gt;
FROM LoginCursor
&lt;br /&gt;
INTO @spid,
&lt;br /&gt;
&amp;nbsp; &amp;nbsp;@dbname2
&lt;br /&gt;

&lt;br /&gt;
WHILE &amp;#40;@@fetch_status &amp;lt;&amp;gt; - 1&amp;#41;
&lt;br /&gt;
BEGIN
&lt;br /&gt;
IF &amp;#40;@@fetch_status &amp;lt;&amp;gt; - 2&amp;#41;
&lt;br /&gt;
BEGIN
&lt;br /&gt;
&amp;nbsp; &amp;nbsp;--PRINT 'Killing ' + @spid
&lt;br /&gt;
SET @strSQL = 'KILL ' + @spid
&lt;br /&gt;
EXEC &amp;#40;@strSQL&amp;#41;
&lt;br /&gt;
END
&lt;br /&gt;
FETCH NEXT
&lt;br /&gt;
FROM LoginCursor
&lt;br /&gt;
INTO @spid,
&lt;br /&gt;
&amp;nbsp; &amp;nbsp;@dbname2
&lt;br /&gt;
END
&lt;br /&gt;

&lt;br /&gt;
CLOSE LoginCursor
&lt;br /&gt;

&lt;br /&gt;
DEALLOCATE LoginCursor
&lt;br /&gt;

&lt;br /&gt;
DROP TABLE #tmpUsers
&lt;br /&gt;
&amp;nbsp; &amp;nbsp;--PRINT 'Done'
&lt;br /&gt;
&lt;/td&gt;	&lt;/tr&gt;&lt;/table&gt;&lt;span class=&quot;postbody&quot;&gt;
&lt;br /&gt;

&lt;br /&gt;
Here's the same script after formatting it with SQL Prompt:
&lt;br /&gt;

&lt;br /&gt;
&lt;/span&gt;&lt;table width=&quot;90%&quot; cellspacing=&quot;1&quot; cellpadding=&quot;3&quot; border=&quot;0&quot; align=&quot;center&quot;&gt;&lt;tr&gt; 	  &lt;td&gt;&lt;span class=&quot;genmed&quot;&gt;&lt;b&gt;Code:&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;	&lt;/tr&gt;	&lt;tr&gt;	  &lt;td class=&quot;code&quot;&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; DECLARE @strSQL VARCHAR&amp;#40;255&amp;#41;
&lt;br /&gt;

&lt;br /&gt;
--PRINT 'Killing Users'
&lt;br /&gt;
--PRINT '-----------------'
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; CREATE TABLE #tmpUsers
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;#40;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; spid INT ,
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; eid INT ,
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; STATUS VARCHAR&amp;#40;30&amp;#41; ,
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; loginname VARCHAR&amp;#40;50&amp;#41; ,
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; hostname VARCHAR&amp;#40;50&amp;#41; ,
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; blk INT ,
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dbname VARCHAR&amp;#40;50&amp;#41; ,
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cmd VARCHAR&amp;#40;30&amp;#41; ,
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; request_id INT
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;#41;
&lt;br /&gt;

&lt;br /&gt;
&amp;nbsp; &amp;nbsp; INSERT&amp;nbsp; INTO #tmpUsers
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; EXEC SP_WHO
&lt;br /&gt;

&lt;br /&gt;
&amp;nbsp; &amp;nbsp; DECLARE LoginCursor CURSOR READ_ONLY
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; FOR
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SELECT&amp;nbsp; spid ,
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dbname
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; FROM&amp;nbsp; &amp;nbsp; #tmpUsers
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; WHERE&amp;nbsp; &amp;nbsp;dbname = @dbname
&lt;br /&gt;

&lt;br /&gt;
&amp;nbsp; &amp;nbsp; DECLARE @spid VARCHAR&amp;#40;10&amp;#41;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; DECLARE @dbname2 VARCHAR&amp;#40;40&amp;#41;
&lt;br /&gt;

&lt;br /&gt;
&amp;nbsp; &amp;nbsp; OPEN LoginCursor
&lt;br /&gt;

&lt;br /&gt;
&amp;nbsp; &amp;nbsp; FETCH NEXT
&lt;br /&gt;
FROM LoginCursor
&lt;br /&gt;
INTO @spid, @dbname2
&lt;br /&gt;

&lt;br /&gt;
&amp;nbsp; &amp;nbsp; WHILE &amp;#40; @@fetch_status &amp;lt;&amp;gt; -1 &amp;#41; 
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; BEGIN
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; IF &amp;#40; @@fetch_status &amp;lt;&amp;gt; -2 &amp;#41; 
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; BEGIN
&lt;br /&gt;
&amp;nbsp; &amp;nbsp;--PRINT 'Killing ' + @spid
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SET @strSQL = 'KILL ' + @spid
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; EXEC &amp;#40;@strSQL&amp;#41;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; END
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; FETCH NEXT
&lt;br /&gt;
FROM LoginCursor
&lt;br /&gt;
INTO @spid, @dbname2
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; END
&lt;br /&gt;

&lt;br /&gt;
&amp;nbsp; &amp;nbsp; CLOSE LoginCursor
&lt;br /&gt;

&lt;br /&gt;
&amp;nbsp; &amp;nbsp; DEALLOCATE LoginCursor
&lt;br /&gt;

&lt;br /&gt;
&amp;nbsp; &amp;nbsp; DROP TABLE #tmpUsers
&lt;br /&gt;
&amp;nbsp; &amp;nbsp;--PRINT 'Done'
&lt;br /&gt;
&lt;/td&gt;	&lt;/tr&gt;&lt;/table&gt;&lt;span class=&quot;postbody&quot;&gt;
&lt;br /&gt;

&lt;br /&gt;
The &amp;quot;Fetch next&amp;quot; are the parts I find odd.  Fetch Next gets indented away from FROM LoginCursor INTO .... 
&lt;br /&gt;

&lt;br /&gt;
then the second fetch next before the END code gets formatted even further out, I guess because it's part of the indent logic for the WHILE BEGIN/END BLOCK?</description>
  <category>SQL Prompt 5</category>
  <comments>http://www.red-gate.com/MessageBoard/posting.php?mode=reply&amp;t=17254</comments>
  <dc:creator>Mindflux</dc:creator>
  <pubDate>Fri, 24 May 2013 15:20:21 GMT</pubDate>
  <guid isPermaLink="true">http://www.red-gate.com/MessageBoard/viewtopic.php?p=62146#62146</guid>
 </item>
 <item>
  <title>RE: sql monitor alert level not changing down a level</title>
  <link>http://www.red-gate.com/MessageBoard/viewtopic.php?p=62145#62145</link>
  <description>My mistake Steven. I assumed that you are talking about built-in Fragmented indexes alert. I have received your email. Replying you in few minutes.
&lt;br /&gt;

&lt;br /&gt;
Thanks,
&lt;br /&gt;
Priya</description>
  <category>SQL Monitor 3</category>
  <comments>http://www.red-gate.com/MessageBoard/posting.php?mode=reply&amp;t=17251</comments>
  <dc:creator>priyasinha</dc:creator>
  <pubDate>Fri, 24 May 2013 14:44:06 GMT</pubDate>
  <guid isPermaLink="true">http://www.red-gate.com/MessageBoard/viewtopic.php?p=62145#62145</guid>
 </item>
 <item>
  <title>Changeset Comments Policy Error</title>
  <link>http://www.red-gate.com/MessageBoard/viewtopic.php?p=62144#62144</link>
  <description>I have Team Foundation server setup to require a Check In Comment on all check ins.  I was excited to see that SQL Source was going to support this feature. 
&lt;br /&gt;

&lt;br /&gt;
When we upgraded to the new version, even if we enter a comment we get an error.
&lt;br /&gt;

&lt;br /&gt;
&amp;quot;This Commit doesn't meet the server's policy requirements, or the policy isn't configured on your machince.  The Server returned the follwing &amp;quot;Internal error in ChangeShet commetns Policy.  Error loading the changeset comments Policy policy.&amp;quot;
&lt;br /&gt;

&lt;br /&gt;
It does reference a CheckForComments.CS with instructions.  Please help?  We are dead in the water and can't check code in right now!</description>
  <category>SQL Source Control 3</category>
  <comments>http://www.red-gate.com/MessageBoard/posting.php?mode=reply&amp;t=17253</comments>
  <dc:creator>flyer299</dc:creator>
  <pubDate>Fri, 24 May 2013 14:26:11 GMT</pubDate>
  <guid isPermaLink="true">http://www.red-gate.com/MessageBoard/viewtopic.php?p=62144#62144</guid>
 </item>
 <item>
  <title>RE: sql monitor alert level not changing down a level</title>
  <link>http://www.red-gate.com/MessageBoard/viewtopic.php?p=62143#62143</link>
  <description>ive got all the screen shots exce[t the 'frgmented indexe' tab - there isnt one !</description>
  <category>SQL Monitor 3</category>
  <comments>http://www.red-gate.com/MessageBoard/posting.php?mode=reply&amp;t=17251</comments>
  <dc:creator>stevenhoban</dc:creator>
  <pubDate>Fri, 24 May 2013 13:45:09 GMT</pubDate>
  <guid isPermaLink="true">http://www.red-gate.com/MessageBoard/viewtopic.php?p=62143#62143</guid>
 </item>
 <item>
  <title>Hopefully an easy question</title>
  <link>http://www.red-gate.com/MessageBoard/viewtopic.php?p=62142#62142</link>
  <description>Good morning all!
&lt;br /&gt;

&lt;br /&gt;
Resolved my issue which was unable to locate triggers pertaining to certain tables after decryption.  Realized the code is just all tied to the table and I have to pull the trigger code specifically and then mail it off to the developer for review.</description>
  <category>SQL Compare 10</category>
  <comments>http://www.red-gate.com/MessageBoard/posting.php?mode=reply&amp;t=17252</comments>
  <dc:creator>jessay</dc:creator>
  <pubDate>Fri, 24 May 2013 13:39:40 GMT</pubDate>
  <guid isPermaLink="true">http://www.red-gate.com/MessageBoard/viewtopic.php?p=62142#62142</guid>
 </item>
</channel>
</rss>
