SQL Server Database Engine ForumAny questions or discussions relating to the SQL Server Database Engine, performance, features, Full-text Search, linked servers, etc.© 2009 Microsoft Corporation. All rights reserved.Sat, 28 Nov 2009 12:14:22 Z53c5f5c4-8fab-48fb-92ef-a8a0ac73befbhttp://social.msdn.microsoft.com/Forums/en-US/sqldatabaseengine/thread/99ccad37-6540-4188-959a-4585048f2c78http://social.msdn.microsoft.com/Forums/en-US/sqldatabaseengine/thread/99ccad37-6540-4188-959a-4585048f2c78Vinodonlyhttp://social.msdn.microsoft.com/Profile/en-US/?user=VinodonlySql Server Dev Edition Not connecting on Windows 2003 Server from Win 7<p>I have found another issue with Win 7..<br/><br/>Management Studio of Sql Server Dev Edition 2005 installed on Win 7 is not able to connect on Windows 2003 Server where standard edition of sql server 2005 is installed. <br/><br/>The connection is working when I use the Sa password but when I use windows authentication then it is showing err msg that &quot;user is not associated with a trusted sql server connection&quot;..<br/><br/>I'm using a local admin password on win 7 and in passwords server password is saved (i.e. the domain password), I'm even able to get exchange mails so domain pass is working fine from other places but sql server is not able to connect..<br/><br/>Pls help..<br/><br/><br/><br/></p><hr class="sig">IMP : There might be a delay in posting replies due to time difference (GMT +2:00) and Friday's Holiday instead of Sunday.Thu, 26 Nov 2009 10:03:18 Z2009-11-28T12:14:22Zhttp://social.msdn.microsoft.com/Forums/en-US/sqldatabaseengine/thread/5f7dcca8-6dbe-4efb-b0d7-54a531721771http://social.msdn.microsoft.com/Forums/en-US/sqldatabaseengine/thread/5f7dcca8-6dbe-4efb-b0d7-54a531721771RushiDBAhttp://social.msdn.microsoft.com/Profile/en-US/?user=RushiDBAWhat is tail of log backupwhat is tail of log backup and how to take itSat, 28 Nov 2009 11:42:34 Z2009-11-28T11:58:54Zhttp://social.msdn.microsoft.com/Forums/en-US/sqldatabaseengine/thread/ccf7061d-e5ce-4e91-bfbb-af710b204dbchttp://social.msdn.microsoft.com/Forums/en-US/sqldatabaseengine/thread/ccf7061d-e5ce-4e91-bfbb-af710b204dbcMrFlinstonehttp://social.msdn.microsoft.com/Profile/en-US/?user=MrFlinstoneStrange Errors on SQL Server Error LogI am seeing the error logs below on my SQL server, I'm not sure if they are related to trace flag 3604. I also see something to do with memory dump as well. Please advice.<br/> <br/> <pre> 15:15:53.81 spid594 m_pageId = (1:1172094) m_headerVersion = 1 m_type = 2|0 15:15:53.81 spid594 m_typeFlagBits = 0x0 m_level = 0 m_flagBits = 0x0|0 15:15:53.81 spid594 m_objId = 954538534 m_indexId = 6 m_prevPage = (1:1102845)|0 15:15:53.81 spid594 m_nextPage = (1:1172095) pminlen = 21 m_slotCnt = 212|0 15:15:53.81 spid594 m_freeCnt = 2584 m_freeData = 5880 m_reservedCnt = 0|0 15:15:53.81 spid594 m_lsn = (119582:10616:47) m_xactReserved = 0 m_xdesId = (0:753243376)|0 15:15:53.81 spid594 m_ghostRecCnt = 0 m_tornBits = -2147483127 |0 15:15:53.81 spid594 |0 Allocation Status|0 -----------------|0 15:15:53.81 spid594 GAM (1:1022464) = ALLOCATED |0 15:15:53.81 spid594 SGAM (1:1022465) = NOT ALLOCATED |0 15:15:53.81 spid594 PFS (1:1164672) = 0x40 ALLOCATED 0_PCT_FULL DIFF (1:1022470) = CHANGED|0 15:15:53.81 spid594 ML (1:1022471) = NOT MIN_LOGGED |0 15:15:53.81 spid594 |0 DATA:|0 -----|0 15:15:53.81 spid594 |0 Memory Dump @0x3CFF0000|0 -----------------------|0 15:15:53.81 spid594 3CFF0000: 01020000 00000600 fdd31000 01001500 7fe21100 ....................|0 15:15:53.81 spid594 3CFF0014: 0100d400 261ae538 180af816 7ee21100 01000000 ....&amp;..8....~.......|0 15:15:53.81 spid594 3CFF0028: 1ed30100 78290000 2f000000 f094e52c 00000000 ....x)../......,....|0 15:15:53.81 spid594 3CFF003C: 09020080 00000000 00000000 00000000 00000000 ....................|0 15:15:53.81 spid594 3CFF0050: 00000000 00000000 00000000 00000000 1a2c0d00 .................,..|0 15:15:53.83 spid594 3CFF0064: 009c0300 00e30300 0097f79a 10000000 00040000 ....................|0 </pre>Fri, 27 Nov 2009 14:59:39 Z2009-11-28T10:44:58Zhttp://social.msdn.microsoft.com/Forums/en-US/sqldatabaseengine/thread/5717d27b-dcd9-4d00-8c72-d2b49d5aeaaehttp://social.msdn.microsoft.com/Forums/en-US/sqldatabaseengine/thread/5717d27b-dcd9-4d00-8c72-d2b49d5aeaaedvdavid2001http://social.msdn.microsoft.com/Profile/en-US/?user=dvdavid2001Problem in full-text index SQL Server 2005 Express EditionHi guys,<br/> <br/> I have a strange problem in my SQL Server 2005 Express Edition.<br/> <br/> I am using Express Edition with Advanced Services SP3 with one table was full-text indexed. The table is rather huge and it is around 1.8 GB in size. Everything was okay, the population was successful and the state of the full-text index is working normally.<br/> <br/> -- Return state of 5 which is working normally<br/> select * from sys.dm_fts_index_population <br/> <br/> -- This returns 2.8 million+ so it was populated successfully<br/> SELECT fulltextcatalogproperty('esgportaluat_catalog', 'ItemCount')<br/> <br/> <br/> Now, here is the funny things.<br/> <br/> -- Returns 23000+ records within 1 second<br/> select count(1)<br/> from esg_product_latest<br/> where result_approved_dt &gt;= CONVERT(DATETIME, '08/01/09', 1) <br/> AND   result_approved_dt &lt;= CONVERT(DATETIME, '10/29/09', 1) <br/> AND   CONTAINS((SAM_DESC), '&quot;test*&quot;')<br/> <br/> -- Returns 12000+ records within 1 second (WITHOUT full-text index)<br/> select count(1)<br/> from esg_product_latest<br/> where result_approved_dt &gt;= CONVERT(DATETIME, '10/30/09', 1)<br/> AND   result_approved_dt &lt;= CONVERT(DATETIME, '10/30/09', 1)<br/> <br/> -- HANG! I have waited for 40 mins but it never returned anything...it just said that &quot;Executing Query...&quot;<br/> select count(1)<br/> from esg_product_latest<br/> where result_approved_dt &gt;= CONVERT(DATETIME, '10/30/09', 1)<br/> AND   result_approved_dt &lt;= CONVERT(DATETIME, '10/30/09', 1)<br/> AND   CONTAINS((SAM_DESC), '&quot;test*&quot;')<br/> <br/> -- Combining with the date range that works fine (before 30 Oct 09, it works fine)<br/> -- Return 800+ records within 1 second<br/> select count(1)<br/> from esg_product_latest<br/> where result_approved_dt &gt;= CONVERT(DATETIME, '10/28/09', 1)<br/> AND   result_approved_dt &lt;= CONVERT(DATETIME, '10/30/09', 1)<br/> AND   CONTAINS((SAM_DESC), '&quot;test*&quot;')<br/> <br/> I have tested that the query will never complete if specify the date range after 10/30/09 i.e. Nov 2009 and so on. What could be the problem on this?<br/> <br/> In the log file, there is nothing wrong except one thing below. Could this be related to the HANG problem that I had?<br/> <br/> 2009-11-27 08:23:20.42 spid20s     The full-text catalog health monitor reported a failure for full-text catalog &quot;esgportaluat_catalog&quot; (5) in database &quot;esguat&quot; (7). Reason code: 0. Error: 0x800706bf(The remote procedure call failed and did not execute.). The system will restart any in-progress population from the previous checkpoint. If this message occurs frequently, consult SQL Server Books Online for troubleshooting assistance. This is an informational message only. No user action is required.<br/> <br/> Thanks<br/> DavidSat, 28 Nov 2009 06:47:49 Z2009-11-28T10:25:14Zhttp://social.msdn.microsoft.com/Forums/en-US/sqldatabaseengine/thread/5e46f43e-26ea-4a22-a111-4063d75fd337http://social.msdn.microsoft.com/Forums/en-US/sqldatabaseengine/thread/5e46f43e-26ea-4a22-a111-4063d75fd337LuisGranadoshttp://social.msdn.microsoft.com/Profile/en-US/?user=LuisGranadosHow to open a xdl fileI am trying to get the graphic deadlock information using the WMI provider, I was able to store the data on a table and then I bcp out naming the file with a .xdl extension,  after that I open the studio management and tried to open the file but I recieve this message:<br/><br/>there is no editor available for 'C:\Program Files\xmlfile.xdl' Make sure the application for the file type (.xdl) is installed.<br/><br/>Do you know what should I install/configure?Thu, 26 Nov 2009 22:34:47 Z2009-11-28T05:17:24Zhttp://social.msdn.microsoft.com/Forums/en-US/sqldatabaseengine/thread/cbd67ce1-1533-4aa8-a4a2-ade3d9f27b6chttp://social.msdn.microsoft.com/Forums/en-US/sqldatabaseengine/thread/cbd67ce1-1533-4aa8-a4a2-ade3d9f27b6csqlfrenzyhttp://social.msdn.microsoft.com/Profile/en-US/?user=sqlfrenzyHelp understanding DBCC memorystatsI have sql server 2005 sp3 enterprise edition with  awe enabled and max server memory set to 6 GB. The buffer part of the dbcc memorystatsus is given below... <div> <div>Buffer Distribution            Buffers</div> <div>------------------------------ -----------</div> <div>Stolen                         7142</div> <div>Free                           149</div> <div>Cached                         106156</div> <div>Database (clean)               540704</div> <div>Database (dirty)               113840</div> <div>I/O                            0</div> <div>Latched                        9</div> <div><br/></div> <div>(7 row(s) affected)</div> <div><br/></div> <div>Buffer Counts                  Buffers</div> <div>------------------------------ --------------------</div> <div>Committed                      768000</div> <div>Target                         768000</div> <div>Hashed                         654458</div> <div>Stolen Potential               65245</div> <div>External Reservation           6740</div> <div>Min Free                       424</div> <div>Visible                        195072</div> <div>Available Paging File          1700209</div> <div><br/></div> <div>What I have figured out from the above values is that The committed value is (768000*8)/(1024*1024) which comes out to be 6 GB approx...does this mean that Buffer pool is consuming 6GB of memory....</div> </div><hr class="sig">Cheers!!! SqlFrenzySun, 15 Nov 2009 14:41:23 Z2009-11-28T05:01:54Zhttp://social.msdn.microsoft.com/Forums/en-US/sqldatabaseengine/thread/1f8bc666-514c-4113-8507-ccf325d62870http://social.msdn.microsoft.com/Forums/en-US/sqldatabaseengine/thread/1f8bc666-514c-4113-8507-ccf325d62870bingobuddhahttp://social.msdn.microsoft.com/Profile/en-US/?user=bingobuddhaConfusing performance issue<p>I was trying to improve performance of my little project and found a lot of instances where the optimizer was doing a partial index seek and then a key lookup/index scan. Aha! I thought and went about tweaking my indexes.<br/>I now have the situation where everything is accomplished with index seeks, great yes? NO. Without getting into a debate about how inefficient my coding is ( I am a newbie ) prior to the tweaks the system was churning through 10 whole rows of data a second but now it has dropped to about 5.<br/>I have not changed a single line of code so I am really confused as how more efficient indexes have slowed it down. These are not even new extra indexes just originals I had already created but extended and they are obviously correct due to only index seeks being done.</p> <p>Some further info regarding my problem.<br/>I broke down my code into individual chunks and ran them seperately against a 1000 records. Most of the chunks completed in 10 to 15 seconds and then were a couple that took about 45 seconds. I went back to run them a second time just to make sure of the timings and then those taking 10/15 now completed in less than a second and the others in around 5 seconds.<br/>I started from scratch and rebuilt evrything and had exactly the same results.First time any query was run took about 20 times longer than subsequent queries, I could even hear my system crank up to full tilt on the first round and then sit like a mouse for round two.<br/>For one final check I then ran the same queries on the same table but using different data rows and wham bam! back to snail pace.<br/>The same indexes are being shown as used in the actual execution plan but it seems to me that although the index 'exists' it doesn't have any data in it, as though when I initially create it the structure is there but it's not populated with anything. So I run the query first time and the index gets updated, but only for that data.</p> <p>What am I missing? I build the table, bulk import my data and then create the indexes. Do I have to create before importing the data?</p> <p>Any king gurus got any pointers it would be greatly appreciated. Non-gurus also welcome.</p>Fri, 27 Nov 2009 19:27:38 Z2009-11-28T04:44:11Zhttp://social.msdn.microsoft.com/Forums/en-US/sqldatabaseengine/thread/992c0705-9812-467c-b50b-d95705c5d377http://social.msdn.microsoft.com/Forums/en-US/sqldatabaseengine/thread/992c0705-9812-467c-b50b-d95705c5d377Jeff Roughgardenhttp://social.msdn.microsoft.com/Profile/en-US/?user=Jeff%20RoughgardenAre SQL Server Deadlocks Possible Without Transactions?<p>Can one have deadlocks without the offending SQL being in transactions? We have deadlocks occuring and one process is picked as the victim (1205 errors) but cannot find where the transaction is opened for either process. These processes are being spawned by web services and they either execute stored procs or execute dynamic SQL via ADO.NET. There are no SQL level transactions in the procs or dynamic sql. We do not see implicit transactions being invoked anywhere. <br/><br/>From the deadlock trace, the situation appears to be one where Proc A has an update lock on Page 1 and wants an update lock on Page 2, while Statement B has an insert lock on Page 2 and wants an insert lock on Page 1. The proc is made the victim, but as I said earlier, we cannot find in the C# calling code or the SQL itself anyplace where a transaction is invoked.</p>Thu, 26 Nov 2009 00:11:59 Z2009-11-28T04:27:04Zhttp://social.msdn.microsoft.com/Forums/en-US/sqldatabaseengine/thread/22548caa-e6ef-431c-81be-4da153cabd37http://social.msdn.microsoft.com/Forums/en-US/sqldatabaseengine/thread/22548caa-e6ef-431c-81be-4da153cabd37subu999http://social.msdn.microsoft.com/Profile/en-US/?user=subu999Database Engine ServicesHow to start Database Engine services start what are steps we have to follow colud any body plz help me <br/><br/>because i have instaleld in MS QL SERVER 2005 in My system but DE services is not started <br/><br/>what are steps we have to follow to start these services <br/><hr class="sig">subuSat, 28 Nov 2009 00:06:12 Z2009-11-28T02:40:05Zhttp://social.msdn.microsoft.com/Forums/en-US/sqldatabaseengine/thread/efdc1f75-98f8-4f53-934c-510ca9d06810http://social.msdn.microsoft.com/Forums/en-US/sqldatabaseengine/thread/efdc1f75-98f8-4f53-934c-510ca9d06810kconhttp://social.msdn.microsoft.com/Profile/en-US/?user=kconDeadlock problem<p align=left><font face=Arial size=2>I am experiencing an intermittent deadlock error in a databse.  The deadlock is hard to produce but I did manage to capture the deadlock graph to an XML file.  All the examples I have seen of this show both the victim process and the winner process.  Unless I am reading this wrong all I get is the victim.  Can a procedure deadlock itself?  Does SQL functions that use recursion have an effect?  Can deadlocks occur in tempdb?</font></p> <p align=left><font face=Arial size=2></font> </p> <p align=left>Any ideas?</p> <p align=left> </p> <p align=left><font face=Arial size=2>Here is the XML.</font></p> <p align=left> </p> <p align=left>&lt;deadlock-list&gt;<br> &lt;deadlock victim=&quot;process6e9018&quot;&gt;<br>  &lt;process-list&gt;<br>   &lt;process id=&quot;process6e9018&quot; taskpriority=&quot;0&quot; logused=&quot;0&quot; waitresource=&quot;OBJECT: 2:1560079227:0 &quot; waittime=&quot;15&quot; ownerId=&quot;18728298&quot; transactionname=&quot;TVTruncate&quot; lasttranstarted=&quot;2008-01-07T16:12:54.740&quot; XDES=&quot;0x1a266258&quot; lockMode=&quot;Sch-M&quot; schedulerid=&quot;1&quot; kpid=&quot;2996&quot; status=&quot;suspended&quot; spid=&quot;53&quot; sbid=&quot;0&quot; ecid=&quot;0&quot; priority=&quot;0&quot; transcount=&quot;2&quot; lastbatchstarted=&quot;2008-01-07T16:12:54.570&quot; lastbatchcompleted=&quot;2008-01-07T16:12:54.477&quot; clientapp=&quot;.Net SqlClient Data Provider&quot; hostname=&quot;CONNELLY1&quot; hostpid=&quot;7700&quot; loginname=&quot;sa&quot; isolationlevel=&quot;read uncommitted (1)&quot; xactid=&quot;18728018&quot; currentdb=&quot;5&quot; lockTimeout=&quot;4294967295&quot; clientoption1=&quot;673185824&quot; clientoption2=&quot;128056&quot;&gt;<br>    &lt;executionStack&gt;<br>     &lt;frame procname=&quot;mexico.dbo.BilledToDate&quot; line=&quot;83&quot; stmtstart=&quot;4516&quot; stmtend=&quot;20946&quot; sqlhandle=&quot;0x03000500d830e523e115d500df9900000000000000000000&quot;&gt;<br>select<br>  @billedtodate=sum(billedtodate)<br> from<br> (<br> select<br>  billedtodate=0-b.amount<br> from<br>  (select projectid from projectchildren(@projectid) union select <a title="mailto:projectid=@projectid" href="mailto:projectid=@projectid">projectid=@projectid</a>) a<br>  join adjustmentitems b on a.projectid=b.projectid<br>  and b.isposted=1<br>  join adjustments c on b.gjid=c.gjid<br>  join glaccounts d on b.glid=d.glid<br>  join glbasecodes e on d.baseid=e.baseid<br>  and <br>  (<br>  (<a title="mailto:e.metrictypeid=@billedtype" href="mailto:e.metrictypeid=@billedtype">e.metrictypeid=@billedtype</a> and @isrevenue=1) or<br>  (<a title="mailto:e.metrictypeid=@retainagetype" href="mailto:e.metrictypeid=@retainagetype">e.metrictypeid=@retainagetype</a> and @incretainage=1) or<br>  (<a title="mailto:e.metrictypeid=@retainertype" href="mailto:e.metrictypeid=@retainertype">e.metrictypeid=@retainertype</a> and @incretainer=1)<br>  )<br>  and <br>  (<br>  (<a title="mailto:e.pmtypeid=@labortype" href="mailto:e.pmtypeid=@labortype">e.pmtypeid=@labortype</a> and @incdirectlabor=1 and <a title="mailto:laborrevtypeid=@dltype" href="mailto:laborrevtypeid=@dltype">laborrevtypeid=@dltype</a>) or<br>  (<a title="mailto:e.pmtypeid=@labortype" href="mailto:e.pmtypeid=@labortype">e.pmtypeid=@labortype</a> and @incdpeoh=1 and <a title="mailto:laborrevtypeid=@dpeohtype" href="mailto:laborrevtypeid=@dpeohtype">laborrevtypeid=@dpeohtype</a>) or<br>  (<a title="mailto:e.pmtypeid=@labortype" href="mailto:e.pmtypeid=@labortype">e.pmtypeid=@labortype</a> and @incprofit=1 and <a title="mailto:laborrevtypeid=@prtype" href="mailto:laborrevtypeid=@prtype">laborrevtypeid=@prtype</a>) or<br>  (<a title="mailto:e.pmtypeid=@labortype" href="mailto:e.pmtypeid=@labortype">e.pmtypeid=@labortype</a> and @incfixedfee=1 and <a title="mailto:laborrevtypeid=@fftype" href="mailto:laborrevtypeid=@fftype">laborrevtypeid=@fftype</a>) or<br>  (<a title="mailto:e.pmtypeid=@icctype" href="mailto:e.pmtypeid=@icctype">e.pmtypeid=@icctype</a> and @incicc=1) or<br>  (<a title="mailto:e.pmtypeid=@odctype" href="mailto:e.pmtypeid=@odctype">e.pmtypeid=@odctype</a> and @incdirectodc=1 and <a title="mailto:exprevtypeid=@dexptype" href="mailto:exprevtypeid=@dexptype">exprevtypeid=@dexptype</a>) or<br>  (<a title="mailto:e.pmtypeid=@odctype" href="mailto:e.pmtypeid=@odctype">e.pmtypeid=@odctype</a> and     &lt;/frame&gt;<br>     &lt;frame procname=&quot;mexico.dbo.CUSInv_PFF_Labor_Sav&quot; line=&quot;34&quot; stmtstart=&quot;2178&quot; stmtend=&quot;4250&quot; sqlhandle=&quot;0x03000500105aff7b2cd0b3001c9a00000100000000000000&quot;&gt;<br>insert #projs<br>(<br> projectid,<br> factid,<br> projectlevel,<br> projectcode,<br> projectpath,<br> projectname,<br> fixedfee,<br> fixedfeepc,<br> fixedfeebilledtodate<br>)<br>select<br> projectid=a.projectid,<br> factid=b.factid,<br> projectid=b.projectlevel,<br> projectcode=b.projectcode,<br> projectpath=b.projectpath,<br> projectname=b.projectname,<br> fixedfee=b.fixedfee,<br> fixedfeepc=b.fixedfeepc,<br> fixedfeebilledtodate=dbo.billedtodate(b.projectid,@asofdate,0,0,0,1,1,0,0,0,0,0,0)<br>from projectchildren(@projectid) a<br> join projects b on a.projectid=b.projectid<br>where b.projectlevel&amp;lt;=@projectlevel+@contractlevel-1<br>and (b.fixedfee&amp;gt;0 or 1=0)<br>and dbo.isinvfilter(a.projectid,'F')=1<br>union<br>select<br> projectid=a.projectid,<br> factid=a.factid,<br> projectid=a.projectlevel,<br> projectcode,<br> projectpath,<br> projectname,<br> fixedfee=a.fixedfee,<br> fixedfeepc=a.fixedfeepc,<br> fixedfeebilledtodate=dbo.billedtodate(a.projectid,@asofdate,0,0,0,1,1,0,0,0,0,0,0)<br>from projects a<br>where <a title="mailto:projectid=@projectid" href="mailto:projectid=@projectid">projectid=@projectid</a><br>and (a.fixedfee&amp;gt;0 or 1=0)<br>and dbo.isinvfilter(a.proje     &lt;/frame&gt;<br>    &lt;/executionStack&gt;<br>    &lt;inputbuf&gt;<br>Proc [Database Id = 5 Object Id = 2080332304]    &lt;/inputbuf&gt;<br>   &lt;/process&gt;<br>  &lt;/process-list&gt;<br>  &lt;resource-list&gt;<br>   &lt;objectlock lockPartition=&quot;0&quot; objid=&quot;1560079227&quot; subresource=&quot;FULL&quot; dbid=&quot;2&quot; objectname=&quot;tempdb.dbo.#5CFCEB7B&quot; id=&quot;lock83e0b00&quot; mode=&quot;Sch-S&quot; associatedObjectId=&quot;1560079227&quot;&gt;<br>    &lt;owner-list&gt;<br>     &lt;owner id=&quot;process6e9018&quot; mode=&quot;Sch-S&quot;/&gt;<br>    &lt;/owner-list&gt;<br>    &lt;waiter-list&gt;<br>     &lt;waiter id=&quot;process6e9018&quot; mode=&quot;Sch-M&quot; requestType=&quot;wait&quot;/&gt;<br>    &lt;/waiter-list&gt;<br>   &lt;/objectlock&gt;<br>  &lt;/resource-list&gt;<br> &lt;/deadlock&gt;<br>&lt;/deadlock-list&gt;<br> </p>Mon, 07 Jan 2008 22:40:54 Z2009-11-28T02:18:39Zhttp://social.msdn.microsoft.com/Forums/en-US/sqldatabaseengine/thread/f5eb164d-9774-4864-ae05-cac99740949bhttp://social.msdn.microsoft.com/Forums/en-US/sqldatabaseengine/thread/f5eb164d-9774-4864-ae05-cac99740949bVahid66http://social.msdn.microsoft.com/Profile/en-US/?user=Vahid66Failed to generate a user instance of SQL Server due to a failure in starting the process for the user instance<p class=MsoNormal style="margin:0in 0in 0pt"><font face="Times New Roman">No wonder Microsoft is giving it away for free. It’s not worth anything. I am very disappointed in this version of SQL server. I decided to start learning VB so I downloaded and installed VB 2005 express edition and SQL 2005 express. I tried to build a personal website using the starter kit. I kept getting the following error message, for which I have seen numerous postings on this forum.</font></p> <p class=MsoNormal style="margin:0in 0in 0pt"><font face="Times New Roman">“Failed to generate a user instance of SQL Server due to a failure in starting the process for the user instance. The connection will be closed.” </font></p> <p class=MsoNormal style="margin:0in 0in 0pt"><font face="Times New Roman">I went out and bought the Standard version of VS 2005 thinking there may be a feature that the free express version is lacking. I uninstalled the express version, cleaned the registry, deleted all the folders it created and installed the Standard edition. Then I tried to create a personal web using the starter kit and it does the same thing again.</font></p> <p class=MsoNormal style="margin:0in 0in 0pt"><font face="Times New Roman">I can not create a database file, connect to a database file. I can not create or attach a database on the SQL 2005 express from VS 2005. The SQL server Express seems to be working OK since I can attach to it using Microsoft SQL Server Management Studio Express. There is something about the way VS tries to connect to the database server that is not working. VB does recognize the local computer as a SQL server but can not connect to it.</font></p> <p class=MsoNormal style="margin:0in 0in 0pt"><font face="Times New Roman">SQL server is set to accept Shared memory, TCP/IP and named pipes for local clients.</font></p> <p class=MsoNormal style="margin:0in 0in 0pt"><font face="Times New Roman">What is causing this?</font></p> <p class=MsoNormal style="margin:0in 0in 0pt"><font face="Times New Roman">This is some information on the system I am using:</font></p> <p class=MsoNormal style="margin:0in 0in 0pt"><font face="Times New Roman"> </font></p> <p class=MsoNormal style="margin:0in 0in 0pt"><font face="Times New Roman">MS XP (SP2)</font></p> <p class=MsoNormal style="margin:0in 0in 0pt"><font face="Times New Roman"> </font></p> <p class=MsoNormal style="margin:0in 0in 0pt"><font face="Times New Roman">Microsoft Visual Studio 2005</font></p> <p class=MsoNormal style="margin:0in 0in 0pt"><font face="Times New Roman">Version 8.0.50727.42<span style="">  </span>(RTM.050727-4200)</font></p> <p class=MsoNormal style="margin:0in 0in 0pt"><font face="Times New Roman">Microsoft .NET Framework</font></p> <p class=MsoNormal style="margin:0in 0in 0pt"><font face="Times New Roman">Version 2.0.50727</font></p> <p class=MsoNormal style="margin:0in 0in 0pt"><font face="Times New Roman">Installed Edition: Standard</font></p> <p class=MsoNormal style="margin:0in 0in 0pt"><font face="Times New Roman"> </font></p> <p class=MsoNormal style="margin:0in 0in 0pt"><font face="Times New Roman">Microsoft SQL Server Management Studio Express<span style="">      </span><span style="">            </span><span style="">            </span><span style="">            </span><span style="">            </span><span style="">            </span>9.00.1399.00</font></p> <p class=MsoNormal style="margin:0in 0in 0pt"><font face="Times New Roman">Microsoft Data Access Components (MDAC)<span style="">  </span><span style="">            </span><span style="">            </span><span style="">            </span><span style="">            </span><span style="">            </span>2000.085.1117.00 (xpsp_sp2_rtm.040803-2158)</font></p> <p class=MsoNormal style="margin:0in 0in 0pt"><font face="Times New Roman">Microsoft MSXML<span style="">      </span><span style="">            </span><span style="">            </span><span style="">            </span><span style="">            </span><span style="">            </span>2.6 3.0 4.0 5.0 6.0 </font></p> <p class=MsoNormal style="margin:0in 0in 0pt"><font face="Times New Roman">Microsoft Internet Explorer<span style="">       </span><span style="">            </span><span style="">            </span><span style="">            </span><span style="">            </span><span style="">            </span>6.0.2900.2180</font></p> <p class=MsoNormal style="margin:0in 0in 0pt"><font face="Times New Roman">Microsoft .NET Framework<span style="">     </span><span style="">            </span><span style="">            </span><span style="">            </span><span style="">            </span><span style="">            </span>2.0.50727.42</font></p> <p class=MsoNormal style="margin:0in 0in 0pt"><font face="Times New Roman">Operating System<span style="">         </span><span style="">            </span><span style="">            </span><span style="">            </span><span style="">            </span><span style="">            </span>5.1.2600</font></p> <p class=MsoNormal style="margin:0in 0in 0pt"><font face="Times New Roman"> </font></p> <p class=MsoNormal style="margin:0in 0in 0pt"><font face="Times New Roman">I am now to programming but nor computer illiterate. I have been working with MS SQL servers since version 6.5 and have MCSE, Network+, A+ and Security plus certifications. Installing and using VS should not be this problematic. What is wrong with Microsoft?</font></p>Sun, 12 Mar 2006 06:29:50 Z2009-11-27T19:04:58Zhttp://social.msdn.microsoft.com/Forums/en-US/sqldatabaseengine/thread/da13f2eb-cbbc-46da-bea1-d02bee31fcc1http://social.msdn.microsoft.com/Forums/en-US/sqldatabaseengine/thread/da13f2eb-cbbc-46da-bea1-d02bee31fcc1KIRUPA WTShttp://social.msdn.microsoft.com/Profile/en-US/?user=KIRUPA%20WTSTROUBLE LOGIN SQL SERVER 2005 ENTERPRISEHi I am new to SQL SERVER 2005, I installed the SQL SERVER 2005 ENTERPRISE EDITION in my windows xp machine, there is no problem in installation, the problem is while connecting to the server it asks three details for validation<br/><br/>server name:<br/>Authentication:<br/><br/>I dont konw the default server name? can anybody help me with this briefly how to login for the first time into the sql server 2005, Thanks in advance<br/>Fri, 27 Nov 2009 03:58:06 Z2009-11-27T18:34:43Zhttp://social.msdn.microsoft.com/Forums/en-US/sqldatabaseengine/thread/46f1d90a-9dd5-4ba2-bca6-1378b9beb80chttp://social.msdn.microsoft.com/Forums/en-US/sqldatabaseengine/thread/46f1d90a-9dd5-4ba2-bca6-1378b9beb80cbrvalandhttp://social.msdn.microsoft.com/Profile/en-US/?user=brvalandAutogrow of log file - ErrorHi Experts<br/> <br/> I am using SQL Server 2000 (v8.0.2039). I am receiving the below error message.<br/> <br/> Autogrow of file 'XXX_Log' in database 'XXXX' cancelled or timed out after 203 ms.  Use ALTER DATABASE to set a smaller FILEGROWTH or to set a new size.<br/> <br/> Can you please advise what actions needs to be taken?<br/> <br/> Kind Regards<br/> Bhavesh<hr class="sig">BhaveshFri, 20 Nov 2009 12:55:12 Z2009-11-27T18:21:50Zhttp://social.msdn.microsoft.com/Forums/en-US/sqldatabaseengine/thread/bf2f6965-9cc6-4cd2-9261-864c7b14ab7ahttp://social.msdn.microsoft.com/Forums/en-US/sqldatabaseengine/thread/bf2f6965-9cc6-4cd2-9261-864c7b14ab7aSUB77http://social.msdn.microsoft.com/Profile/en-US/?user=SUB77Cross database and Distributed Transactions&quot;Using database mirroring for Distributed Trasactions and cross database transactions are not supported in SQL Server 2005.&quot;<br/><br/>Is this still an issue after SP3 (2005)?<br/><br/>Is there any change in SQL 2008?Fri, 27 Nov 2009 16:25:33 Z2009-11-27T17:00:47Zhttp://social.msdn.microsoft.com/Forums/en-US/sqldatabaseengine/thread/d857f520-68f7-4ae9-b8c7-7a832a8f711ehttp://social.msdn.microsoft.com/Forums/en-US/sqldatabaseengine/thread/d857f520-68f7-4ae9-b8c7-7a832a8f711eSUB77http://social.msdn.microsoft.com/Profile/en-US/?user=SUB77CHEKPOINT QUEUE<p>Hi All,</p> <p> I was observing the wait_type CHECKPOINT_QUEUE using the DMV SYS.DM_OS_WAITING_TASK.</p> <p>As per BOL it is documented that CHECKPOINT_QUEUE  &quot;Occurs while the checkpoint task is waiting for the next checkpoint request.&quot;</p> <p>As all of you know that the Full Bakcup should initiate a Checkpoint on the database. and i could see there is a check point happend due to full backup from the DBCC LOG  command. But the CHECKPOINT_QUEUE  wait type still continuous to be growing (Did not reset after the Full Backup)</p> <p>Any thoughts on this?</p>Fri, 27 Nov 2009 12:34:07 Z2009-11-27T18:02:07Zhttp://social.msdn.microsoft.com/Forums/en-US/sqldatabaseengine/thread/7da7a003-59d2-428a-90e5-36f51ec3cfb3http://social.msdn.microsoft.com/Forums/en-US/sqldatabaseengine/thread/7da7a003-59d2-428a-90e5-36f51ec3cfb3pateramjhttp://social.msdn.microsoft.com/Profile/en-US/?user=pateramjKeys disappearingSeveral times now the primary key on one of my SQL Server 2008 tables has disappeared. I go to generate LINQ to SQL objects using SQLMetal, and it tells me that the table has no primary key, so I pull open SQL Management Studio, set the primary key (on an identity integer column, nothing fancy), save my change, re-generate code, and everything seems to be fine again. But later I'll try and re-generate and the primary key will be gone again. On top of that, I've now just experienced a foreign key reference going missing. The relationship is between two tables different from the table with the primary key problem. <div><br/></div> <div>I've tried restarting SQL Server, as well as re-generating code, and neither of these actions reproduces my problem. I'm running Windows 7, Visual Studio 2010 Team Edition (Beta 2) (formerly using it to generate my objects in a DBML file, but that was before I switched to SQLMetal), and I've got a SQL Database project that I use to track my database changed in TFS. Running that does not reproduce the problem, either.</div> <div><br/></div> <div>Does anyone have any ideas what might possibly be causing these errors with my database Schema? I'll provide more information if needed.</div>Wed, 25 Nov 2009 22:26:23 Z2009-11-27T14:56:01Zhttp://social.msdn.microsoft.com/Forums/en-US/sqldatabaseengine/thread/50e0f7fd-2884-467a-b9cb-bef3f53f997ahttp://social.msdn.microsoft.com/Forums/en-US/sqldatabaseengine/thread/50e0f7fd-2884-467a-b9cb-bef3f53f997aNigel Carrhttp://social.msdn.microsoft.com/Profile/en-US/?user=Nigel%20CarrMSSQLSERVER won't start event 9003 logged master corrupt<p>Hi,<br/><br/>I am running SBS2003 R2 as a test server - no backup and I know I should have. Following Patch Tuesday this week the server was stuck in &quot;Server is shutting down&quot; process. I left this for 24 hours or so but eventually had to hit the reset button due to performance issues.<br/><br/>Since this reboot SQLServer fails to start. EventID 9003 is logged which points to a corrupt master db. I have googled and found sites stating to use DBCC but as the service wont start I can not connect to it to run DBCC.<br/><br/>eventvwr events<br/>Event Type: Error<br/>Event Source: MSSQLSERVER<br/>Event Category: (2)<br/>Event ID: 9003<br/>Date:  27/11/2009<br/>Time:  11:25:32<br/>User:  N/A<br/>Computer: SBS2K3R2<br/>Description:<br/>The log scan number (225:112:1) passed to log scan in database 'master' is not valid. This error may indicate data corruption or that the log file (.ldf) does not match the data file (.mdf). If this error occurred during replication, re-create the publication. Otherwise, restore from backup if the problem results in a failure during startup.</p> <p>For more information, see Help and Support Center at <a href="http://go.microsoft.com/fwlink/events.asp">http://go.microsoft.com/fwlink/events.asp</a>.<br/>Data:<br/>0000: 2b 23 00 00 14 00 00 00   +#......<br/>0008: 09 00 00 00 53 00 42 00   ....S.B.<br/>0010: 53 00 32 00 4b 00 33 00   S.2.K.3.<br/>0018: 52 00 32 00 00 00 00 00   R.2.....<br/>0020: 00 00                     ..     </p> <p><br/>Event Type: Information<br/>Event Source: MSSQLSERVER<br/>Event Category: (2)<br/>Event ID: 3417<br/>Date:  27/11/2009<br/>Time:  11:25:33<br/>User:  N/A<br/>Computer: SBS2K3R2<br/>Description:<br/>Cannot recover the master database. SQL Server is unable to run. Restore master from a full backup, repair it, or rebuild it. For more information about how to rebuild the master database, see SQL Server Books Online.</p> <p>For more information, see Help and Support Center at <a href="http://go.microsoft.com/fwlink/events.asp">http://go.microsoft.com/fwlink/events.asp</a>.<br/>Data:<br/>0000: 59 0d 00 00 0a 00 00 00   Y.......<br/>0008: 09 00 00 00 53 00 42 00   ....S.B.<br/>0010: 53 00 32 00 4b 00 33 00   S.2.K.3.<br/>0018: 52 00 32 00 00 00 00 00   R.2.....<br/>0020: 00 00                     ..     </p> <p> </p> <p>ERRORLOG<br/>2009-11-27 11:25:28.20 Server      Microsoft SQL Server 2005 - 9.00.4035.00 (Intel X86) <br/> Nov 24 2008 13:01:59 <br/> Copyright (c) 1988-2005 Microsoft Corporation<br/> Workgroup Edition on Windows NT 5.2 (Build 3790: Service Pack 2)</p> <p>2009-11-27 11:25:28.24 Server      (c) 2005 Microsoft Corporation.<br/>2009-11-27 11:25:28.24 Server      All rights reserved.<br/>2009-11-27 11:25:28.24 Server      Server process ID is 3300.<br/>2009-11-27 11:25:28.24 Server      Authentication mode is MIXED.<br/>2009-11-27 11:25:28.25 Server      Logging SQL Server messages in file 'C:\Program Files\Microsoft SQL Server\MSSQL.2\MSSQL\LOG\ERRORLOG'.<br/>2009-11-27 11:25:28.25 Server      This instance of SQL Server last reported using a process ID of 6440 at 27/11/2009 10:52:37 (local) 27/11/2009 10:52:37 (UTC). This is an informational message only; no user action is required.<br/>2009-11-27 11:25:28.34 Server      Registry startup parameters:<br/>2009-11-27 11:25:28.36 Server        -d C:\Program Files\Microsoft SQL Server\MSSQL.2\MSSQL\DATA\master.mdf<br/>2009-11-27 11:25:28.36 Server        -e C:\Program Files\Microsoft SQL Server\MSSQL.2\MSSQL\LOG\ERRORLOG<br/>2009-11-27 11:25:28.36 Server        -l C:\Program Files\Microsoft SQL Server\MSSQL.2\MSSQL\DATA\mastlog.ldf<br/>2009-11-27 11:25:28.45 Server      SQL Server is starting at normal priority base (=7). This is an informational message only. No user action is required.<br/>2009-11-27 11:25:28.45 Server      Detected 2 CPUs. This is an informational message; no user action is required.<br/>2009-11-27 11:25:29.34 Server      Using dynamic lock allocation.  Initial allocation of 2500 Lock blocks and 5000 Lock Owner blocks per node.  This is an informational message only.  No user action is required.<br/>2009-11-27 11:25:30.52 Server      Attempting to initialize Microsoft Distributed Transaction Coordinator (MS DTC). This is an informational message only. No user action is required.<br/>2009-11-27 11:25:32.41 Server      Attempting to recover in-doubt distributed transactions involving Microsoft Distributed Transaction Coordinator (MS DTC). This is an informational message only. No user action is required.<br/>2009-11-27 11:25:32.50 Server      Database mirroring has been enabled on this instance of SQL Server.<br/>2009-11-27 11:25:32.66 spid5s      Starting up database 'master'.<br/>2009-11-27 11:25:32.94 spid5s      Error: 9003, Severity: 20, State: 1.<br/>2009-11-27 11:25:32.94 spid5s      The log scan number (225:112:1) passed to log scan in database 'master' is not valid. This error may indicate data corruption or that the log file (.ldf) does not match the data file (.mdf). If this error occurred during replication, re-create the publication. Otherwise, restore from backup if the problem results in a failure during startup. <br/>2009-11-27 11:25:33.01 spid5s      Cannot recover the master database. SQL Server is unable to run. Restore master from a full backup, repair it, or rebuild it. For more information about how to rebuild the master database, see SQL Server Books Online.<br/><br/><br/>Thanks in advance<br/><br/>Cheers<br/><br/>Nigel</p>Fri, 27 Nov 2009 11:47:25 Z2009-11-27T14:10:46Zhttp://social.msdn.microsoft.com/Forums/en-US/sqldatabaseengine/thread/ae4db890-c15e-44de-a2af-e85c04260331http://social.msdn.microsoft.com/Forums/en-US/sqldatabaseengine/thread/ae4db890-c15e-44de-a2af-e85c04260331Alexey Rokhinhttp://social.msdn.microsoft.com/Profile/en-US/?user=Alexey%20RokhinCannot shrink log file because all logical log files are in use<p>SQL 2005 9.0.2153 EE English<br>Database has recovery model = Full</p> <p>I have job which is executed at night time. It executes these main tasks (in order of execution)<br>1. Renames transaction log backup of previous day.<br>2. Executes maintenance plan (check database -&gt; rebuild indexes -&gt; update statistics)<br>3. Makes fake backup of transaction log (to remove it later).<br>4. Shrinks log (dbcc shrinkfile(...,0, TRUNCATEONLY).<br>5. Deletes fake backup from step 3.<br>6. Makes full backup of database.</p> <p>There is another job that executes every 15 minute at work time which backups transaction log.<br><br>Step 4 finishes with message &quot;Cannot shrink log file ... because all logical log files are in use&quot;. And log size remains unchanged.</p> <p>If I try to shrink log at work time using same dbcc shrinkfile I don't get message and log becomes small.</p> <p>I added 2 steps with checkpointing. Now job executes these steps:</p> <p>1. Renames transaction log backup of previous day.<br>2. Executes maintenance plan (check database -&gt; rebuild indexes -&gt; update statistics)<br>3. Checkpoints database<br>4. Makes fake backup of transaction log (to remove it later).<br>5. Checkpoints database<br>6. Shrinks log (dbcc shrinkfile(...,0, TRUNCATEONLY).<br>7. Deletes fake backup from step 3.<br>8. Makes full backup of database.</p> <p>But message occures yet and log is not shrinked.<br>What I need to do to shrink log automatically. I need to shrink it because it grows very much after maintenence plan.<br></p>Thu, 05 Oct 2006 09:23:34 Z2009-11-27T13:03:18Zhttp://social.msdn.microsoft.com/Forums/en-US/sqldatabaseengine/thread/c93d84c8-7062-49ce-8a91-827cb59028c3http://social.msdn.microsoft.com/Forums/en-US/sqldatabaseengine/thread/c93d84c8-7062-49ce-8a91-827cb59028c3nagendra baligahttp://social.msdn.microsoft.com/Profile/en-US/?user=nagendra%20baligabackup SQL Server 2005 database without data<p>I have one stored procedure to backup the database. It will backup metadata as well as data.</p> <p>Is there any option to back up the database with out data. ie, back up only the schema (Empty tables).</p> <p>I dont want scripting the database.</p>Fri, 27 Nov 2009 07:08:57 Z2009-11-27T10:49:56Zhttp://social.msdn.microsoft.com/Forums/en-US/sqldatabaseengine/thread/370a4fdc-856b-47d6-8883-56c3c26b6e15http://social.msdn.microsoft.com/Forums/en-US/sqldatabaseengine/thread/370a4fdc-856b-47d6-8883-56c3c26b6e15Martincruisehttp://social.msdn.microsoft.com/Profile/en-US/?user=MartincruiseSQL Server connection terminate<br/> <p>When I start SQL Server it terminates the connection. I cannot rebuild the connection in subsequent attempts. Even i have not got any error message.</p>Fri, 27 Nov 2009 10:34:40 Z2009-11-27T10:41:50Zhttp://social.msdn.microsoft.com/Forums/en-US/sqldatabaseengine/thread/63098c75-9891-4dd6-a671-7fcc4dc868cahttp://social.msdn.microsoft.com/Forums/en-US/sqldatabaseengine/thread/63098c75-9891-4dd6-a671-7fcc4dc868carastamulahttp://social.msdn.microsoft.com/Profile/en-US/?user=rastamulahow to create automatic refresh every 30 minutesi Need create automatic refresh every 30 minutes. help from chileWed, 11 Nov 2009 20:50:09 Z2009-11-27T09:10:41Zhttp://social.msdn.microsoft.com/Forums/en-US/sqldatabaseengine/thread/0ea96c62-39a3-46be-85a1-833ae76ad917http://social.msdn.microsoft.com/Forums/en-US/sqldatabaseengine/thread/0ea96c62-39a3-46be-85a1-833ae76ad917Riddhishahttp://social.msdn.microsoft.com/Profile/en-US/?user=RiddhishaIndexed Views on Tables in another DatabaseHI ,<br/><br/>Sql Server does not allow to create Indexed Views on tables in another Database. <br/>Is there a way around this??<br/>OR  Is there some other concept which can provide similiar functionality?<br/><br/>I am pretty new to SQL Server 2008.<br/><br/>Thanks.Fri, 27 Nov 2009 04:21:54 Z2009-11-27T15:48:37Zhttp://social.msdn.microsoft.com/Forums/en-US/sqldatabaseengine/thread/a74c08d1-a8a2-42bb-89e6-8f8281116ffchttp://social.msdn.microsoft.com/Forums/en-US/sqldatabaseengine/thread/a74c08d1-a8a2-42bb-89e6-8f8281116ffcccslaihttp://social.msdn.microsoft.com/Profile/en-US/?user=ccslaiSQL 2005 and LDF files. Are the following command acceptable and sufficient?I inherited a SQL 2005 server which has a database SBO-COMMON in full recovery model.<br/><br/>sbo-common, d:\sql data\sbo-common.mdf, initial size 596 MB<br/>sbo-common_log, d:\sql data\sbo-common_log.ldf, initial size 30000 MB<br/><br/>As of now,<br/><br/>sbo-common.mdf 609KB<br/>sbo-common_log.ldf 29322533KB<br/><br/>If I schedule the following commands every night before the tape backup runs:<br/><br/>---------------------------------------------------<br/><br/>use [sbo-common]<br/>go<br/>backup database [sbo-common] to disk = 'f:\sql backup\sbo-common.bak'<br/>go<br/>backup log [sbo-common] to disk = 'f:\sql backup\sbo-common_log.bak'<br/>go<br/>dbcc shrinkfile ('sbo-common_log',emptyfile)<br/>go<br/><br/>------------------------------------------------------------------------<br/><br/>Would the above be acceptable and sufficient?  I want the sbo-common_log.bak file to shrink.<br/><br/>What if I did the following?<br/><br/>----------------------------------------------------<br/><br/>use [sbo-common]<br/>go<br/>dbcc shrinkfile ('sbo-common_log',emptyfile)<br/>go<br/>backup database [sbo-common] to disk = 'f:\sql backup\sbo-common.bak'<br/>go<br/>backup log [sbo-common] to disk = 'f:\sql backup\sbo-common_log.bak'<br/>go<br/><br/>------------------------------------------------<br/><br/>How will that affect my ability to restore a DB from tape backup if something happens? Sun, 08 Nov 2009 22:54:08 Z2009-11-28T04:30:16Zhttp://social.msdn.microsoft.com/Forums/en-US/sqldatabaseengine/thread/67f5aa61-759b-4c6a-9200-49ca92378066http://social.msdn.microsoft.com/Forums/en-US/sqldatabaseengine/thread/67f5aa61-759b-4c6a-9200-49ca92378066Naga1982http://social.msdn.microsoft.com/Profile/en-US/?user=Naga1982Robo Copy command to transfer sql server logshipping files<p>Hi Experts<br/> <br/>I want to Copy log shipping files between primary and secondary servers.<br/>Can some one help in providing the robocopy command for copying the files on to secondary server.There is no other go except roby copy as i have network related issues.</p> <p>As a known fact, the logshipping file names will be dynamic with the datestamp included in the filename.</p> <p>It has to pick only the files which are not existing on the secondary server.</p> <p>This process to be scheduled in sql server agent. <br/>Windows server 2003 with sql 2005 64-bit<br/><br/>Or is there any other way to handle this with xp_cmdshell (with dynamic file names and check if the files exist on secondary)</p> <p>Thanks<br/>Naga</p>Tue, 24 Nov 2009 15:45:20 Z2009-11-27T01:09:27Zhttp://social.msdn.microsoft.com/Forums/en-US/sqldatabaseengine/thread/7c1ea9bf-b877-4242-a613-8278543b2f49http://social.msdn.microsoft.com/Forums/en-US/sqldatabaseengine/thread/7c1ea9bf-b877-4242-a613-8278543b2f49David Hillshttp://social.msdn.microsoft.com/Profile/en-US/?user=David%20Hillstranscation log suddenly growingGood Afternoon<br/><br/>My database is 60GByte.<br/><br/>The transaction Log is normally about 2Gbyte.<br/><br/>it's backed up every 4hrs.<br/><br/>The database is in full recovery mode and a full backup is done every 24hrs.<br/><br/>Occasionally the transaction Log grows to 80Gbyte.<br/><br/>How can I find out what's causing this?<br/><br/>any ideas much appreciated<br/><br/>Thanks<br/><br/><br/><br/>David Hills<br/><br/><br/>Thu, 26 Nov 2009 15:04:56 Z2009-11-27T15:49:50Zhttp://social.msdn.microsoft.com/Forums/en-US/sqldatabaseengine/thread/7871719d-430d-4500-9e9e-de52a2bab5cchttp://social.msdn.microsoft.com/Forums/en-US/sqldatabaseengine/thread/7871719d-430d-4500-9e9e-de52a2bab5ccLuisGranadoshttp://social.msdn.microsoft.com/Profile/en-US/?user=LuisGranadosdeadlock alert implementationI followed the WMI provider approach, to obtain my database deadlock information, accourding to the following link:<br/><br/><a title="http://msdn2.microsoft.com/en-us/library/ms186385.aspx" href="http://msdn2.microsoft.com/en-us/library/ms186385.aspx"><span style="color:#0066dd">http://msdn2.microsoft.com/en-us/library/ms186385.aspx</span></a><br/><br/><br/>Now I have the data stored as XML on the table, I also configured my database mail settings to get e mails. But I have one question, how can I view the xml field as a deadlock graphic on the e mail?Thu, 26 Nov 2009 17:10:12 Z2009-11-26T17:10:12Zhttp://social.msdn.microsoft.com/Forums/en-US/sqldatabaseengine/thread/39535fb0-e697-4ee3-a135-4555a448320dhttp://social.msdn.microsoft.com/Forums/en-US/sqldatabaseengine/thread/39535fb0-e697-4ee3-a135-4555a448320dKevinHollingshttp://social.msdn.microsoft.com/Profile/en-US/?user=KevinHollingsDropping an old legacy system table - syskeysWe have a database that has been migrated from 2000 to 2005 a few years ago, when we try and do a dbcc checkdb we get a check catalog msg 3854, the offending object is a system table syskeys and the unique constraint UQ__syskeys__081660B5, i have done some research and i think that syskeys is an old sybase/sql server 6.5 system table, the sys.objects table indicates that this table is no longer a sql server system table (is_ms_shipped = 0)<br/> <br/> Can someone confirm that this is in fact a legacy table and it can be dropped and how i can drop it, i have tried it on a copy of the database and because it has a type of 'S' it still thinks it's a system table and hence won't let me drop it.<br/> <br/> Thanks in advance<br/> <br/> Kevin.....Thu, 26 Nov 2009 13:24:38 Z2009-11-26T16:10:02Zhttp://social.msdn.microsoft.com/Forums/en-US/sqldatabaseengine/thread/b0454769-d1bb-45fd-a04e-a6ebbe614aa9http://social.msdn.microsoft.com/Forums/en-US/sqldatabaseengine/thread/b0454769-d1bb-45fd-a04e-a6ebbe614aa9JaedenRuinerhttp://social.msdn.microsoft.com/Profile/en-US/?user=JaedenRuinerLinked Server Does Not Work while OpenDataSource/OpenRowSet doesOkay,<br/> <br/> I'm doing some massive imports and manipulations of data from an Excel file into multiple tables of a database.  Originally I had all my scripts set up to use OpenRowSet() adhoc queries, because I've used them and they are tried and true tested to always work the way i've been using them.  <br/> <br/> However, in the fun of experimenting on LInked servers, I found I could linke the different instances of SQL Server together, and it was most beneficial for certain situations, and I thought: Why not do this with my Excel Files, so I DOn't need to Search/Replace the FIle name every time the file gets updated on the server.  <br/> <br/> So, the SQL SErver instance is running on my personal PC.  (For Development and Debugging purposes.  I later migrate my creations to the Network SQL Server Instance).  <br/> <br/> The File Is on my Personal PC.  (don't feel like dealing with the occasional glitch with the SPN's and all that headache, so I'm just dealing with a LOCAL file for the moment.)<br/> <br/> <span style="text-decoration:underline">OpenRowSet:</span> <br/>         SELECT * <br/>         FROM OPENROWSET('Microsoft.Jet.OLEDB.4.0', 'Excel 8.0; Database=C:\Source\Excel\BOL Account #s Master-Edits 11.20.09.xls', [SortCenters$])<br/> <br/>         SELECT *<br/>         FROM OPENROWSET('Microsoft.Jet.OLEDB.4.0', 'Excel 8.0; Database=C:\Source\Excel\BOL Account #s Master-Edits 11.20.09.XLS', [AllPoolCorbi$]) <br/> <br/> <span style="text-decoration:underline">OpenDataSource:</span> <br/>   Select * <br/>   FROM OPENDATASOURCE('Microsoft.Jet.OLEDB.4.0', 'Data Source=&quot;C:\Source\Excel\BOL Account #s Master-Edits 11.20.09.xls&quot;;Extended Properties=Excel 8.0')...[SortCenters$] a<br/>   Select * <br/>   FROM OPENDATASOURCE('Microsoft.Jet.OLEDB.4.0', 'Data Source=&quot;C:\Source\Excel\BOL Account #s Master-Edits 11.20.09.xls&quot;;Extended Properties=Excel 8.0')...[AllPoolCorbi$] a<br/> <br/> <span style="text-decoration:underline">Linked Server:</span> <br/> EXEC sp_addlinkedserver 'XLS', 'Excel', 'Microsoft.Jet.OLEDB.4.0', 'C:\Source\Excel\BOL Account #s Master-Edits 11.20.09.xls', NULL, 'Excel 8.0'<br/> GO<br/> <br/> select * from XLS...SortCenters$<br/> <br/> <br/> Results:<br/> <br/> OpenRowSet - Works<br/> OpenDataSrouce - Works<br/> Exec sp_addLinkedServer - Comes back with Success Message<br/> Select * from XLS...SortCenters$ <br/>    ERROR: OLE DB provider &quot;Microsoft.Jet.OLEDB.4.0&quot; for linked server &quot;XLS&quot; returned message &quot;Cannot start your application. The workgroup information file is missing or opened exclusively by another user.&quot;.<br/> <br/> <br/> Now, A) Why in the world does an Excel file need a Login.  It's a File.  There <em><span style="text-decoration:underline"><strong>IS</strong> </span> </em> no security context for the file.  This is a <span style="text-decoration:underline"><strong>LOCAL</strong> </span> Server, <span style="text-decoration:underline"><strong>LOCAL</strong> </span> file, and it still fails on some stupid superfluous security issue.  What's the point of a linked server that points to an Excel file when it doesn't work.  if <em><strong><span style="text-decoration:underline">OPENROWSET</span> </strong> </em> always works and the add linked server is so finicky it apparently defeats the purpose, traumatizing my life and wasting my time for even trying. (so far I've got an hour down the drain because the LInked server doesn't work the way it's supposed to)<br/> <br/> If I could I'd rather use a CTE, but apparently I can't apply a CTE to an entire execution block (BEGIN...END for multiple insert statements into multiple tables from one cte)  <br/> <br/> As it is, it will be simpler for me to SELECT * INTO XLS from OPENROWSET() and work with it that way, but frankly that does NOTHING to help my respect or opinion of SQL Server.  Every step I take in one direction causes more stress, due to certain security rights when there is no NEED for them.  (ESPECIALLY WHEN I'M LOGGED IN AS SA!!!)  If I am SA I am GOD, and the Server should never tell me no.  *chuckle*  well, within reason, of course.  But I think my frustration is clear as to why.<br/> <br/> Sorry for the frustration, but I've followed the &quot;<strong>MSDN</strong> &quot; described steps for adding an excel file as a linked server, and it doesn't work.  So either the MSDN help is wrong in telling me how to do it, it is wrong that SQL Server even can do it, or most likely: It is incomplete, not giving ALL information needed to execute a command, which means yet again, MSDN - fix your documentation.  Until that happens (like never will) could someone point out how to link and excel file as a Linked Server - WITH NO SECURITY CONTEXT BS.  Just treat it like &quot;OPENROWSET&quot; but have it constant so I don' need to write out the full open row set command for all 100 SQL statements i'm executing.<br/> <br/> Jaeden &quot;Sifo Dyas&quot; al'Raec Ruiner<br/> <br/> <hr class=sig> &quot;Never Trust a computer. Your brain is smarter than any micro-chip.&quot;Mon, 23 Nov 2009 20:25:21 Z2009-11-26T15:47:33Zhttp://social.msdn.microsoft.com/Forums/en-US/sqldatabaseengine/thread/f9236131-cfcc-48ed-b431-57884842e874http://social.msdn.microsoft.com/Forums/en-US/sqldatabaseengine/thread/f9236131-cfcc-48ed-b431-57884842e874Fabri_Fabrihttp://social.msdn.microsoft.com/Profile/en-US/?user=Fabri_FabriLimit access from allowed clientsI need to limit access to my sql server 2005 engine only from allowed IPs.<br/> <br/> I can't use firewall because the clients have to stay in the same network so I have to find another way.<br/> <br/> Can you help me ?<br/> <br/> Thanks.Wed, 25 Nov 2009 10:44:10 Z2009-11-26T13:22:28Zhttp://social.msdn.microsoft.com/Forums/en-US/sqldatabaseengine/thread/1f55e7be-df1a-446c-a578-993ef993ee39http://social.msdn.microsoft.com/Forums/en-US/sqldatabaseengine/thread/1f55e7be-df1a-446c-a578-993ef993ee39Nicolas Dhttp://social.msdn.microsoft.com/Profile/en-US/?user=Nicolas%20Dindexed view - The view contains a self join ON dimDate<font size=2><span style="font-family:Arial">hi folks,<br><br>i have just pick up on this annoying problem with INDEXED VIEWS.<br><br>i have a view like<br><br>create view vw_carServices_idx<br><br>with schemmabinding<br>as<br><br>select<br><br>t.carType,<br>c.carColor,<br>sDt.serviceDt,<br>cDt.completitionDt,<br>f.totalCost,<br><br>count_big(*) AS countingBig<br><br>from<br></span></font> <div style="margin-left:40px"><font size=2><span style="font-family:Arial">factServices f<br></span></font></div>inner join dimCarType AS t ON t.carTypeKey = f.carTypeKey<br>inner join dimColor AS c ON c.colorKey = f.colorKey<br>inner join dimDate AS sDt ON sDt.dtKey = f.serviceDtKey<br>inner join dimDate AS <font size=2><span style="font-family:Arial"></span></font>cDt ON cDt.dtKey = f.completitionDtKey<br><br>group by<br><font size=2><span style="font-family:Arial"><br>t.carType,<br>c.carColor,<br>sDt.serviceDt,<br>sDt.completitionDt,<br>f.totalCost<br></span></font><br><br>the above compiles fine but when i try to create an index against this view, i get the following message.<br><br>Msg 1947, Level 16, State 1, Line 1<br>Cannot create index on view &quot;myDB.<font size=2><span style="font-family:Arial">vw_carServices_idx</span></font>&quot;. The view contains a self join on &quot;myDB.dimDate&quot;.<br><br><br>so is there someway around this problem?<br><br>thanks,<br><br>Nicolas<br><br><br><font size=2><span style="font-family:Arial"></span></font> <div style="margin-left:40px"><font size=2><span style="font-family:Arial"></span></font></div>Tue, 02 Dec 2008 09:57:28 Z2009-11-26T10:08:09Zhttp://social.msdn.microsoft.com/Forums/en-US/sqldatabaseengine/thread/8db9dc92-fc6d-4b7e-952b-71b3e5e0f5behttp://social.msdn.microsoft.com/Forums/en-US/sqldatabaseengine/thread/8db9dc92-fc6d-4b7e-952b-71b3e5e0f5beBhavana Nhttp://social.msdn.microsoft.com/Profile/en-US/?user=Bhavana%20NPPS 64 bit installationHi,<br/><br/>We have 64 bit machines installed with SQL Server 2008.<br/>We are trying to install PPS 2007 on these machines.<br/><br/>All the pre requisites that are required for PPS are installed.<br/>However, when configuring the Monitoring server, in the Database section, the SQL Server location errors out with the following error message:<br/>&quot;Connection to SQL Server location failed. &quot;<br/>It tries to evaluate Microsoft SQL Server 2005.<br/>And all our servers are 2008.<br/><br/>Is the error because of the Version of the SQL Server that we have?<br/><br/>Any suggestions to resolve this error?<br/><br/>Thanks in advance<br/><hr class="sig">BhavanaThu, 26 Nov 2009 07:51:18 Z2009-11-26T09:33:08Zhttp://social.msdn.microsoft.com/Forums/en-US/sqldatabaseengine/thread/2285bfb0-d0c9-4588-8142-7f5a2e2d0f1fhttp://social.msdn.microsoft.com/Forums/en-US/sqldatabaseengine/thread/2285bfb0-d0c9-4588-8142-7f5a2e2d0f1fCaos225http://social.msdn.microsoft.com/Profile/en-US/?user=Caos225standard view with multiple inner joins. selecting a single column what happens in the background?<p>I cant find a diffinitive answer, so lets ask here..<br/><br/>the background...<br/>say a view exists so to generate a 'virtual table' to which joins many columns from other tables. those other tables are lookup tables for multiple choice options .. ie store ID, but reference a descriptive field as ID means nothing to a user. the view itself contains a large number of columns but 90% of the time, only a handful of columns from the view will be referenced .. be it different column on each query.<br/><br/>the reason for the view is security access... (nope, it not index due to 'other' restriction stopping schema binding at this time)<br/><br/>if i select a few columns, but no columns that refer to any inner joins in the view .. what does sql server actually fetch in the background?? <br/>does it fetch every column in the view's select statement, then return just the column i asked for?? (note view itself does not contain an order by statement) <br/>or does it satisfy all joins (inner and outer??) <br/>or even satisfy every column mentioned in the where clause and just select columns i ask for .. before returning results??<br/><br/>from an exaplin plan it looks like the engine certainly has to satisfy some joins but which ones? .. plus i dont know if in the background its returning internaly every column ??<br/><br/>performance is the issue, but need to understand whats occuring in the background to decide my next step!<br/><br/>Thanks.<br/> </p>Wed, 25 Nov 2009 20:34:20 Z2009-11-26T08:25:18Zhttp://social.msdn.microsoft.com/Forums/en-US/sqldatabaseengine/thread/5cdc0eb6-99f3-4618-9194-89f717847192http://social.msdn.microsoft.com/Forums/en-US/sqldatabaseengine/thread/5cdc0eb6-99f3-4618-9194-89f717847192pcrtxhttp://social.msdn.microsoft.com/Profile/en-US/?user=pcrtxCreating a Linked Server with 64 bit SQL Server 2008 to MS Access<p>I have SQL Sever 2008 64 bit installed. I am trying to create a linked server to a MS Access database.<br/>I have been unsuccessfull and getting this done. Does anyone have anyh suggesstions on what has worked?</p>Tue, 24 Nov 2009 04:07:32 Z2009-11-26T05:48:56Zhttp://social.msdn.microsoft.com/Forums/en-US/sqldatabaseengine/thread/bd027e2b-87fb-434f-8bba-19938de921e7http://social.msdn.microsoft.com/Forums/en-US/sqldatabaseengine/thread/bd027e2b-87fb-434f-8bba-19938de921e7A NEW SQL DBAhttp://social.msdn.microsoft.com/Profile/en-US/?user=A%20NEW%20SQL%20DBAMSDN Virtual Lab Dear DBAs, <br/><br/>I tried MSDN Virtual Lab on my laptop and kept getting this error. <br/><br/>&quot;This site requires the following ActiveX control: 'Virtual Server VRMC Advanced Control' from Microsoft&quot;<br/><br/>Could you point me to an URL where I can download?<br/><br/>Thank you,Thu, 26 Nov 2009 03:59:00 Z2009-11-26T05:20:11Zhttp://social.msdn.microsoft.com/Forums/en-US/sqldatabaseengine/thread/9cf3a213-2753-4622-99b8-46a1ff63a5a7http://social.msdn.microsoft.com/Forums/en-US/sqldatabaseengine/thread/9cf3a213-2753-4622-99b8-46a1ff63a5a7draymondhttp://social.msdn.microsoft.com/Profile/en-US/?user=draymondDatabase FAIL: transaction log maxed out.I have a database that for any task (inlcuding trying to enlarge or clear the transaction logs) gives a message that the transaction log is full and to check sys.databases field log_reuse_wait_description.   That table gives the log_reuse_wait code as 2 and the description as BACKUP.  This database is being backed up only by Microsoft DPM and any attempt to either do a consistency check (fail) or drop protection of the database (success) has had no effect on this.  Is there any way to force the database to clear this field?Wed, 25 Nov 2009 22:44:39 Z2009-11-27T05:36:02Zhttp://social.msdn.microsoft.com/Forums/en-US/sqldatabaseengine/thread/ca95f2a0-4804-476c-b2ac-3e67339e4449http://social.msdn.microsoft.com/Forums/en-US/sqldatabaseengine/thread/ca95f2a0-4804-476c-b2ac-3e67339e4449Arend van Nierophttp://social.msdn.microsoft.com/Profile/en-US/?user=Arend%20van%20NieropError message on SQL counters (Event ID 1021)<p>I am trying to monitor databases of a MSSQLServer2000 on a W2003R2 64 bit server. No instances are found in wmi and MSSQL or SQL objects do not appear in Performance Monitor. Therefore they are not to be find in wmi. <br/>Please, give me some directions how to follow up on the error message that appears in Event Viewer, Event ID 1021: <span style="font-size:11pt;font-family:'Calibri','sans-serif'">Windows cannot open the 32-bit extensible counter DLL MSSQLSERVER in a 64-bit environment. Contact the file vendor to obtain a 64-bit version</span></p>Thu, 19 Nov 2009 04:27:21 Z2009-11-25T22:37:39Zhttp://social.msdn.microsoft.com/Forums/en-US/sqldatabaseengine/thread/d5014ba2-9213-4adb-9c15-cfb44f877ef3http://social.msdn.microsoft.com/Forums/en-US/sqldatabaseengine/thread/d5014ba2-9213-4adb-9c15-cfb44f877ef3Ola Hallengrenhttp://social.msdn.microsoft.com/Profile/en-US/?user=Ola%20Hallengrensys.dm_db_index_physical_stats execution time<div>I'm trying to understand what factors that are important for the execution time for a query against sys.dm_db_index_physical_stats.</div> <div><br/></div> <div>As I undestand it, it is scanning the pages on the index level above the leaf level if you're running it in LIMITED mode (default).</div> <div><br/></div> <div>How does this work when there are LOB data types?</div> <div><br/></div> <div>I'm looking at a table with two nvarchar(max) columns, where it takes a very long time (15 minutes) to run a query against sys.dm_db_index_physical_stats (LIMITED mode).</div> <div><br/></div> <div>index_type_desc alloc_unit_type_desc index_depth index_level page_count</div> <div>CLUSTERED INDEX IN_ROW_DATA          3           0           13642</div> <div>CLUSTERED INDEX LOB_DATA             1           0           3308649</div> <div><br/></div> <div>Ola Hallengren</div> <div><a href="http://ola.hallengren.com">http://ola.hallengren.com</a></div>Wed, 25 Nov 2009 22:06:47 Z2009-11-27T15:58:12Zhttp://social.msdn.microsoft.com/Forums/en-US/sqldatabaseengine/thread/322904cb-2b6a-4a2a-99ac-90e602152f49http://social.msdn.microsoft.com/Forums/en-US/sqldatabaseengine/thread/322904cb-2b6a-4a2a-99ac-90e602152f49MartinGleesonhttp://social.msdn.microsoft.com/Profile/en-US/?user=MartinGleesonWarning: SQL cache memory usage: %d (pages)Reading through as much documentation as I can and searching through Books Online and forums I cannot find any reference for this SQL Server log message for SQL Server 2005 or 2008.<br/> <br/> The SQL Server 7 reference is mentioned at the end this page:  http://technet.microsoft.com/en-us/library/cc917590.aspx<br/> <br/> The SQL Server 2000 reference is mentioned here: http://technet.microsoft.com/en-us/library/aa226378%28SQL.80%29.aspx<br/> <br/> Is there any Microsoft documentation relating to this message available for SQL Server 2005 and SQL Server 2008?<br/> <br/> Kind Regards,<br/> MartinWed, 25 Nov 2009 10:53:10 Z2009-11-27T15:58:08Zhttp://social.msdn.microsoft.com/Forums/en-US/sqldatabaseengine/thread/b691b781-6bbc-4347-8096-5c47e3bf682chttp://social.msdn.microsoft.com/Forums/en-US/sqldatabaseengine/thread/b691b781-6bbc-4347-8096-5c47e3bf682cMike9990http://social.msdn.microsoft.com/Profile/en-US/?user=Mike9990Sometime sql server locks down/freezes Hi,<br/><br/>This weird thing happens when I try to read the table using my program.  It does not happen all the time.<br/>This is what happens:<br/>When I tell the program to give me the list of objects, for example invoices, it waits for unusual times and even when I go to Management studio to run the query the same thing happens, but whn I quit my program and use the management studio that wil not happen. <br/><br/>This happnes sometimes and not all the times with the same procedues.  Even when I am not writing any data and only read the data.  I am working on a single computer and the computer does not have any user to lock it down.  But, I have some backgroud threads that priodically,using timers, connects to SQl server with the same user id to get some data such as the reminder. I am wondering it these threads could be causing the problem.  If so, how can I fix it, so the threads can use their jobs and my program does its job as well.Sat, 21 Nov 2009 11:31:48 Z2009-11-25T20:25:11Zhttp://social.msdn.microsoft.com/Forums/en-US/sqldatabaseengine/thread/867f592b-96e8-4f11-818c-b644b9ad7412http://social.msdn.microsoft.com/Forums/en-US/sqldatabaseengine/thread/867f592b-96e8-4f11-818c-b644b9ad7412TechnoGuyhttp://social.msdn.microsoft.com/Profile/en-US/?user=TechnoGuyDoes SQL Server Support the "MINUS" Keyword?<p>Maybe there's another better way to do this...  Anyway, here's what I'm trying to do:</p> <p>I have two tables CarType &amp; Cars.  Table CarType has a column CarTypeId which is the primary key (int, identity).  Table Cars includes a column CarTypeId (int) which is a foreign key into the CarType table.</p> <p>Now I am trying to build a list of all those CarTypeId entries (from the CarType table) for which there are no Cars (i.e. there is no corresponding entry in the Cars table).</p> <p>I read that there is an SQL &quot;<font color="#0000ff">MINUS</font>&quot; keyword that you can use like this:</p> <blockquote dir=ltr style="margin-right:0px"> <p><font color="#0000ff">SELECT CarTypeId FROM CarType<br>MINUS<br>SELECT CarTypeId FROM Cars</font></p></blockquote> <p>So if CarType contains records with the keys {1, 2, 3, 4, 5} and Cars contains records with the foreign keys {2, 4} (using set notation), your result should be the set {1, 3, 5}.  (Note:  I <em>have </em>tried alternate versions of this where I selected the DISTINCT CarTypeId entries from Cars, and where I sorted them; results same in both cases).</p> <p>I tried it in SQL Server 2005 Express.  The result is just {1, 2, 3, 4, 5}.</p> <p>My questions:</p> <ol> <li>Is the MINUS capability supported by SQL Server?  I know that there are all sorts of different SQL dialects &amp; implementations and that SQL has evolved &amp; transmutated over the years; perhaps they opted to leave this out of SQL Server...</li> <li>If not supported, well then I guess I have to throw myself at the feet of the real SQL gurus and ask if there's another way to accomplish this.</li></ol> <p align=left>Here's a reference to the website where I initially found out about MINUS:<br><a title="http://www.1keydata.com/sql/sql-minus.html" href="http://www.1keydata.com/sql/sql-minus.html">http://www.1keydata.com/sql/sql-minus.html</a></p> <p align=left>Thanks in advance for your time/comments.</p>Wed, 22 Mar 2006 23:33:05 Z2009-11-25T20:07:30Z