Formulating a count query - sql server 2012

Hello,
I am quite new to SQL and even though I can handle simple queries I have run into a problem. Maybe you can help :-)
This is how the table I want to query from is structured:
   id   From                                 To                      
    Anomalies         
   1         01-08-2014 00:00:00       01-08-2014 00:30:00        24
   2       01-08-2014 00:00:00       01-08-2014 00:30:00
 80
   3         01-08-2014 00:00:00       01-08-2014 00:30:00        11
   4         01-08-2014 00:00:00       01-08-2014 00:30:00        10
   5         01-08-2014 00:00:00       01-08-2014 00:30:00        90
   1         01-08-2014 00:30:00       01-08-2014 01:00:00        20
   2         01-08-2014 00:30:00       01-08-2014 01:00:00        74
   3         01-08-2014 00:30:00       01-08-2014 01:00:00        11
   4         01-08-2014 00:30:00       01-08-2014 01:00:00        100
   5         01-08-2014 00:30:00       01-08-2014 01:00:00         98
The problem is to write a query that will return the number of anomalies per department for the month of, say, July 2014. The final result set should have 5 records.
Does anyone have any ideas?
Thx

Thanks. The month condition is what I am after though :-) Would thiS WORK:select id, sum (Anomalies) as monthlySum from yourtable
WHERE Datename(month, From) = 'July' and DatenaME(month, To) = 'July'
group by id?Thanks.

Similar Messages

  • SSISB Row Counts in SQL Server 2012

    Does SSISDB (SQL Server 2012) track row counts such as total rows loaded, inserted rows, and updated rows?
    Or do we still need to use the row count transformation to capture these counts?
    Ryan P. Casey • <a href="http://www.R-P-C-Group.com">www.R-P-C-Group.com</a>

    Hi RPCASEY001,
    Based on my research, Row Counts for Execute SQL Task do not get captured in [SSISDB].[internal].[execution_data_statistics] table even when logging on the SSISDB server is set to Verbose. As per my understanding, this makes sense that how would SSIS know
    what the affected row counts are by the SQL statement in an Execute SQL Task given that we can put whatever we want in there?
    If we want to capture row counts loaded using the Execute SQL task, we can create a log table and add the row counts column into the log table. For more details, please refer to the following blog:
    http://consultingblogs.emc.com/jamiethomson/archive/2005/06/11/SSIS_3A00_-Custom-Logging-Using-Event-Handlers.aspx
    The following similar thread is for your reference:
    https://social.msdn.microsoft.com/Forums/sqlserver/en-US/64ab1ec3-b0f2-4bba-9523-a7bcd6c154f1/ssis-logging-recording-record-count-from-sql-task?forum=sqlintegrationservices
    Thanks,
    Katherine Xiong
    If you have any feedback on our support, please click
    here.
    Katherine Xiong
    TechNet Community Support

  • SQL server 2012 : There is insufficient system memory in resource pool 'internal' to run this query

    We have recently upgraded from SQL server 2008 to SQL server 2012.
    We are getting this error when browsing to several pages on our website.
     There is insufficient system memory in resource pool 'internal' to run this query
    Most of the pages just try to do sql statements or stored procedures. I found a fix related to this error for sql 2012
    http://support.microsoft.com/kb/2769594/en-gb
    I did install it on server but the problem still remains.
    I have increased Maximum server memory to 20 GB to see if it will affect but it didnt.
    Memory on server is 32GB
    This is the sql version we have
    Microsoft SQL Server 2012 (SP1) - 11.0.3393.0 (X64)
        Oct 25 2013 19:04:40
        Copyright (c) Microsoft Corporation
        Standard Edition (64-bit) on Windows NT 6.2 <X64> (Build 9200: )
    How can i solve this error?It keeps on appearing when browsing .net website

    This is the ouptut of memory status
    Process/System Counts Value
    Available Physical Memory 6559842304
    Available Virtual Memory 8741595508736
    Available Paging File 17090838528
    Working Set 21094821888
    Percent of Committed Memory in WS 100
    Page Faults 160487165
    System physical memory high 1
    System physical memory low 0
    Process physical memory low 0
    Process virtual memory low 0
    Memory Manager KB
    VM Reserved 51506548
    VM Committed 20445040
    Locked Pages Allocated 0
    Large Pages Allocated 0
    Emergency Memory 1024
    Emergency Memory In Use 16
    Target Committed 20480008
    Current Committed 20445040
    Pages Allocated 6298528
    Pages Reserved 717408
    Pages Free 13820616
    Pages In Use 5143472
    Page Alloc Potential 14312512
    NUMA Growth Phase 0
    Last OOM Factor 1
    Last OS Error 0
    Memory node Id = 0 KB
    VM Reserved 51504948
    VM Committed 10218952
    Locked Pages Allocated 0
    Pages Allocated 1651360
    Pages Free 8323696
    Target Committed 10239992
    Current Committed 10218952
    Foreign Committed 96
    Away Committed 0
    Taken Away Committed 0
    Memory node Id = 1 KB
    VM Reserved 1536
    VM Committed 10226068
    Locked Pages Allocated 0
    Pages Allocated 4647208
    Pages Free 5496896
    Target Committed 10239992
    Current Committed 10226072
    Foreign Committed 0
    Away Committed 0
    Taken Away Committed 0
    Memory node Id = 64 KB
    VM Reserved 0
    VM Committed 20
    Locked Pages Allocated 0
    MEMORYCLERK_SQLGENERAL (node 0) KB
    VM Reserved 0
    VM Committed 0
    Locked Pages Allocated 0
    SM Reserved 0
    SM Committed 0
    Pages Allocated 19136
    MEMORYCLERK_SQLGENERAL (node 1) KB
    VM Reserved 0
    VM Committed 0
    Locked Pages Allocated 0
    SM Reserved 0
    SM Committed 0
    Pages Allocated 144
    MEMORYCLERK_SQLGENERAL (Total) KB
    VM Reserved 0
    VM Committed 0
    Locked Pages Allocated 0
    SM Reserved 0
    SM Committed 0
    Pages Allocated 19280
    MEMORYCLERK_SQLBUFFERPOOL (node 0) KB
    VM Reserved 841608
    VM Committed 151560
    Locked Pages Allocated 0
    SM Reserved 0
    SM Committed 0
    Pages Allocated 1081360
    MEMORYCLERK_SQLBUFFERPOOL (node 1) KB
    VM Reserved 0
    VM Committed 0
    Locked Pages Allocated 0
    SM Reserved 0
    SM Committed 0
    Pages Allocated 1119416
    MEMORYCLERK_SQLBUFFERPOOL (Total) KB
    VM Reserved 841608
    VM Committed 151560
    Locked Pages Allocated 0
    SM Reserved 0
    SM Committed 0
    Pages Allocated 2200776
    MEMORYCLERK_SQLQUERYEXEC (node 0) KB
    VM Reserved 0
    VM Committed 0
    Locked Pages Allocated 0
    SM Reserved 0
    SM Committed 0
    Pages Allocated 5768
    MEMORYCLERK_SQLQUERYEXEC (node 1) KB
    VM Reserved 0
    VM Committed 0
    Locked Pages Allocated 0
    SM Reserved 0
    SM Committed 0
    Pages Allocated 9624
    MEMORYCLERK_SQLQUERYEXEC (Total) KB
    VM Reserved 0
    VM Committed 0
    Locked Pages Allocated 0
    SM Reserved 0
    SM Committed 0
    Pages Allocated 15392
    MEMORYCLERK_SQLOPTIMIZER (node 0) KB
    VM Reserved 0
    VM Committed 0
    Locked Pages Allocated 0
    SM Reserved 0
    SM Committed 0
    Pages Allocated 2480
    MEMORYCLERK_SQLUTILITIES (node 0) KB
    VM Reserved 0
    VM Committed 0
    Locked Pages Allocated 0
    SM Reserved 0
    SM Committed 0
    Pages Allocated 112
    MEMORYCLERK_SQLUTILITIES (node 1) KB
    VM Reserved 0
    VM Committed 0
    Locked Pages Allocated 0
    SM Reserved 0
    SM Committed 0
    Pages Allocated 16
    MEMORYCLERK_SQLUTILITIES (Total) KB
    VM Reserved 0
    VM Committed 0
    Locked Pages Allocated 0
    SM Reserved 0
    SM Committed 0
    Pages Allocated 128
    MEMORYCLERK_SQLSTORENG (node 0) KB
    VM Reserved 4800
    VM Committed 4800
    Locked Pages Allocated 0
    SM Reserved 0
    SM Committed 0
    Pages Allocated 7928
    MEMORYCLERK_SQLSTORENG (node 1) KB
    VM Reserved 0
    VM Committed 0
    Locked Pages Allocated 0
    SM Reserved 0
    SM Committed 0
    Pages Allocated 5856
    MEMORYCLERK_SQLSTORENG (Total) KB
    VM Reserved 4800
    VM Committed 4800
    Locked Pages Allocated 0
    SM Reserved 0
    SM Committed 0
    Pages Allocated 13784
    MEMORYCLERK_SQLCONNECTIONPOOL (node 0) KB
    VM Reserved 0
    VM Committed 0
    Locked Pages Allocated 0
    SM Reserved 0
    SM Committed 0
    Pages Allocated 1184
    MEMORYCLERK_SQLCONNECTIONPOOL (node 1) KB
    VM Reserved 0
    VM Committed 0
    Locked Pages Allocated 0
    SM Reserved 0
    SM Committed 0
    Pages Allocated 536
    MEMORYCLERK_SQLCONNECTIONPOOL (Total) KB
    VM Reserved 0
    VM Committed 0
    Locked Pages Allocated 0
    SM Reserved 0
    SM Committed 0
    Pages Allocated 1720
    MEMORYCLERK_SQLCLR (node 0) KB
    VM Reserved 9450752
    VM Committed 10664
    Locked Pages Allocated 0
    SM Reserved 0
    SM Committed 0
    Pages Allocated 60648
    MEMORYCLERK_SQLSERVICEBROKER (node 0) KB
    VM Reserved 0
    VM Committed 0
    Locked Pages Allocated 0
    SM Reserved 0
    SM Committed 0
    Pages Allocated 528
    MEMORYCLERK_SQLHTTP (node 1) KB
    VM Reserved 0
    VM Committed 0
    Locked Pages Allocated 0
    SM Reserved 0
    SM Committed 0
    Pages Allocated 8
    MEMORYCLERK_SNI (node 0) KB
    VM Reserved 0
    VM Committed 0
    Locked Pages Allocated 0
    SM Reserved 0
    SM Committed 0
    Pages Allocated 40
    MEMORYCLERK_SNI (node 1) KB
    VM Reserved 0
    VM Committed 0
    Locked Pages Allocated 0
    SM Reserved 0
    SM Committed 0
    Pages Allocated 56
    MEMORYCLERK_SNI (node 64) KB
    VM Reserved 0
    VM Committed 0
    Locked Pages Allocated 0
    SM Reserved 0
    SM Committed 0
    Pages Allocated 16
    MEMORYCLERK_SNI (Total) KB
    VM Reserved 0
    VM Committed 0
    Locked Pages Allocated 0
    SM Reserved 0
    SM Committed 0
    Pages Allocated 112
    MEMORYCLERK_FULLTEXT (node 0) KB
    VM Reserved 0
    VM Committed 0
    Locked Pages Allocated 0
    SM Reserved 0
    SM Committed 0
    Pages Allocated 297936
    MEMORYCLERK_FULLTEXT (node 1) KB
    VM Reserved 0
    VM Committed 0
    Locked Pages Allocated 0
    SM Reserved 0
    SM Committed 0
    Pages Allocated 3406024
    MEMORYCLERK_FULLTEXT (Total) KB
    VM Reserved 0
    VM Committed 0
    Locked Pages Allocated 0
    SM Reserved 0
    SM Committed 0
    Pages Allocated 3703960
    MEMORYCLERK_SQLXP (node 0) KB
    VM Reserved 0
    VM Committed 0
    Locked Pages Allocated 0
    SM Reserved 0
    SM Committed 0
    Pages Allocated 16
    MEMORYCLERK_BHF (node 0) KB
    VM Reserved 0
    VM Committed 0
    Locked Pages Allocated 0
    SM Reserved 0
    SM Committed 0
    Pages Allocated 152
    MEMORYCLERK_BHF (node 1) KB
    VM Reserved 0
    VM Committed 0
    Locked Pages Allocated 0
    SM Reserved 0
    SM Committed 0
    Pages Allocated 184
    MEMORYCLERK_BHF (Total) KB
    VM Reserved 0
    VM Committed 0
    Locked Pages Allocated 0
    SM Reserved 0
    SM Committed 0
    Pages Allocated 336
    MEMORYCLERK_SQLQERESERVATIONS (node 1) KB
    VM Reserved 0
    VM Committed 0
    Locked Pages Allocated 0
    SM Reserved 0
    SM Committed 0
    Pages Allocated 841952
    MEMORYCLERK_XE_BUFFER (node 0) KB
    VM Reserved 3072
    VM Committed 3072
    Locked Pages Allocated 0
    SM Reserved 0
    SM Committed 0
    Pages Allocated 0
    MEMORYCLERK_XE_BUFFER (node 1) KB
    VM Reserved 1536
    VM Committed 1536
    Locked Pages Allocated 0
    SM Reserved 0
    SM Committed 0
    Pages Allocated 0
    MEMORYCLERK_XE_BUFFER (Total) KB
    VM Reserved 4608
    VM Committed 4608
    Locked Pages Allocated 0
    SM Reserved 0
    SM Committed 0
    Pages Allocated 0
    MEMORYCLERK_XTP (node 0) KB
    VM Reserved 0
    VM Committed 0
    Locked Pages Allocated 0
    SM Reserved 0
    SM Committed 0
    Pages Allocated 16
    MEMORYCLERK_HOST (node 1) KB
    VM Reserved 0
    VM Committed 0
    Locked Pages Allocated 0
    SM Reserved 0
    SM Committed 0
    Pages Allocated 40
    MEMORYCLERK_SOSNODE (node 0) KB
    VM Reserved 0
    VM Committed 0
    Locked Pages Allocated 0
    SM Reserved 0
    SM Committed 0
    Pages Allocated 34168
    MEMORYCLERK_SOSNODE (node 1) KB
    VM Reserved 0
    VM Committed 0
    Locked Pages Allocated 0
    SM Reserved 0
    SM Committed 0
    Pages Allocated 11664
    MEMORYCLERK_SOSNODE (node 64) KB
    VM Reserved 0
    VM Committed 0
    Locked Pages Allocated 0
    SM Reserved 0
    SM Committed 0
    Pages Allocated 2600
    MEMORYCLERK_SOSNODE (Total) KB
    VM Reserved 0
    VM Committed 0
    Locked Pages Allocated 0
    SM Reserved 0
    SM Committed 0
    Pages Allocated 48432
    MEMORYCLERK_SOSOS (node 0) KB
    VM Reserved 0
    VM Committed 0
    Locked Pages Allocated 0
    SM Reserved 0
    SM Committed 0
    Pages Allocated 192
    MEMORYCLERK_SOSMEMMANAGER (node 0) KB
    VM Reserved 85560
    VM Committed 85416
    Locked Pages Allocated 0
    SM Reserved 0
    SM Committed 0
    Pages Allocated 0
    MEMORYCLERK_FULLTEXT_SHMEM (node 0) KB
    VM Reserved 0
    VM Committed 0
    Locked Pages Allocated 0
    SM Reserved 576
    SM Committed 576
    Pages Allocated 0
    MEMORYCLERK_SQLSERVICEBROKERTRANSPORT (node 0) KB
    VM Reserved 0
    VM Committed 0
    Locked Pages Allocated 0
    SM Reserved 0
    SM Committed 0
    Pages Allocated 200
    MEMORYCLERK_FILETABLE (node 0) KB
    VM Reserved 0
    VM Committed 0
    Locked Pages Allocated 0
    SM Reserved 0
    SM Committed 0
    Pages Allocated 16
    MEMORYCLERK_XE (node 0) KB
    VM Reserved 0
    VM Committed 0
    Locked Pages Allocated 0
    SM Reserved 0
    SM Committed 0
    Pages Allocated 3440
    MEMORYCLERK_SQLLOGPOOL (node 0) KB
    VM Reserved 0
    VM Committed 0
    Locked Pages Allocated 0
    SM Reserved 0
    SM Committed 0
    Pages Allocated 4208
    MEMORYCLERK_LWC (node 0) KB
    VM Reserved 0
    VM Committed 0
    Locked Pages Allocated 0
    SM Reserved 0
    SM Committed 0
    Pages Allocated 192
    MEMORYCLERK_FSCHUNKER (node 0) KB
    VM Reserved 0
    VM Committed 0
    Locked Pages Allocated 0
    SM Reserved 0
    SM Committed 0
    Pages Allocated 48
    CACHESTORE_OBJCP (node 0) KB
    VM Reserved 0
    VM Committed 0
    Locked Pages Allocated 0
    SM Reserved 0
    SM Committed 0
    Pages Allocated 5848
    CACHESTORE_SQLCP (node 0) KB
    VM Reserved 0
    VM Committed 0
    Locked Pages Allocated 0
    SM Reserved 0
    SM Committed 0
    Pages Allocated 29664
    CACHESTORE_PHDR (node 0) KB
    VM Reserved 0
    VM Committed 0
    Locked Pages Allocated 0
    SM Reserved 0
    SM Committed 0
    Pages Allocated 4616
    CACHESTORE_XPROC (node 0) KB
    VM Reserved 0
    VM Committed 0
    Locked Pages Allocated 0
    SM Reserved 0
    SM Committed 0
    Pages Allocated 32
    CACHESTORE_TEMPTABLES (node 0) KB
    VM Reserved 0
    VM Committed 0
    Locked Pages Allocated 0
    SM Reserved 0
    SM Committed 0
    Pages Allocated 16
    CACHESTORE_NOTIF (node 0) KB
    VM Reserved 0
    VM Committed 0
    Locked Pages Allocated 0
    SM Reserved 0
    SM Committed 0
    Pages Allocated 16
    CACHESTORE_VIEWDEFINITIONS (node 0) KB
    VM Reserved 0
    VM Committed 0
    Locked Pages Allocated 0
    SM Reserved 0
    SM Committed 0
    Pages Allocated 16
    CACHESTORE_XMLDBTYPE (node 0) KB
    VM Reserved 0
    VM Committed 0
    Locked Pages Allocated 0
    SM Reserved 0
    SM Committed 0
    Pages Allocated 8
    CACHESTORE_XMLDBELEMENT (node 0) KB
    VM Reserved 0
    VM Committed 0
    Locked Pages Allocated 0
    SM Reserved 0
    SM Committed 0
    Pages Allocated 8
    CACHESTORE_XMLDBATTRIBUTE (node 0) KB
    VM Reserved 0
    VM Committed 0
    Locked Pages Allocated 0
    SM Reserved 0
    SM Committed 0
    Pages Allocated 8
    CACHESTORE_STACKFRAMES (node 0) KB
    VM Reserved 0
    VM Committed 0
    Locked Pages Allocated 0
    SM Reserved 0
    SM Committed 0
    Pages Allocated 8
    CACHESTORE_STACKFRAMES (node 1) KB
    VM Reserved 0
    VM Committed 0
    Locked Pages Allocated 0
    SM Reserved 0
    SM Committed 0
    Pages Allocated 8
    CACHESTORE_STACKFRAMES (node 64) KB
    VM Reserved 0
    VM Committed 0
    Locked Pages Allocated 0
    SM Reserved 0
    SM Committed 0
    Pages Allocated 8
    CACHESTORE_STACKFRAMES (Total) KB
    VM Reserved 0
    VM Committed 0
    Locked Pages Allocated 0
    SM Reserved 0
    SM Committed 0
    Pages Allocated 24
    CACHESTORE_BROKERTBLACS (node 0) KB
    VM Reserved 0
    VM Committed 0
    Locked Pages Allocated 0
    SM Reserved 0
    SM Committed 0
    Pages Allocated 48
    CACHESTORE_BROKERKEK (node 0) KB
    VM Reserved 0
    VM Committed 0
    Locked Pages Allocated 0
    SM Reserved 0
    SM Committed 0
    Pages Allocated 8
    CACHESTORE_BROKERDSH (node 0) KB
    VM Reserved 0
    VM Committed 0
    Locked Pages Allocated 0
    SM Reserved 0
    SM Committed 0
    Pages Allocated 8
    CACHESTORE_BROKERUSERCERTLOOKUP (node 0) KB
    VM Reserved 0
    VM Committed 0
    Locked Pages Allocated 0
    SM Reserved 0
    SM Committed 0
    Pages Allocated 8
    CACHESTORE_BROKERRSB (node 0) KB
    VM Reserved 0
    VM Committed 0
    Locked Pages Allocated 0
    SM Reserved 0
    SM Committed 0
    Pages Allocated 8
    CACHESTORE_BROKERREADONLY (node 0) KB
    VM Reserved 0
    VM Committed 0
    Locked Pages Allocated 0
    SM Reserved 0
    SM Committed 0
    Pages Allocated 32
    CACHESTORE_BROKERTO (node 0) KB
    VM Reserved 0
    VM Committed 0
    Locked Pages Allocated 0
    SM Reserved 0
    SM Committed 0
    Pages Allocated 8
    CACHESTORE_EVENTS (node 0) KB
    VM Reserved 0
    VM Committed 0
    Locked Pages Allocated 0
    SM Reserved 0
    SM Committed 0
    Pages Allocated 16
    CACHESTORE_SEHOBTCOLUMNATTRIBUTE (node 0) KB
    VM Reserved 0
    VM Committed 0
    Locked Pages Allocated 0
    SM Reserved 0
    SM Committed 0
    Pages Allocated 400
    CACHESTORE_SYSTEMROWSET (node 0) KB
    VM Reserved 0
    VM Committed 0
    Locked Pages Allocated 0
    SM Reserved 0
    SM Committed 0
    Pages Allocated 1056
    CACHESTORE_SYSTEMROWSET (node 1) KB
    VM Reserved 0
    VM Committed 0
    Locked Pages Allocated 0
    SM Reserved 0
    SM Committed 0
    Pages Allocated 480
    CACHESTORE_SYSTEMROWSET (Total) KB
    VM Reserved 0
    VM Committed 0
    Locked Pages Allocated 0
    SM Reserved 0
    SM Committed 0
    Pages Allocated 1536
    CACHESTORE_CONVPRI (node 0) KB
    VM Reserved 0
    VM Committed 0
    Locked Pages Allocated 0
    SM Reserved 0
    SM Committed 0
    Pages Allocated 32
    CACHESTORE_CONVPRI (node 1) KB
    VM Reserved 0
    VM Committed 0
    Locked Pages Allocated 0
    SM Reserved 0
    SM Committed 0
    Pages Allocated 16
    CACHESTORE_CONVPRI (Total) KB
    VM Reserved 0
    VM Committed 0
    Locked Pages Allocated 0
    SM Reserved 0
    SM Committed 0
    Pages Allocated 48
    CACHESTORE_FULLTEXTSTOPLIST (node 0) KB
    VM Reserved 0
    VM Committed 0
    Locked Pages Allocated 0
    SM Reserved 0
    SM Committed 0
    Pages Allocated 56
    CACHESTORE_SEARCHPROPERTYLIST (node 0) KB
    VM Reserved 0
    VM Committed 0
    Locked Pages Allocated 0
    SM Reserved 0
    SM Committed 0
    Pages Allocated 16
    CACHESTORE_COLUMNSTOREOBJECTPOOL (node 0) KB
    VM Reserved 0
    VM Committed 0
    Locked Pages Allocated 0
    SM Reserved 0
    SM Committed 0
    Pages Allocated 192
    CACHESTORE_XML_SELECTIVE_DG (node 0) KB
    VM Reserved 0
    VM Committed 0
    Locked Pages Allocated 0
    SM Reserved 0
    SM Committed 0
    Pages Allocated 8
    USERSTORE_SCHEMAMGR (node 0) KB
    VM Reserved 0
    VM Committed 0
    Locked Pages Allocated 0
    SM Reserved 0
    SM Committed 0
    Pages Allocated 8896
    USERSTORE_DBMETADATA (node 0) KB
    VM Reserved 0
    VM Committed 0
    Locked Pages Allocated 0
    SM Reserved 0
    SM Committed 0
    Pages Allocated 5088
    USERSTORE_DBMETADATA (node 1) KB
    VM Reserved 0
    VM Committed 0
    Locked Pages Allocated 0
    SM Reserved 0
    SM Committed 0
    Pages Allocated 4768
    USERSTORE_DBMETADATA (Total) KB
    VM Reserved 0
    VM Committed 0
    Locked Pages Allocated 0
    SM Reserved 0
    SM Committed 0
    Pages Allocated 9856
    USERSTORE_TOKENPERM (node 0) KB
    VM Reserved 0
    VM Committed 0
    Locked Pages Allocated 0
    SM Reserved 0
    SM Committed 0
    Pages Allocated 8104
    USERSTORE_TOKENPERM (node 1) KB
    VM Reserved 0
    VM Committed 0
    Locked Pages Allocated 0
    SM Reserved 0
    SM Committed 0
    Pages Allocated 448
    USERSTORE_TOKENPERM (Total) KB
    VM Reserved 0
    VM Committed 0
    Locked Pages Allocated 0
    SM Reserved 0
    SM Committed 0
    Pages Allocated 8552
    USERSTORE_OBJPERM (node 0) KB
    VM Reserved 0
    VM Committed 0
    Locked Pages Allocated 0
    SM Reserved 0
    SM Committed 0
    Pages Allocated 1640
    USERSTORE_OBJPERM (node 1) KB
    VM Reserved 0
    VM Committed 0
    Locked Pages Allocated 0
    SM Reserved 0
    SM Committed 0
    Pages Allocated 600
    USERSTORE_OBJPERM (Total) KB
    VM Reserved 0
    VM Committed 0
    Locked Pages Allocated 0
    SM Reserved 0
    SM Committed 0
    Pages Allocated 2240
    USERSTORE_SXC (node 0) KB
    VM Reserved 0
    VM Committed 0
    Locked Pages Allocated 0
    SM Reserved 0
    SM Committed 0
    Pages Allocated 160
    USERSTORE_SXC (node 1) KB
    VM Reserved 0
    VM Committed 0
    Locked Pages Allocated 0
    SM Reserved 0
    SM Committed 0
    Pages Allocated 168
    USERSTORE_SXC (node 64) KB
    VM Reserved 0
    VM Committed 0
    Locked Pages Allocated 0
    SM Reserved 0
    SM Committed 0
    Pages Allocated 8
    USERSTORE_SXC (Total) KB
    VM Reserved 0
    VM Committed 0
    Locked Pages Allocated 0
    SM Reserved 0
    SM Committed 0
    Pages Allocated 336
    OBJECTSTORE_LBSS (node 0) KB
    VM Reserved 0
    VM Committed 0
    Locked Pages Allocated 0
    SM Reserved 0
    SM Committed 0
    Pages Allocated 368
    OBJECTSTORE_LBSS (node 1) KB
    VM Reserved 0
    VM Committed 0
    Locked Pages Allocated 0
    SM Reserved 0
    SM Committed 0
    Pages Allocated 296
    OBJECTSTORE_LBSS (Total) KB
    VM Reserved 0
    VM Committed 0
    Locked Pages Allocated 0
    SM Reserved 0
    SM Committed 0
    Pages Allocated 664
    OBJECTSTORE_SNI_PACKET (node 0) KB
    VM Reserved 0
    VM Committed 0
    Locked Pages Allocated 0
    SM Reserved 0
    SM Committed 0
    Pages Allocated 616
    OBJECTSTORE_SNI_PACKET (node 1) KB
    VM Reserved 0
    VM Committed 0
    Locked Pages Allocated 0
    SM Reserved 0
    SM Committed 0
    Pages Allocated 648
    OBJECTSTORE_SNI_PACKET (node 64) KB
    VM Reserved 0
    VM Committed 0
    Locked Pages Allocated 0
    SM Reserved 0
    SM Committed 0
    Pages Allocated 56
    OBJECTSTORE_SNI_PACKET (Total) KB
    VM Reserved 0
    VM Committed 0
    Locked Pages Allocated 0
    SM Reserved 0
    SM Committed 0
    Pages Allocated 1320
    OBJECTSTORE_SERVICE_BROKER (node 0) KB
    VM Reserved 0
    VM Committed 0
    Locked Pages Allocated 0
    SM Reserved 0
    SM Committed 0
    Pages Allocated 496
    OBJECTSTORE_LOCK_MANAGER (node 0) KB
    VM Reserved 65540
    VM Committed 65540
    Locked Pages Allocated 0
    SM Reserved 0
    SM Committed 0
    Pages Allocated 11816
    OBJECTSTORE_LOCK_MANAGER (node 1) KB
    VM Reserved 0
    VM Committed 0
    Locked Pages Allocated 0
    SM Reserved 0
    SM Committed 0
    Pages Allocated 11632
    OBJECTSTORE_LOCK_MANAGER (node 64) KB
    VM Reserved 0
    VM Committed 0
    Locked Pages Allocated 0
    SM Reserved 0
    SM Committed 0
    Pages Allocated 24
    OBJECTSTORE_LOCK_MANAGER (Total) KB
    VM Reserved 65540
    VM Committed 65540
    Locked Pages Allocated 0
    SM Reserved 0
    SM Committed 0
    Pages Allocated 23472
    OBJECTSTORE_SECAUDIT_EVENT_BUFFER (node 0) KB
    VM Reserved 0
    VM Committed 0
    Locked Pages Allocated 0
    SM Reserved 0
    SM Committed 0
    Pages Allocated 16
    OBJECTSTORE_XACT_CACHE (node 0) KB
    VM Reserved 0
    VM Committed 0
    Locked Pages Allocated 0
    SM Reserved 0
    SM Committed 0
    Pages Allocated 2224
    OBJECTSTORE_XACT_CACHE (node 1) KB
    VM Reserved 0
    VM Committed 0
    Locked Pages Allocated 0
    SM Reserved 0
    SM Committed 0
    Pages Allocated 2488
    OBJECTSTORE_XACT_CACHE (node 64) KB
    VM Reserved 0
    VM Committed 0
    Locked Pages Allocated 0
    SM Reserved 0
    SM Committed 0
    Pages Allocated 16
    OBJECTSTORE_XACT_CACHE (Total) KB
    VM Reserved 0
    VM Committed 0
    Locked Pages Allocated 0
    SM Reserved 0
    SM Committed 0
    Pages Allocated 4728
    Buffer Pool Value
    Database 274830
    Simulated 0
    Target 4096000
    Dirty 507
    In IO 0
    Latched 1
    Page Life Expectancy 11941
    Procedure Cache Value
    TotalProcs 333
    TotalPages 5914
    InUsePages 345
    Global Memory Objects Pages
    Resource 401
    Locks 2934
    XDES 561
    DirtyPageTracking 24
    SETLS 24
    SubpDesc Allocators 165
    SE SchemaManager 559
    SE Column Metadata Cache 549
    SE Column Metadata Cache Store 3
    SQLCache 270
    Replication 2
    ServerGlobal 52
    XP Global 2
    SortTables 3
    Query Memory Objects (internal) Value
    Grants 2
    Waiting 0
    Available 1677087
    Current Max 1814852
    Future Max 1814852
    Physical Max 1854482
    Next Request 0
    Waiting For 0
    Cost 0
    Timeout 0
    Wait Time 0
    Small Query Memory Objects (internal) Value
    Grants 0
    Waiting 0
    Available 95518
    Current Max 95518
    Future Max 95518
    Remote Query Memory Objects (internal) Value
    Grants 0
    Waiting 0
    Available 926250
    Current Max 926250
    Optimization Queue (internal) Value
    Overall Memory 17039360000
    Target Memory 16709148672
    Last Notification 1
    Timeout 6
    Early Termination Factor 5
    Small Gateway (internal) Value
    Configured Units 96
    Available Units 95
    Acquires 1
    Waiters 0
    Threshold Factor 380000
    Threshold 380000
    Medium Gateway (internal) Value
    Configured Units 24
    Available Units 24
    Acquires 0
    Waiters 0
    Threshold Factor 12
    Threshold 1392429056
    Big Gateway (internal) Value
    Configured Units 1
    Available Units 1
    Acquires 0
    Waiters 0
    Threshold Factor 8
    Threshold -1
    Memory Pool Manager Pages
    Reserved Current 0
    Reserved Limit 2095263
    Memory Pool (internal) Pages
    Allocations 464738
    Predicted 929941
    Private Target 0
    Private Limit 0
    Total Target 2560001
    Total Limit 2560001
    OOM Count 0
    MEMORYBROKER_FOR_CACHE (internal) Pages
    Allocations 14370
    Rate 1582
    Target Allocations 1646012
    Future Allocations 0
    Overall 2080000
    Last Notification 1
    MEMORYBROKER_FOR_STEAL (internal) Pages
    Allocations 409631
    Rate -242825
    Target Allocations 2039691
    Future Allocations 0
    Overall 2080000
    Last Notification 1
    MEMORYBROKER_FOR_RESERVE (internal) Pages
    Allocations 0
    Rate -59129
    Target Allocations 2080000
    Future Allocations 463125
    Overall 2080000
    Last Notification 1
    MEMORYBROKER_FOR_COMMITTED (internal) Pages
    Allocations 40735
    Rate 1
    Target Allocations 1670796
    Future Allocations 0
    Overall 2080000
    Last Notification 1
    MEMORYBROKER_FOR_XTP (internal) Pages
    Allocations 2
    Rate 0
    Target Allocations 1630062
    Future Allocations 0
    Overall 2080000
    Last Notification 1
    Memory Broker Clerk (Buffer Pool) Pages
    Total 274830
    Simulated 0
    Simulation Benefit 0
    Internal Benefit 0
    External Benefit 0
    Value Of Memory 0
    Periodic Freed 0
    Internal Freed 0
    Mainly we have SQL and IIS on server

  • SQL Server 2012 Management Studio Displays Error With "New Query" and Intellisense Works Intermittenly

    I was upgrade to SQL Server 2012 and Visual Studio 2010 was upgraded with SP1 the same day.  This is x64 machine. 
    Microsoft SQL Server Management Studio      11.0.2100.60
    Microsoft .NET Framework      4.0.30319.261
    Operating System      6.1.7601
    Problem 1) With SQL Server Management Studio, selecting "New Query" a warning box is displayed: "The 'Microsoft.Practices.EnterpriseLibrary.Configuration.Design.VisualStudioIntegration2010Package, Microsoft.Practices.EnterpriseLibrary.Configuration.Design.VisualStudioIntegration2010,
    Version=1.0.0.0, Culture=netutral, PublicKeyToken=null' package did not load correctly.    The problem mayhave been cuased by a configuration change or by the installation of another extension.  You can get more information by running the
    application together with the /log parameter on the command line, and then examining the file ...\AppDate\Roaming\Microsoft\AppEnv\10.0\ActivityLog.xml'.  Continue to show this error message?
    Problem 2) In a Query Initellisense works intermittently but most of the time it will not display anything.  I have tried Edit|Intellisense|Refresh Cach size and also seperately, Edit | Intellisense | List Members but neither has helped.  Also
    tried different selections for Tools|options| T-SQL | Intellisense| Maximum Script Size; no luck either. 

    Hi WallyJim,
    For your first problem, possible workaround:
    In Programs and Features (or Add/Remove Programs), right click the Microsoft Enterprise Library 5.0 Optional Update 1 program and select change. Remove the VisualStudio2010 integration.
    Then, install the EnterpriseLibrary Configuration extension from Microsoft via the Extension Manager in VS2010. This will allow you to launch the configuration editor from VS2010, but will not be installed for SSMS.
    For more information, please refer to
    https://connect.microsoft.com/SQLServer/feedback/details/620532/error-message-on-new-query-window-opening.
    For your second problem, the following conditions might affect the behavior of IntelliSense:
    There is a code error above the cursor.
    The insertion point is inside a code comment.
    The insertion point is inside a string literal.
    The automatic options are turned off.
    For more information, refer to Troubleshooting IntelliSense (SQL Server Management Studio):
    http://msdn.microsoft.com/en-us/library/ms173434.aspx.
    Thanks,
    Maggie
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. This can be beneficial to other community members reading the thread.

  • SQL Server 2012 Management Studio: XML XQuery-query the XML Blob using CTE: How to specify the coorelation name in bulk rowset?

    Hi all,
    I just started doing the XML Xquery programming in my SQL Server 2012 Management Studio. I executed the following code:
    --query the XML Blob using a CTE (pulling from the XML file each time) Products
    WITH XmlFile (Contents) AS (
    SELECT CONVERT (XML, BulkColumn)
    FROM OPENROWSET (BULK 'H:\Products.xml', SINGLE_BLOB) ) AS XmlData
    SELECT *
    FROM XmlFile
    GO
    I got the the following Msg:
    Msg 491, Level 16, State 1, Line 4
    A correlation name must be specified for the bulk rowset in the from clause.
    How can I specify the correction name for the bulk rowset in my project?
    Please kindly help, advise and respond.
    Thanks in advance,
    Scott Chang

    Hello Scott,
    You have to assign a table alias for the OPENROWSET =>
    --query the XML Blob using a CTE (pulling from the XML file each time) Products
    WITH XmlFile (Contents) AS (
    SELECT CONVERT (XML, BulkColumn)
    FROM OPENROWSET (BULK 'H:\Products.xml', SINGLE_BLOB) AS MyXML ) AS XmlData
    SELECT *
    FROM XmlFile
    GO
    Olaf Helper
    [ Blog] [ Xing] [ MVP]

  • Query on text file using Openrowset in Sql server 2012

    Hi,
    I am using below query on Sql server 2008 and sql server 2012.It is working find in 2008 but giving error in 2012.
    below is query and error on sql 2012
    select * from OpenRowset('MSDASQL', 'Driver={Microsoft Access Text Driver (*.txt, *.csv)};DefaultDir=D:\MSSQL;',
     'select * from employee1.txt')
    OLE DB provider "MSDASQL" for linked server "(null)" returned message "[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified".
    Msg 7303, Level 16, State 1, Line 1
    Cannot initialize the data source object of OLE DB provider "MSDASQL" for linked server "(null)".
    I have read some document on msdn and install microsoft access database engine 2010, but still it not working.
    Can anyone suggest resolution of this problem.
    Thanks
    Shitalkumar kasliwal

    Read this link
    http://calyansql.blogspot.co.il/2013/02/fix-cannot-initialize-data-source.html
    Best Regards,Uri Dimant SQL Server MVP,
    http://sqlblog.com/blogs/uri_dimant/
    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Consulting:
    Large scale of database and data cleansing
    Remote DBA Services:
    Improves MS SQL Database Performance
    SQL Server Integration Services:
    Business Intelligence

  • After upgrade from SQL Server to SQL server 2012 I cannot show Query Designer ?? Please help

    Hi
    I have installed the required .Net software, but never the less I've got this message. Could you please help me out ?
    Thanx in advance
    Pia 
    TITLE: Microsoft SQL Server Management Studio
    Cannot show Query Designer.
    ADDITIONAL INFORMATION:
    Exception has been thrown by the target of an invocation. (mscorlib)
    Unable to find the requested .Net Framework Data Provider.  It may not be installed. (System.Data)
    BUTTONS:
    OK

    also check
    http://connect.microsoft.com/VisualStudio/feedback/details/652192/visual-studio-2010-add-connection-fails
    mostly machine.config is referring to .net 3.0 assemblies
    Balmukund Lakhani
    Please mark solved if I've answered your question, vote for it as helpful to help other users find a solution quicker
    This posting is provided "AS IS" with no warranties, and confers no rights.
    My Blog |
    Team Blog | @Twitter
    | Facebook
    Author: SQL Server 2012 AlwaysOn -
    Paperback, Kindle

  • Exam 70-461 : Querying Microsoft SQL Server 2012

    Hello friends,
    I would like to know whether i can get previous exam questions&answers or not ? Do you offer any website for practising to that exam ?

    Hi, coskun.arif.
    What do you mean by asking for previous exam questions? I want to help but Microsoft never shares their exam questions/answers - even for exams no longer offered.
    Below, I have included some resources you can use to help prepare for this exam.
    The 70-461 exam is described here:
    http://www.microsoft.com/learning/en-us/exam-70-461.aspx
    You can take the free training at Microsoft Virtual Academy (MVA) with review questions for the 70-461 exam here:
    http://www.microsoftvirtualacademy.com/training-courses/querying-microsoft-sql-server-2012-databases-jump-start
    Here is a book on Amazon.com for studying for this exam:
    http://www.amazon.com/Training-Kit-Exam-70-461-Microsoft/dp/0735666059
    MeasureUp sells a practice exam for 70-461 here:
    http://www.measureup.com/70-461-Querying-Microsoft-SQL-Server-2012-P4155.aspx
    Transcender also sells a 70-461 practice exam here:
    https://www.transcender.com/practice-exam/microsoft/70-461.kap
    Good luck!
    Best wishes, Davin Mickelson

  • SQL Server 2012 Standard and hyperthreading core count

    I have 2 Intel E5-2640 v2 processors for my SQL Server 2012 Standard server. Each processor has 8 cores and has hyper threading so it has 16 logical cores. Will SQL standard be able to use hyper threading? Since it has a 16 core limit, does it see hyper
    threading as an extra core or will it only look at the 8 cores each processor has?

    Ignoring licencing, Standard version can only use up to 16 cores. In my case I have 16 cores but 32 logical cores. Will the Standard edition only use the first 16 logical processors or will it use all logical cores since I have 16 physical cores
    that just happens to have hyper threading?
    As per my understanding whatever is less than 16, Physical core or logical core  will use that .But I am not sure best answer would be from Microsoft.
    Reading there below statement .
    'When hyper-threading is enabled, the Basic Input Output System (BIOS) uses a logical to physical CPU ratio. Current implementations are using 2:1 ratios. This means that there are two (2) logical CPUs for each physical CPU. These ratios may change in the
    future; however, Microsoft SQL Server 2000 Service Pack 3 (SP3) and later versions have additional licensing code that adjusts the licensing restrictions to handle the ratio. For example,
    if the SQL Server product code that you have installed permits a 4 CPU license at a 2:1 ratio, the SQL Server 2000 SP3 build and later builds adjust and let you use 8 CPUs.
    So it says if you have license for 4 CPU but if it is hyperthreaded it can use 8.But again if number goes over 16 for standard edition I guess it would not use above 16.So in your case Enabling hyperthreading would have no use.
    NOTE: This is complex discussion and correct answer would be what Microsoft says :)
    PS: Please read link I have posted it is applicable to 2012 as well
    Please mark this reply as the answer or vote as helpful, as appropriate, to make it useful for other readers

  • Unable to install SQL server 2012 on windows 7 64bit

    Overall summary:
    Final result: Failed: see details below
    Exit code (Decimal): -2057043966
    Exit facility code: 1380
    Exit error code: 2
    Exit message: There was a failure to calculate the applicability of setting ALLINSTANCES.
    Start time: 2015-03-17 21:43:13
    End time: 2015-03-17 21:43:34
    Requested action: LandingPage
    Exception help link: http://go.microsoft.com/fwlink?LinkId=20476&ProdName=Microsoft+SQL+Server&EvtSrc=setup.rll&EvtID=50000&ProdVer=11.0.2100.60&EvtType=0x4F2D2386%400xE9BC3D64&EvtType=0x4F2D2386%400xE9BC3D64
    Machine Properties:
    Machine name: ELKR-1214-1745
    Machine processor count: 4
    OS version: Windows 7
    OS service pack: Service Pack 1
    OS region: United States
    OS language: English (United States)
    OS architecture: x64
    Process architecture: 64 Bit
    OS clustered: No
    Package properties:
    Description: Microsoft SQL Server 2012
    ProductName: SQL Server 2012
    Type: RTM
    Version: 11
    SPLevel: 0
    Installation location: c:\afaeb7739e47ceedb4b5f79a1e14a784\x64\setup\
    Installation edition:
    User Input Settings:
    ACTION: LandingPage
    CONFIGURATIONFILE:
    ENU: true
    HELP: false
    INDICATEPROGRESS: false
    QUIET: false
    QUIETSIMPLE: false
    UIMODE: AutoAdvance
    X86: false
    Configuration file: C:\Program Files\Microsoft SQL Server\110\Setup Bootstrap\Log\20150317_214254\ConfigurationFile.ini
    Rules with failures:
    Global rules:
    There are no scenario-specific rules.
    Rules report file: The rule result report file is not available.
    Exception summary:
    The following is an exception stack listing the exceptions in outermost to innermost order
    Inner exceptions are being indented
    Exception type: Microsoft.SqlServer.Chainer.Infrastructure.CalculateSettingApplicabilityException
    Message:
    There was a failure to calculate the applicability of setting ALLINSTANCES.
    HResult : 0x85640002
    FacilityCode : 1380 (564)
    ErrorCode : 2 (0002)
    Data:
    SettingId = ALLINSTANCES
    WatsonData = Microsoft.SqlServer.Chainer.Infrastructure.CalculateSettingApplicabilityException@2
    HelpLink.EvtType = 0x4F2D2386@0xE9BC3D64
    DisableWatson = true
    Stack:
    at Microsoft.SqlServer.Chainer.Infrastructure.Setting.CalculateApplicability()
    at Microsoft.SqlServer.Chainer.Infrastructure.InputSettingService.CalculateAllSettings(Boolean chainerSettingOnly)
    at Microsoft.SqlServer.Configuration.SetupExtension.FinalCalculateSettingsAction.ExecuteAction(String actionId)
    at Microsoft.SqlServer.Chainer.Infrastructure.Action.Execute(String actionId, TextWriter errorStream)
    at Microsoft.SqlServer.Setup.Chainer.Workflow.ActionInvocation.ExecuteActionHelper(TextWriter statusStream, ISequencedAction actionToRun, ServiceContainer context)
    Inner exception type: Microsoft.SqlServer.Chainer.Infrastructure.CalculateSettingChangeabilityException
    Message:
    There was a failure to calculate the changeability of setting ALLINSTANCES.
    HResult : 0x85640003
    FacilityCode : 1380 (564)
    ErrorCode : 3 (0003)
    Data:
    SettingId = ALLINSTANCES
    WatsonData = Microsoft.SqlServer.Chainer.Infrastructure.CalculateSettingChangeabilityException@3
    Stack:
    at Microsoft.SqlServer.Chainer.Infrastructure.Setting.CalculateChangeabilityByUser()
    at Microsoft.SqlServer.Deployment.PrioritizedPublishing.PublishingQueue.CallQueuedSubscriberDelegates()
    at Microsoft.SqlServer.Deployment.PrioritizedPublishing.PublishingQueue.Publish(Publisher publisher)
    at Microsoft.SqlServer.Chainer.Infrastructure.Setting.CalculateApplicability()
    Inner exception type: Microsoft.SqlServer.Chainer.Infrastructure.UnableRetrieveConfigObjectForSettingException
    Message:
    Unable to retrieve a public configuration object type Microsoft.SqlServer.Configuration.SetupExtension.SlpInputSettings for setting ALLINSTANCES.
    HResult : 0x85640007
    FacilityCode : 1380 (564)
    ErrorCode : 7 (0007)
    Data:
    SettingId = ALLINSTANCES
    ConfigObjectType = Microsoft.SqlServer.Configuration.SetupExtension.SlpInputSettings
    WatsonData = Microsoft.SqlServer.Chainer.Infrastructure.UnableRetrieveConfigObjectForSettingException@7
    Stack:
    at Microsoft.SqlServer.Chainer.Infrastructure.SettingBridge.GetHostingObject()
    at Microsoft.SqlServer.Chainer.Infrastructure.SettingBridge.ChangeabilityByUser()
    at Microsoft.SqlServer.Deployment.PrioritizedPublishing.PublishingQueue.CallFunctionWhileAutosubscribing[T](SubscriberDelegate subscriberDelegate, Int32 priority, AutosubscribingFunctionDelegate`1 function)
    at Microsoft.SqlServer.Chainer.Infrastructure.Setting.CalculateChangeabilityByUser()
    Inner exception type: Microsoft.SqlServer.Chainer.Infrastructure.ChainerInfrastructureException
    Message:
    Unable to generate a temporary class (result=1).
    error CS0009: Metadata file 'c:\Windows\assembly\GAC_MSIL\System\2.0.0.0__b77a5c561934e089\System.dll' could not be opened -- 'File is corrupt'
    HResult : 0x84b10001
    FacilityCode : 1201 (4b1)
    ErrorCode : 1 (0001)
    Stack:
    at Microsoft.SqlServer.Chainer.Infrastructure.DataStoreService.DeserializeObject(String rootPath, Type type, String elementXPath)
    at Microsoft.SqlServer.Chainer.Infrastructure.DataStoreService.DeserializeObject(String rootPath, Type type)
    at Microsoft.SqlServer.Chainer.Infrastructure.SettingBridge.GetHostingObject()
    Inner exception type: System.InvalidOperationException
    Message:
    Unable to generate a temporary class (result=1).
    error CS0009: Metadata file 'c:\Windows\assembly\GAC_MSIL\System\2.0.0.0__b77a5c561934e089\System.dll' could not be opened -- 'File is corrupt'
    Stack:
    at System.Xml.Serialization.Compiler.Compile(Assembly parent, String ns, XmlSerializerCompilerParameters xmlParameters, Evidence evidence)
    at System.Xml.Serialization.TempAssembly.GenerateAssembly(XmlMapping[] xmlMappings, Type[] types, String defaultNamespace, Evidence evidence, XmlSerializerCompilerParameters parameters, Assembly assembly, Hashtable assemblies)
    at System.Xml.Serialization.TempAssembly..ctor(XmlMapping[] xmlMappings, Type[] types, String defaultNamespace, String location, Evidence evidence)
    at System.Xml.Serialization.XmlSerializer.GenerateTempAssembly(XmlMapping xmlMapping, Type type, String defaultNamespace)
    at System.Xml.Serialization.XmlSerializer..ctor(Type type, String defaultNamespace)
    at Microsoft.SqlServer.Chainer.Infrastructure.DataStoreService.DeserializeObject(String rootPath, Type type, String elementXPath)

    Hi,
    I would like to add that if you see summary.txt file you would see
    Message:
    Unable to generate a temporary class (result=1).
    error CS0009: Metadata file 'c:\Windows\assembly\GAC_MSIL\System\2.0.0.0__b77a5c561934e089\System.dll' could not be opened -- 'File is corrupt'
    HResult : 0x84b10001
    FacilityCode : 1201 (4b1)
    ErrorCode : 1 (0001)
    You can see file is corrupt. So either you have to download the setup file again or there can be chance that Antivirus caused some issue.
    Plus if you see starting of summary.txt you could see
    Requested action: LandingPage
    The error message came while landing page was being loaded/or was in action so again I think it is some thing related to corrupt media or antivirus.
    Please
    1. Download ISO file again and extract using WINRAR, don't use Winzip
    2. Disable Antivirus.
    3. Make a new folder and extract installable there.
    Please mark this reply as answer if it solved your issue or vote as helpful if it helped so that other forum members can benefit from it
    My Technet Wiki Article
    MVP

  • Unable to install SQL Server 2012 on my Surface 3 computerr w/Windows 8.1 as the OS

    Another user,
    Cheer08, has replied to a thread you have subscribed to in the
    SQL Server Express Forum.
    Here are the error messages:
    Error 2
    Error 1
    Hello,
    This error is related to Microsoft Visual C++ 2005. Could you try to download and install Microsoft Visual C++ 2005 with service pack 1 (SP1) included:
    http://www.microsoft.com/en-us/download/details.aspx?id=5638 (x86 or 32-bit)
    http://www.microsoft.com/en-us/download/details.aspx?id=18471
    (x64 or 64-bit)
    Hope this helps.
    Regards,
    Alberto Morillo
    SQLCoffee.com
    Thread Title Unable to install SQL Server 2012 on my Surface 3 computerr w/Windows 8.1 as the OS.
    Started by: FenixRising
    Reply:
    Fenix, this is SQL Server forum. Regarding the Visual C++ 2005 SP1 Redistributable setup issue, you need to post question in
    visual studio forum to get better help.
    After installing Visual C++ 2005 SP1 Redistributable successfully,are you able to install SQL Server? If not, share us SQL Server setup logs. This link
    https://msdn.microsoft.com/en-us/library/ms143702(v=sql.110).aspx will help you View and Read SQL Server Setup Log Files
    Im going to run it now. Get back to you.

    Hi,
        I am unable to install SQL Server 2012. I have the install log, but I don't can't read them.
    Overall summary:
      Final result:                  Failed: see details below
      Exit code (Decimal):           -2053898239
      Start time:                    2015-02-08 23:03:01
      End time:                      2015-02-08 23:07:31
      Requested action:              Install
    Setup completed with required actions for features.
    Troubleshooting information for those features:
      Next step for Adv_SSMS:        Use the following information to resolve the error, and then try the setup process again.
      Next step for SSMS:            Use the following information to resolve the error, and then try the setup process again.
      Next step for RS:              Use the following information to resolve the error, and then try the setup process again.
      Next step for SQLEngine:       Use the following information to resolve the error, and then try the setup process again.
      Next step for FullText:        Use the following information to resolve the error, and then try the setup process again.
      Next step for Replication:     Use the following information to resolve the error, and then try the setup process again.
    Machine Properties:
      Machine name:                  RLC_WORK
      Machine processor count:       4
      OS version:                    Future Windows Version
      OS service pack:               
      OS region:                     United States
      OS language:                   English (United States)
      OS architecture:               x64
      Process architecture:          64 Bit
      OS clustered:                  No
    Product features discovered:
      Product              Instance             Instance ID                   
    Feature                                  Language            
    Edition              Version         Clustered  Configured
      SQL Server 2012                                                         
    Client Tools Connectivity                1033                                     
    11.2.5058.0     No         Yes       
      SQL Server 2012                                                         
    Client Tools Backwards Compatibility     1033                                     
    11.2.5058.0     No         Yes       
      SQL Server 2012                                                         
    Client Tools SDK                         1033                                     
    11.2.5058.0     No         Yes       
      SQL Server 2012                                                         
    SQL Server Data Tools                    1033                 Express Edition     
    11.2.5058.0     No         Yes       
      SQL Server 2012                                                         
    LocalDB                                  1033                
    Express Edition      11.0.2100.60    No         Yes       
    Package properties:
      Description:                   Microsoft SQL Server 2012
      ProductName:                   SQL Server 2012
      Type:                          RTM
      Version:                       11
      Installation location:         C:\76766b629842c4dc54646a47c04202\x64\setup\
      Installation edition:          Express
      Slipstream:                    True
      SP Level                       2
    Product Update Status:
      Success: KB 2958429
    Product Updates Selected for Installation:
      Title:                         Service Pack 2
      Knowledge Based Article:       KB 2958429
      Version:                       11.2.5058.0
      Architecture:                  x64
      Language:                      1033
      Update Source:                 Slipstream
    User Input Settings:
      ACTION:                        Install
      ADDCURRENTUSERASSQLADMIN:      true
      AGTSVCACCOUNT:                 NT AUTHORITY\NETWORK SERVICE
      AGTSVCPASSWORD:                *****
      AGTSVCSTARTUPTYPE:             Disabled
      ASBACKUPDIR:                   Backup
      ASCOLLATION:                   Latin1_General_CI_AS
      ASCONFIGDIR:                   Config
      ASDATADIR:                     Data
      ASLOGDIR:                      Log
      ASPROVIDERMSOLAP:              1
      ASSERVERMODE:                  MULTIDIMENSIONAL
      ASSVCACCOUNT:                  <empty>
      ASSVCPASSWORD:                 <empty>
      ASSVCSTARTUPTYPE:              Automatic
      ASSYSADMINACCOUNTS:            <empty>
      ASTEMPDIR:                     Temp
      BROWSERSVCSTARTUPTYPE:         Disabled
      CLTCTLRNAME:                   <empty>
      CLTRESULTDIR:                  <empty>
      CLTSTARTUPTYPE:                0
      CLTSVCACCOUNT:                 <empty>
      CLTSVCPASSWORD:                <empty>
      CLTWORKINGDIR:                 <empty>
      COMMFABRICENCRYPTION:          0
      COMMFABRICNETWORKLEVEL:        0
      COMMFABRICPORT:                0
      CONFIGURATIONFILE:             
      CTLRSTARTUPTYPE:               0
      CTLRSVCACCOUNT:                <empty>
      CTLRSVCPASSWORD:               <empty>
      CTLRUSERS:                     <empty>
      ENABLERANU:                    true
      ENU:                           true
      ERRORREPORTING:                true
      FEATURES:                      SQLENGINE, REPLICATION, FULLTEXT, RS, SSMS, ADV_SSMS
      FILESTREAMLEVEL:               0
      FILESTREAMSHARENAME:           <empty>
      FTSVCACCOUNT:                  NT Service\MSSQLFDLauncher$SQLEXPRESS
      FTSVCPASSWORD:                 <empty>
      HELP:                          false
      IACCEPTSQLSERVERLICENSETERMS:  true
      INDICATEPROGRESS:              false
      INSTALLSHAREDDIR:              C:\Program Files\Microsoft SQL Server\
      INSTALLSHAREDWOWDIR:           C:\Program Files (x86)\Microsoft SQL Server\
      INSTALLSQLDATADIR:             <empty>
      INSTANCEDIR:                   C:\Program Files\Microsoft SQL Server\
      INSTANCEID:                    SQLEXPRESS
      INSTANCENAME:                  SQLEXPRESS
      ISSVCACCOUNT:                  NT AUTHORITY\Network Service
      ISSVCPASSWORD:                 <empty>
      ISSVCSTARTUPTYPE:              Automatic
      MATRIXCMBRICKCOMMPORT:         0
      MATRIXCMSERVERNAME:            <empty>
      MATRIXNAME:                    <empty>
      NPENABLED:                     0
      PID:                           *****
      QUIET:                         false
      QUIETSIMPLE:                   false
      ROLE:                          AllFeatures_WithDefaults
      RSINSTALLMODE:                 DefaultNativeMode
      RSSHPINSTALLMODE:              DefaultSharePointMode
      RSSVCACCOUNT:                  NT Service\ReportServer$SQLEXPRESS
      RSSVCPASSWORD:                 <empty>
      RSSVCSTARTUPTYPE:              Automatic
      SAPWD:                         <empty>
      SECURITYMODE:                  <empty>
      SQLBACKUPDIR:                  <empty>
      SQLCOLLATION:                  SQL_Latin1_General_CP1_CI_AS
      SQLSVCACCOUNT:                 NT Service\MSSQL$SQLEXPRESS
      SQLSVCPASSWORD:                <empty>
      SQLSVCSTARTUPTYPE:             Automatic
      SQLSYSADMINACCOUNTS:           RLC_WORK\Robert
      SQLTEMPDBDIR:                  <empty>
      SQLTEMPDBLOGDIR:               <empty>
      SQLUSERDBDIR:                  <empty>
      SQLUSERDBLOGDIR:               <empty>
      SQMREPORTING:                  true
      TCPENABLED:                    0
      UIMODE:                        AutoAdvance
      UpdateEnabled:                 true
      UpdateSource:                  Slipstream
      X86:                           false
      Configuration file:            C:\Program Files\Microsoft SQL Server\110\Setup Bootstrap\Log\20150208_230228\ConfigurationFile.ini
    Detailed results:
      Feature:                       Management Tools - Complete
      Status:                        Failed: see logs for details
      Reason for failure:            An error occurred for a dependency of the feature causing the setup process for the feature to fail.
      Next Step:                     Use the following information to resolve the error, and then try the setup process again.
      Component name:                Microsoft .NET Framework 3.5
      Component error code:          0x85940001
      Error description:             Error while enabling Windows feature : NetFx3, Error Code : -2146498270 , Please try enabling Windows feature : NetFx3 from Windows management tools and then run
    setup again. For more information on how to enable Windows features , see http://go.microsoft.com/fwlink/?linkid=227143
      Error help link:               http://go.microsoft.com/fwlink?LinkId=20476&ProdName=Microsoft+SQL+Server&EvtSrc=setup.rll&EvtID=50000&ProdVer=11.0.5058.0&EvtType=0x681D636F%401428%401&EvtType=0x681D636F%401428%401
      Feature:                       Management Tools - Basic
      Status:                        Failed: see logs for details
      Reason for failure:            An error occurred for a dependency of the feature causing the setup process for the feature to fail.
      Next Step:                     Use the following information to resolve the error, and then try the setup process again.
      Component name:                Microsoft .NET Framework 3.5
      Component error code:          0x85940001
      Error description:             Error while enabling Windows feature : NetFx3, Error Code : -2146498270 , Please try enabling Windows feature : NetFx3 from Windows management tools and then run
    setup again. For more information on how to enable Windows features , see http://go.microsoft.com/fwlink/?linkid=227143
      Error help link:               http://go.microsoft.com/fwlink?LinkId=20476&ProdName=Microsoft+SQL+Server&EvtSrc=setup.rll&EvtID=50000&ProdVer=11.0.5058.0&EvtType=0x681D636F%401428%401&EvtType=0x681D636F%401428%401
      Feature:                       Reporting Services - Native
      Status:                        Failed: see logs for details
      Reason for failure:            An error occurred for a dependency of the feature causing the setup process for the feature to fail.
      Next Step:                     Use the following information to resolve the error, and then try the setup process again.
      Component name:                Microsoft .NET Framework 3.5
      Component error code:          0x85940001
      Error description:             Error while enabling Windows feature : NetFx3, Error Code : -2146498270 , Please try enabling Windows feature : NetFx3 from Windows management tools and then run
    setup again. For more information on how to enable Windows features , see http://go.microsoft.com/fwlink/?linkid=227143
      Error help link:               http://go.microsoft.com/fwlink?LinkId=20476&ProdName=Microsoft+SQL+Server&EvtSrc=setup.rll&EvtID=50000&ProdVer=11.0.5058.0&EvtType=0x681D636F%401428%401&EvtType=0x681D636F%401428%401
      Feature:                       Database Engine Services
      Status:                        Failed: see logs for details
      Reason for failure:            An error occurred for a dependency of the feature causing the setup process for the feature to fail.
      Next Step:                     Use the following information to resolve the error, and then try the setup process again.
      Component name:                Microsoft .NET Framework 3.5
      Component error code:          0x85940001
      Error description:             Error while enabling Windows feature : NetFx3, Error Code : -2146498270 , Please try enabling Windows feature : NetFx3 from Windows management tools and then run
    setup again. For more information on how to enable Windows features , see http://go.microsoft.com/fwlink/?linkid=227143
      Error help link:               http://go.microsoft.com/fwlink?LinkId=20476&ProdName=Microsoft+SQL+Server&EvtSrc=setup.rll&EvtID=50000&ProdVer=11.0.5058.0&EvtType=0x681D636F%401428%401&EvtType=0x681D636F%401428%401
      Feature:                       Full-Text and Semantic Extractions for Search
      Status:                        Failed: see logs for details
      Reason for failure:            An error occurred for a dependency of the feature causing the setup process for the feature to fail.
      Next Step:                     Use the following information to resolve the error, and then try the setup process again.
      Component name:                Microsoft .NET Framework 3.5
      Component error code:          0x85940001
      Error description:             Error while enabling Windows feature : NetFx3, Error Code : -2146498270 , Please try enabling Windows feature : NetFx3 from Windows management tools and then run
    setup again. For more information on how to enable Windows features , see http://go.microsoft.com/fwlink/?linkid=227143
      Error help link:               http://go.microsoft.com/fwlink?LinkId=20476&ProdName=Microsoft+SQL+Server&EvtSrc=setup.rll&EvtID=50000&ProdVer=11.0.5058.0&EvtType=0x681D636F%401428%401&EvtType=0x681D636F%401428%401
      Feature:                       SQL Server Replication
      Status:                        Failed: see logs for details
      Reason for failure:            An error occurred for a dependency of the feature causing the setup process for the feature to fail.
      Next Step:                     Use the following information to resolve the error, and then try the setup process again.
      Component name:                Microsoft .NET Framework 3.5
      Component error code:          0x85940001
      Error description:             Error while enabling Windows feature : NetFx3, Error Code : -2146498270 , Please try enabling Windows feature : NetFx3 from Windows management tools and then run
    setup again. For more information on how to enable Windows features , see http://go.microsoft.com/fwlink/?linkid=227143
      Error help link:               http://go.microsoft.com/fwlink?LinkId=20476&ProdName=Microsoft+SQL+Server&EvtSrc=setup.rll&EvtID=50000&ProdVer=11.0.5058.0&EvtType=0x681D636F%401428%401&EvtType=0x681D636F%401428%401
    Rules with failures:
    Global rules:
    Scenario specific rules:
    Rules report file:               C:\Program Files\Microsoft SQL Server\110\Setup Bootstrap\Log\20150208_230228\SystemConfigurationCheck_Report.htm
    Fenix

  • Rule "SQL Server 2012 feature Upgrade" Failed

    I am doing an in-place upgrade of SQL Server 2008 R2 SP2 > SQL Server 2012 SP1, both 64-bit, installed on Windows Server 2008 R2.
    I ran the SQL Server Upgrade Advisor tool prior to upgrade which reported no issues.
    The error I am getting is:
    In the detailed.txt log I can see the following:
    (11) 2013-12-29 12:28:10 Slp: Initializing rule      : SQL Server 2012 Feature Upgrade
    (11) 2013-12-29 12:28:10 Slp: Rule is will be executed  : True
    (11) 2013-12-29 12:28:10 Slp: Init rule target object: Microsoft.SqlServer.Configuration.SetupExtension.SkuUpgradeRule
    (11) 2013-12-29 12:28:10 Slp: -- SkuUpgradeRule : Rule 'FeatureUpgradeMatrixCheck' looking for previous version upgrade data for feature package 'sql_as_Cpu64'.
    (11) 2013-12-29 12:28:10 Slp: -- SkuUpgradeRule : Found feature package  'sql_as_ctp6_Cpu64' with SkuValue=ENTERPRISE (Enterprise) ProductVersion=10.52.4000.0
    (11) 2013-12-29 12:28:10 Slp: -- SkuUpgradeRule : Rule 'FeatureUpgradeMatrixCheck' found sourceVersion 10.0 and edition ENTERPRISE for feature package 'sql_as_Cpu64'.
    (11) 2013-12-29 12:28:10 Slp: -- SkuPublicConfigObject : ValidateSkuMatrix checking sku matrix for sourceVersion=10.0 sourceEdition=ENTERPRISE (Enterprise) sourceArchitecture=X64 targetEdition=STANDARD (Standard) targetArchitecture=X64
    (11) 2013-12-29 12:28:10 Slp: -- SkuPublicConfigObject : ValidateSkuMatrix source and target architecture match.
    (11) 2013-12-29 12:28:10 Slp: -- SkuPublicConfigObject : ValidateSkuMatrix did not find a match in sku matrix .
    (11) 2013-12-29 12:28:10 Slp: -- SkuUpgradeRule : Rule 'FeatureUpgradeMatrixCheck' feature package 'sql_as_Cpu64' is blocking upgrade.
    (11) 2013-12-29 12:28:10 Slp: -- SkuUpgradeRule : Rule 'FeatureUpgradeMatrixCheck' detection result: IsValidFeatureUpgrade=False
    (11) 2013-12-29 12:28:10 Slp: Evaluating rule        : FeatureUpgradeMatrixCheck
    (11) 2013-12-29 12:28:10 Slp: Rule running on machine: TAUPE-SERVER
    (11) 2013-12-29 12:28:10 Slp: Rule evaluation done   : Failed
    (11) 2013-12-29 12:28:10 Slp: Rule evaluation message: The specified edition upgrade is not supported. For information about supported upgrade paths, see the SQL Server 2012 version and edition upgrade in Books Online.
    (11) 2013-12-29 12:28:10 Slp: Send result to channel : RulesEngineNotificationChannel
    Prior to upgrade:
    From Summary.txt file:
    Overall summary:
      Final result:                  Passed
      Exit code (Decimal):           0
      Start time:                    2013-12-29 12:04:28
      End time:                      2013-12-29 12:08:02
      Requested action:              RunRules
    Machine Properties:
      Machine name:                  TAUPE-SERVER
      Machine processor count:       1
      OS version:                    Windows Server 2008 R2
      OS service pack:               Service Pack 1
      OS region:                     United States
      OS language:                   English (United States)
      OS architecture:               x64
      Process architecture:          64 Bit
      OS clustered:                  No
    Product features discovered:
      Product              Instance             Instance ID                   
    Feature                                  Language            
    Edition              Version         Clustered
      SQL Server 2008 R2   MSSQLSERVER          MSSQL10_50.MSSQLSERVER         Database Engine Services                
    1033                 Enterprise Edition   10.52.4000.0    No       
      SQL Server 2008 R2   MSSQLSERVER          MSSQL10_50.MSSQLSERVER         Full-Text and Semantic Extractions for Search 1033                
    Enterprise Edition   10.52.4000.0    No       
      SQL Server 2008 R2   MSSQLSERVER          MSAS10_50.MSSQLSERVER          Analysis Services                       
    1033                 Enterprise Edition   10.52.4000.0    No       
      SQL Server 2008 R2   MSSQLSERVER          MSRS10_50.MSSQLSERVER          Reporting Services - Native             
    1033                 Enterprise Edition   10.52.4000.0    No       
      SQL Server 2008 R2                                                      
    Management Tools - Basic                 1033                 Enterprise Edition   10.52.4000.0   
    No       
      SQL Server 2008 R2                                                      
    Management Tools - Complete              1033                 Enterprise Edition   10.52.4000.0   
    No       
      SQL Server 2008 R2                                                      
    Client Tools Connectivity                1033                 Enterprise Edition   10.52.4000.0   
    No       
    Package properties:
      Description:                   Microsoft SQL Server 2012
      ProductName:                   SQL Server 2012
      Type:                          RTM
      Version:                       11
      Installation location:        
    \\dovekie\drop\TFS2013\SQLServer2012SP1\x64\setup\
      Installation edition:          Standard
      Slipstream:                    True
    User Input Settings:
      ACTION:                        RunRules
      CONFIGURATIONFILE:            
      ENU:                           true
      FEATURES:                     
      HELP:                          false
      IACCEPTSQLSERVERLICENSETERMS:  false
      INDICATEPROGRESS:              false
      INSTANCENAME:                  <empty>
      PID:                           *****
      QUIET:                         false
      QUIETSIMPLE:                   false
      RULES:                         GlobalRules
      UIMODE:                        Normal
      X86:                           false
      Configuration file:            C:\Program Files\Microsoft SQL Server\110\Setup Bootstrap\Log\20131229_120425\ConfigurationFile.ini
    Rules with failures:
    Global rules:
    There are no scenario-specific rules.
    Rules report file:               C:\Program Files\Microsoft SQL Server\110\Setup Bootstrap\Log\20131229_120425\SystemConfigurationCheck_Report.htm
    As far as I'm aware, the upgrade path I am following is a supported one, any suggestions will be much appreciated!
    Thank you.

    Product features discovered:
      Product              Instance             Instance ID                   
    Feature                                  Language            
    Edition              Version         Clustered
      SQL Server 2008 R2   MSSQLSERVER          MSSQL10_50.MSSQLSERVER         Database Engine Services                
    1033                 Enterprise Edition   10.52.4000.0    No       
      SQL Server 2008 R2   MSSQLSERVER          MSSQL10_50.MSSQLSERVER         Full-Text and Semantic Extractions for Search 1033                
    Enterprise Edition   10.52.4000.0    No       
      SQL Server 2008 R2   MSSQLSERVER          MSAS10_50.MSSQLSERVER          Analysis Services                       
    1033                 Enterprise Edition   10.52.4000.0    No       
      SQL Server 2008 R2   MSSQLSERVER          MSRS10_50.MSSQLSERVER          Reporting Services - Native             
    1033                 Enterprise Edition   10.52.4000.0    No       
      SQL Server 2008 R2                                                      
    Management Tools - Basic                 1033                 Enterprise Edition   10.52.4000.0   
    No       
      SQL Server 2008 R2                                                      
    Management Tools - Complete              1033                 Enterprise Edition   10.52.4000.0   
    No       
      SQL Server 2008 R2                                                      
    Client Tools Connectivity                1033                 Enterprise Edition   10.52.4000.0   
    No       
    Package properties:
      Description:                   Microsoft SQL Server 2012
      ProductName:                   SQL Server 2012
      Type:                          RTM
      Version:                       11
      Installation location:        
    \\dovekie\drop\TFS2013\SQLServer2012SP1\x64\setup\
      Installation edition:          Standard
      Slipstream:                    True
    User Input
    Hello ,
    You are trying to upgrade to SQL 2012 standard edition which is not supported .you can only upgrade from SQL server 2008 R2 Sp2 Enterprise edition to SQL 2012 Enterprise or business intellgience. see below link for supported upgrade paths
    http://technet.microsoft.com/en-us/library/ms143393.aspx
    If you want to move ahead you should try Side by side approach.Create new SQL server 2012 box and restore backup.
    Please mark this reply as the answer or vote as helpful, as appropriate, to make it useful for other readers

  • Is a Full Text Index search case sensitive or not in SQL Server 2012?

    I setup full text index on my contact table and am attempting to run a search on it using the following query:
    SELECT *
    FROM sysdba.Contact C
    WHERE CONTAINS(C.FirstName, 'Test')
    OR CONTAINS(C.LastName, 'Test')
    The problem is it's clearly running a case sensitive search. I did a quick search to find out how to change it to be case in-sensitive and found two pages (both for SQL Server 2012) with conflicting answers:
    1 - MSDN - "Query with Full-Text Search" - http://msdn.microsoft.com/en-us/library/ms142583(v=sql.110).aspx
    Case sensitivity
    Full-text search queries are case-insensitive. However, in Japanese, there are multiple phonetic orthographies in which the concept of orthographic normalization is akin to case insensitivity (for example, kana = insensitivity). This type of orthographic normalization
    is not supported.
    1 - TechNet - "Full-Text Search (SQL Server)" - http://technet.microsoft.com/en-us/library/ms142571(v=sql.110).aspx
    Full-text queries are
    not case-sensitive. For example, searching for "Aluminum" or "aluminum" returns the same results.
    Can someone please explain this? Is it possible to do it without it being case sensitive? If yes, how?
    (Sorry, I couldn't make those links b/c TechNet hasn't verified my account)
    Thank you for your time and help,
    Hanan

    Whats the collation setting for the columns? try using a case insensitive collation as below
    SELECT *
    FROM sysdba.Contact C
    WHERE CONTAINS(C.FirstName COLLATE SQL_Latin1_General_CP1_CI_AS, 'Test')
    OR CONTAINS(C.LastName COLLATE SQL_Latin1_General_CP1_CI_AS, 'Test')
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • Msg 8631 Internal error: Server stack limit has been reached on SQL Server 2012 from T-SQL script that runs on SQL Server 2008 R2

    I have an Script mostly that is generated by SSMS which works with-out issue on SQL Server 2008, but when I attempt to run it on a new fresh install of SQL Server 2012 I get an Msg 8631. Internal error: Server stack limit has been reached. Please look for
    potentially deep nesting in your query, and try to simplify it.
    The script itself doesn't seem to be all that deep or nested.  The script is large 2600 lines and when I remove the bulk of the 2600 lines, it does run on SQL Server 2012.  I'm just really baffled why something that SQL Server generated with very
    few additions/changes AND that WORKS without issue in SQL Server 2008 R2 would suddenly be invalid in SQL Server 2012
    I need to know why my script which is working great on our current SQL Server 2008 R2 servers suddenly fails and won't run on an new SQL Server 2012 server.  This script is used to create 'bulk' Replications on a large number of DBs saving a tremendous
    amount of our time doing it the manual way.
    Below is an 'condensed' version of the script which fails.  I have removed around 2550 lines of specific sp_addarticle statements which are mostly just copy and pasted from what SQL Management Studio 'scripted' for me went I when through the Replication
    Wizard and told it to save to script.
    declare @dbname varchar(MAX), @SQL nvarchar(MAX)
    declare c_dblist cursor for
    select name from sys.databases WHERE name like 'dbone[_]%' order by name;
    open c_dblist
    fetch next from c_dblist into @dbname
    while @@fetch_status = 0
    begin
    print @dbname
    SET @SQL = 'DECLARE @dbname NVARCHAR(MAX); SET @dbname = ''' + @dbname + ''';
    use ['+@dbname+']
    exec sp_replicationdboption @dbname = N'''+@dbname+''', @optname = N''publish'', @value = N''true''
    use ['+@dbname+']
    exec ['+@dbname+'].sys.sp_addlogreader_agent @job_login = N''DOMAIN\DBServiceAccount'', @job_password = N''secret'', @publisher_security_mode = 1, @job_name = null
    -- Adding the transactional publication
    use ['+@dbname+']
    exec sp_addpublication @publication = N'''+@dbname+' Replication'', @description = N''Transactional publication of database
    '''''+@dbname+''''' from Publisher ''''MSSQLSRV\INSTANCE''''.'', @sync_method = N''concurrent'', @retention = 0, @allow_push = N''true'', @allow_pull = N''true'', @allow_anonymous = N''false'', @enabled_for_internet
    = N''false'', @snapshot_in_defaultfolder = N''true'', @compress_snapshot = N''false'', @ftp_port = 21, @allow_subscription_copy = N''false'', @add_to_active_directory = N''false'', @repl_freq = N''continuous'', @status = N''active'', @independent_agent = N''true'',
    @immediate_sync = N''true'', @allow_sync_tran = N''false'', @allow_queued_tran = N''false'', @allow_dts = N''false'', @replicate_ddl = 1, @allow_initialize_from_backup = N''true'', @enabled_for_p2p = N''false'', @enabled_for_het_sub = N''false''
    exec sp_addpublication_snapshot @publication = N'''+@dbname+' Replication'', @frequency_type = 1, @frequency_interval = 1, @frequency_relative_interval = 1, @frequency_recurrence_factor = 0, @frequency_subday = 8,
    @frequency_subday_interval = 1, @active_start_time_of_day = 0, @active_end_time_of_day = 235959, @active_start_date = 0, @active_end_date = 0, @job_login = N''DOMAIN\DBServiceAccount'', @job_password = N''secret'', @publisher_security_mode = 1
    -- There are around 2400 lines roughly the same as this only difference is the tablename repeated below this one
    use ['+@dbname+']
    exec sp_addarticle @publication = N'''+@dbname+' Replication'', @article = N''TABLE_ONE'', @source_owner = N''dbo'', @source_object = N''TABLE_ONE'', @type = N''logbased'', @description = null, @creation_script =
    null, @pre_creation_cmd = N''drop'', @schema_option = 0x000000000803509F, @identityrangemanagementoption = N''manual'', @destination_table = N''TABLE_ONE'', @destination_owner = N''dbo'', @vertical_partition = N''false'', @ins_cmd = N''CALL sp_MSins_dboTABLE_ONE'',
    @del_cmd = N''CALL sp_MSdel_dboTABLE_ONE'', @upd_cmd = N''SCALL sp_MSupd_dboTABLE_ONE''
    EXEC sp_executesql @SQL
    SET @dbname = REPLACE(@dbname, 'dbone_', 'dbtwo_');
    print @dbname
    SET @SQL = 'DECLARE @dbname NVARCHAR(MAX); SET @dbname = ''' + @dbname + ''';
    use ['+@dbname+']
    exec sp_replicationdboption @dbname = N'''+@dbname+''', @optname = N''publish'', @value = N''true''
    use ['+@dbname+']
    exec ['+@dbname+'].sys.sp_addlogreader_agent @job_login = N''DOMAIN\DBServiceAccount'', @job_password = N''secret'', @publisher_security_mode = 1, @job_name = null
    -- Adding the transactional publication
    use ['+@dbname+']
    exec sp_addpublication @publication = N'''+@dbname+' Replication'', @description = N''Transactional publication of database
    '''''+@dbname+''''' from Publisher ''''MSSQLSRV\INSTANCE''''.'', @sync_method = N''concurrent'', @retention = 0, @allow_push = N''true'', @allow_pull = N''true'', @allow_anonymous = N''false'', @enabled_for_internet
    = N''false'', @snapshot_in_defaultfolder = N''true'', @compress_snapshot = N''false'', @ftp_port = 21, @allow_subscription_copy = N''false'', @add_to_active_directory = N''false'', @repl_freq = N''continuous'', @status = N''active'', @independent_agent = N''true'',
    @immediate_sync = N''true'', @allow_sync_tran = N''false'', @allow_queued_tran = N''false'', @allow_dts = N''false'', @replicate_ddl = 1, @allow_initialize_from_backup = N''true'', @enabled_for_p2p = N''false'', @enabled_for_het_sub = N''false''
    exec sp_addpublication_snapshot @publication = N'''+@dbname+' Replication'', @frequency_type = 1, @frequency_interval = 1, @frequency_relative_interval = 1, @frequency_recurrence_factor = 0, @frequency_subday = 8,
    @frequency_subday_interval = 1, @active_start_time_of_day = 0, @active_end_time_of_day = 235959, @active_start_date = 0, @active_end_date = 0, @job_login = N''DOMAIN\DBServiceAccount'', @job_password = N''secret'', @publisher_security_mode = 1
    -- There are around 140 lines roughly the same as this only difference is the tablename repeated below this one
    use ['+@dbname+']
    exec sp_addarticle @publication = N'''+@dbname+' Replication'', @article = N''DB_TWO_TABLE_ONE'', @source_owner = N''dbo'', @source_object = N''DB_TWO_TABLE_ONE'', @type = N''logbased'', @description = null, @creation_script
    = null, @pre_creation_cmd = N''drop'', @schema_option = 0x000000000803509D, @identityrangemanagementoption = N''manual'', @destination_table = N''DB_TWO_TABLE_ONE'', @destination_owner = N''dbo'', @vertical_partition = N''false''
    EXEC sp_executesql @SQL
    fetch next from c_dblist into @dbname
    end
    close c_dblist
    deallocate c_dblist
    George P Botuwell, Programmer

    Hi George,
    Thank you for your question. 
    I am trying to involve someone more familiar with this topic for a further look at this issue. Sometime delay might be expected from the job transferring. Your patience is greatly appreciated. 
    Thank you for your understanding and support.
    If you have any feedback on our support, please click
    here.
    Allen Li
    TechNet Community Support

  • XML Schema Collection (SQL Server 2012): How to create an XML Schema Collection that can be used to Validate a field name (column title) of an existing dbo Table of a Database in SSMS2012?

    Hi all,
    I used the following code to create a new Database (ScottChangDB) and a new Table (marvel) in my SQL Server 2012 Management Studio (SSMS2012) successfully:
    -- ScottChangDB.sql saved in C://Documents/SQL Server XQuery_MacLochlainns Weblog_code
    -- 14 April 2015 09:15 AM
    USE master
    IF EXISTS
    (SELECT 1
    FROM sys.databases
    WHERE name = 'ScottChangDB')
    DROP DATABASE ScottChangDB
    GO
    CREATE DATABASE ScottChangDB
    GO
    USE ScottChangDB
    CREATE TABLE [dbo].[marvel] (
    [avenger_name] [char] (30) NULL, [ID] INT NULL)
    INSERT INTO marvel
    (avenger_name,ID)
    VALUES
    ('Hulk', 1),
    ('Iron Man', 2),
    ('Black Widow', 3),
    ('Thor', 4),
    ('Captain America', 5),
    ('Hawkeye', 6),
    ('Winter Soldier', 7),
    ('Iron Patriot', 8);
    SELECT avenger_name FROM marvel ORDER BY ID For XML PATH('')
    DECLARE @x XML
    SELECT @x=(SELECT avenger_name FROM marvel ORDER BY ID FOR XML PATH('Marvel'))--,ROOT('root'))
    SELECT
    person.value('Marvel[4]', 'varchar(100)') AS NAME
    FROM @x.nodes('.') AS Tbl(person)
    ORDER BY NAME DESC
    --Or if you want the completed element
    SELECT @x.query('/Marvel[4]/avenger_name')
    DROP TABLE [marvel]
    Now I am trying to create my first XML Schema Collection to do the Validation on the Field Name (Column Title) of the "marvel" Table. I have studied Chapter 4 XML SCHEMA COLLECTIONS of the book "Pro SQL Server 2008 XML" written by
    Michael Coles (published by Apress) and some beginning pages of XQuery Language Reference, SQL Server 2012 Books ONline (published by Microsoft). I mimicked  Coles' Listing 04-05 and I wanted to execute the following first-drafted sql in
    my SSMS2012:
    -- Reference [Scott Chang modified Listing04-05.sql of Pro SQL Server 2008 XML by Michael Coles (Apress)]
    -- [shcColes04-05.sql saved in C:\\Documents\XML_SQL_Server2008_code_Coles_Apress]
    -- [executed: 2 April 2015 15:04 PM]
    -- shcXMLschemaTableValidate1.sql in ScottChangDB of SQL Server 2012 Management Studio (SSMS2012)
    -- saved in C:\Documents\XQuery-SQLServer2012
    tried to run: 15 April 2015 ??? AM
    USE ScottChangDB;
    GO
    CREATE XML SCHEMA COLLECTION dbo. ComplexTestSchemaCollection_all
    AS
    N'<?xml version="1.0"?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <xsd:element name="marvel">
    <xsd:complexType>
    <xsd:all>
    <xsd:element name="avenger_name" />
    <xsd:element name="ID" />
    </xsd:all>
    </xsd:complexType>
    </xsd:element>
    </xsd:schema>';
    GO
    DECLARE @x XML (dbo. ComplexTestSchemaCollection_all);
    SET @x = N'<?xml version="1.0"?>
    <marvel>
    <avenger_name>Thor</name>
    <ID>4</ID>
    </marvel>';
    SELECT @x;
    GO
    DROP XML SCHEMA COLLECTION dbo.ComplexTestSchemaCollection_all;
    GO
    I feel that drafted sql is very shaky and it needs the SQL Server XML experts to modify to make it work for me. Please kindly help, exam the coding of my shcXMLTableValidate1.sql and modify it to work.
    Thanks in advance,
    Scott Chang

    Hi Scott,
    2) Yes, FOR XML PATH clause converts relational data to XML format with a specific structure for the "marvel" Table. Regarding validate all the avenger_names, please see below
    sample.
    DECLARE @x XML
    SELECT @x=(SELECT ID ,avenger_name FROM marvel FOR XML PATH('Marvel'))
    SELECT @x
    SELECT
    n.value('avenger_name[1]','VARCHAR(99)') avenger_name,
    n.value('ID[1]','INT') ID
    FROM @x.nodes('//Marvel') Tab(n)
    WHERE n.value('ID[1]','INT') = 1 -- specify the ID here
    --FOR XML PATH('Marvel')  --uncommented this line if you want the result as element type
    3)i.check the xml schema content
    --find xml schema collection
    SELECT ss.name,xsc.name collection_name FROM sys.xml_schema_collections xsc JOIN sys.schemas ss ON xsc.schema_id= ss.schema_id
    select * from sys.schemas
    --check the schema content,use the name,collection_name from the above query
    SELECT xml_schema_namespace(N'name',N'collection_name')
    3)ii. View can be viewed as virtual table. Use a view to list the XML schema content.
    CREATE VIEW XSDContentView
    AS
    SELECT ss.name,xsc.name collection_name,cat.content
    FROM sys.xml_schema_collections xsc JOIN sys.schemas ss ON xsc.schema_id= ss.schema_id
    CROSS APPLY(
    SELECT xml_schema_namespace(ss.name,xsc.name) AS content
    ) AS cat
    WHERE xsc.name<>'sys'
    GO
    SELECT * FROM XSDContentView
    By the way, it would be appreciated if you can spread your questions into posts. For any question, feel free to let me know.
    Eric Zhang
    TechNet Community Support

Maybe you are looking for

  • How to load a CONSTANT NULL

    I"m getting the error message: SQL*Loader: Release 11.1.0.6.0 - Production on Tue Apr 6 15:28:37 2010 Copyright (c) 1982, 2007, Oracle. All rights reserved. SQL*Loader-350: Syntax error at line 71. Expecting valid column specification, "," or ")", fo

  • Moving fields from one location to another location?

    Hello I hv developed my_form, having couple of subforms, fields. They decided to change the layout drastically, pls. let me know How I can MOVE fields as a BUNCH from one location to another location on a DIFFERENT page? Say, earlier i hv 5 fields to

  • I cannot play music when connect to stereo via 30-pin connector. Help?

    Since I first upgraded my iPod Touch 2nd Gen to iOS 4.x, I cannot play music when connect to external speakers via the 30-pin connector. I've tried several different speaker systems, but none work. My iPod freezes after making my song selection and d

  • Best way to buy a Macbook Pro at an apple store

    I am going to purchase my first macbook pro next week. I am switching from Windows to Apple after 10 plus years of use. I am very excited to make the switch. My question is this, I was wondering what is the best way to buy one at an apple store? Shou

  • Paritions in the same tablespace

    Hi, If I create a partitioned tabled of let's say 5 partitions... but all the partitions are in the same tablespace. If I then have a SELECT statement from that table which has a WHERE condition based on the partition key column. Will Oracle take adv