MS SQL Server Architecture (Query Processing)

 Explain Sql server Architecture for Select statement diagrammatically ?
 Explain Sql server Architecture for Insert , update statements  diagrammatically ?
bhagee

Hi,
to me, we have to completely read SQL Server Internals book to understanding internals of DMLs. so many internal compoents, layers works starting from pressing F5 at client location till we get the result in results pane.
Below link has high level info about SELECT
http://www.sqlservercentral.com/blogs/livingforsqlserver/2010/12/05/what-happens-when-a-query-is-submitted/
internals of SELECT
http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/
Internals of INSERT
http://www.sqlservercentral.com/blogs/livingforsqlserver/2012/11/26/time-pass-with-transaction-log-part-4-ddl/
http://www.sqlservercentral.com/blogs/livingforsqlserver/2012/11/27/time-pass-with-transaction-log-part-5-insert/
hope you would find this useful.
Ramkumar Gopal Living For SQL Server Blog: http://www.sqlservercentral.com/blogs/livingforsqlserver/ Facebook: https://www.facebook.com/#!/groups/livingforsqlserver/ Twitter: https://twitter.com/LivingForSQL

Similar Messages

  • Error [hyt00] [microsoft][odbc sql server driver] query timeout expired

    I have the below network setup:-
    1. Its a simple network at my father's office at a small town called Ichalkaranji (District - Kolhapur, Maharashtra).
    2. We are using private network range 192.168.1.xxx with two Windows Server 2003 Enterprise Edition with SP2 licensed copies and 15 local Windows 7 clients who are only using Server A.
    3. The network is having a TP-Link Braodband Router Connected to internet with the IP 192.168.1.1.
    4. Both there Windows Server 2003 Enterprise Edition with SP2 are running separate SQL Server 2005 Express with Advanced Services, you can treat them as Server A (Problematic Server with IP of 192.168.1.2) 
    and Server B (this is not having any issue with IP of 192.168.1.3).
    5. Server A is also being used by 6 Remote users from our Kolkata office using DDNS facility through the NO IP client software which installed separately on both the servers. Kolkata remote users
    do not use OR access the Server B.
    6. Server B is being used by only 2 Remote users from our Erode office (Under Salem District, Tamilnadu) using DDNS facility through the NO IP client software which installed separately on both
    the servers. Erode remote users do not use OR access the Server A.
    7. The front end application which running separately on both the servers have been developed in VB by a local vendor at Ichalkaranji (District - Kolhapur, Maharashtra).
    8. Both Servers are having the same database structure in terms of design and tables format. Only difference is that both the servers are being used separately.
    9. This error OR problem is only related to Server A, where on the clients we get the message "error [hyt00] [microsoft][odbc sql server driver] query timeout expired" every now and then.
    10. We have to frequently reboot the server whenever we get this message on the client machines. May be after rebooting every thing works perfectly for 2 hours / 5 Hours / may be one full day but
    the the error will come back for sure.
    11. Current Database back up size on Server A is around 35 GB and take around 1 hour 15 minutes daily to take the back up.
    12. Current Database back up size on Server B is around 3 GB and take around 5 to 10 minutes daily to take the back up.
    13. One thing I have noticed is that when ever we reboot Server A, for some time sqlsrvr.exe file will show memory usage of 200 to 300 MBs but it will start using slowly, what i understand is that
    this is the way SQL Server works.
    14. Both the Servers are also running Quick heal Antivirus Server Edition separate licensed copies also.
    15. Server B is also running Tally ERP 9 Licenses copy which is being used locally by 15 users of Ichalkaranji (District - Kolhapur, Maharashtra) same users
    Can any one help to resolve this issue. Any help will be highly appreciated.

    The error message "query timeout expired" occurs, because by default many APIs, including ODBC only waits for 30 seconds for SQL Server to send any output. If no data has been seen for this period of time, they tell SQL Server to cancel execution
    and return this error to the caller.
    This timeout could be seen as a token that the query is taking too long time to execute and this needs to be fixed. But it can also be a pain in the rear parts, if you are content with a report taking five minutes, because you only run it once a day.
    The simplest way to get rid of the error is to set the timeout to zero, which means "wait forever". This is something your vendor would have to do. This may, however, not resolve the problem, as the users may just find that the application is hanging.
    To wit, there are two reasons why the query takes more than 30 seconds to complete. One is that there is simply that much work to do. This can be reduced by adding indexes or by doing other tuning, if the execution time is not acceptable. The other possibility
    is blocking. That is, there is a process blocking this query from completing. This is much more likely to require attention.
    It is not clear to me, whether the vendor has developed the database part as well. In this case, you should probably call the vendor's support desk to have them to sort this out.
    Finally, I am little puzzled. You say that you are using Express Edition, but one of the databases is 35 GB in size. 35 GB is far above the limit for Express Edition.
    Erland Sommarskog, SQL Server MVP, [email protected]

  • SSRS - SQL Server Spatial Query

    Hi, I was hoping someone could help me.
    I'm creating an SSRS report with Map and importing points via SQL Server Spatial query. I have a db table with 8,000 points bu the import only ever brings in the first 2,000 queried (no matter what the filter is). Is there a limitation in SSRS that can be
    changed via a configuration setting?
    Many thanks in advance for any help on this,
    Steve.

    Really appreciate you coming back so quick Olaf.
    No its a straightforward query (select AccountNum, Name, Address, Longitude, Lattitude, UrbanArea, County, MI_STYLE, MI_PRINX, SP_GEOMETRY from <table>)
    Just to give the whole picture. I had 8,000 points in MapInfo version 10. I imported them to SQL Server 2012 via MapInfo Easy Loader.
    The SQL Server spatial points import to SSRS and the Bing overlay map works great (so they import to correct space) but its only a subset of the points that import. I can pick any subset using the WHERE clause but I cannot get all 8,000 points.  
    I was hoping there was a configuration setting somewhere in SSRS that was causing the problem.

  • How to convert SQL Server hierarchical query (CTE) to Oracle?

    How to convert SQL Server hierarchical query (CTE) to Oracle?
    WITH cte (col1, col2) AS
    SELECT col1, col2
    FROM dbo.[tb1]
    WHERE col1 = 12
    UNION ALL
    SELECT c.col1, c.col2
    FROM dbo.[tb1] AS c INNER JOIN cte AS p ON c.col2 = p.col1
    DELETE a
    FROM dbo.[tb1] AS a INNER JOIN cte AS b
    ON a.col1 = b.col1

    See: http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_10002.htm#i2129904
    Ah, just spotted it's a delete statement - you won't be able to do it using subquery factoring in Oracle.
    I had a go at trying to convert for you, but notice that you reference the cte from inside the cte... I can only assume you have a table called cte too...
    DELETE FROM dbo.tb1
    WHERE col1 = 12
    OR col2 IN (SELECT col1 FROM cte)
    Edited by: Boneist on 22-Jun-2009 09:19

  • Copy and Paste from SQL server to Query Generator eliminate spaces

    Hi:
    My query is run perfectly on SQL server.
    However, when I copied it to Query Generator in SAP B1, it can not be run. When I look closely I see that some spaces have been truncated for example between the fieldname and key words like FROM, LEFT OUTER JOIN. I have to then going through the Query Generator in SAP B1 to put in the spaces in appropriate places. This process took long time and require very close attention and did not make any sense to me, since my query already work in SQL server query manager.
    Is there any way that we can make Query Generator in SAP B1 keeping the same format (ie. not eliminate the spaces) as in SQL server Query Manager?
    Best Regards,
    Phong Nguyen.

    Here is what I mean:
    SELECT YEAR(T1.DocDate) YEAR_NO, DATEPART(wk,T1.DocDate) WEEK_NO,SUM(T1.LineTotal) TotalShrinkage_Sales, (SUM(T1.LineTotal)/SUM(T1.Total_Sales)) Percent_Shrinkage, SUM(T1.Total_Sales) Total_Sales,COUNT(DISTINCT T1.Shrinkage_No) Shrinkage_Volume, SUM(T1.TotalCost) TotalShrinkage_CostFROM (SELECT V0.ITEMCODE, V0.DocEntry Shrinkage_No, V0.DocDate, V0.LineTotal, 0 Total_Sales,  V0.TotalCostFROM dbo.V_SHRINKAGE_TOTAL V0 WHERE V0.TransType='Shrinkage'UNION ALLSELECT V1.ITEMCODE, null Shrinkage_No, V1.DocDate, 0 LineTotal, V1.LineTotal Total_Sales, 0 TotalCostFROM dbo.V_Sales_Invoice V1UNION ALLSELECT V2.ITEMCODE, null Shrinkage_No, V2.DocDate,0 LineTotal, V2.LineTotal Total_Sales, 0 TotalCost FROM dbo.V_Credit_Note V2) T1WHERE DATEDIFF(wk,T1.DocDate,getdate())<=12GROUP BY YEAR(T1.DocDate), DATEPART(wk,T1.DocDate)ORDER BY YEAR(T1.DocDate) ASC,DATEPART(wk,T1.DocDate) ASC
    You can see the the third line (top down) the space between the field TotalShrinkage_Cost and FROM has been eliminated.
    Also you can see that on the 4th line (top down) the space between the field  V0.TotalCost and FROM has been eliminated.
    Also in the 5th line (top down) you can see: V0.TransType='Shrinkage'UNION ALLSELECT --- spaces have been eliminated between 'Shrinkage" and UNION and ALL and SELECT
    The list can go on.
    Can you help there?
    Thanks,
    Phong Nguyen.

  • SQL Server 2008 Express -- Process exited with code -2068643839

    When installing SQL Server 2008 Express, I continue to get the following info in the install log.  I notice that I only get this issue with 64-bit PC's (win 7 & win 8.1).  Ideas?
    Thanks.
    The following components failed to install:
    - SQL Server 2008 Express
    See the setup log file located at 'C:\Users\Roy\AppData\Local\Temp\VSDE1F7.tmp\install.log' for more information.
    The following properties have been set:
    Property: [AdminUser] = true {boolean}
    Property: [InstallMode] = SameSite {string}
    Property: [ProcessorArchitecture] = AMD64 {string}
    Property: [VersionNT] = 6.1.0 {version}
    Running checks for package 'Windows Installer 3.1', phase BuildList
    The following properties have been set for package 'Windows Installer 3.1':
    Running checks for command 'WindowsInstaller3_1\WindowsInstaller-KB893803-v2-x86.exe'
    Result of running operator 'VersionGreaterThanOrEqualTo' on property 'VersionMsi' and value '3.1': true
    Result of checks for command 'WindowsInstaller3_1\WindowsInstaller-KB893803-v2-x86.exe' is 'Bypass'
    'Windows Installer 3.1' RunCheck result: No Install Needed
    Running checks for package 'SyncSDK', phase BuildList
    The following properties have been set for package 'SyncSDK':
    Running checks for command 'SynSDK\syncsdk-v2.1-x86-enu.msi'
    Result of checks for command 'SynSDK\syncsdk-v2.1-x86-enu.msi' is 'Install'
    'SyncSDK' RunCheck result: Install Needed
    Running checks for package 'Windows Installer 4.5', phase BuildList
    Looking up path for special folder 'WindowsFolder'
    Running check with folder 'C:\Windows\System32' and file 'msi.dll'
    Attempting to find file 'C:\Windows\System32\msi.dll'
    File version is '5.0.7601.18637'
    Setting value '5.0.7601.18637 {version}' for property 'VersionMsiDll'
    The following properties have been set for package 'Windows Installer 4.5':
    Property: [VersionMsiDll] = 5.0.7601.18637 {version}
    Running checks for command 'WindowsInstaller4_5\WindowsXP-KB942288-v3-x86.exe'
    Result of running operator 'VersionGreaterThanOrEqualTo' on property 'VersionMsi' and value '4.5': true
    Result of checks for command 'WindowsInstaller4_5\WindowsXP-KB942288-v3-x86.exe' is 'Bypass'
    Running checks for command 'WindowsInstaller4_5\WindowsXP-KB958655-v2-x86-ENU.exe'
    Result of running operator 'VersionGreaterThanOrEqualTo' on property 'VersionMsiDll' and value '4.5.6001.22299': true
    Result of checks for command 'WindowsInstaller4_5\WindowsXP-KB958655-v2-x86-ENU.exe' is 'Bypass'
    Running checks for command 'WindowsInstaller4_5\WindowsServer2003-KB942288-v4-x86.exe'
    Result of running operator 'VersionGreaterThanOrEqualTo' on property 'VersionMsi' and value '4.5': true
    Result of checks for command 'WindowsInstaller4_5\WindowsServer2003-KB942288-v4-x86.exe' is 'Bypass'
    Running checks for command 'WindowsInstaller4_5\WindowsServer2003-KB958655-v2-x86-ENU.exe'
    Result of running operator 'VersionGreaterThanOrEqualTo' on property 'VersionMsiDll' and value '4.5.6001.22299': true
    Result of checks for command 'WindowsInstaller4_5\WindowsServer2003-KB958655-v2-x86-ENU.exe' is 'Bypass'
    Running checks for command 'WindowsInstaller4_5\WindowsServer2003-KB942288-v4-x64.exe'
    Result of running operator 'VersionGreaterThanOrEqualTo' on property 'VersionMsi' and value '4.5': true
    Result of checks for command 'WindowsInstaller4_5\WindowsServer2003-KB942288-v4-x64.exe' is 'Bypass'
    Running checks for command 'WindowsInstaller4_5\WindowsServer2003.WindowsXP-KB958655-v2-x64-ENU.exe'
    Result of running operator 'VersionGreaterThanOrEqualTo' on property 'VersionMsiDll' and value '4.5.6001.22299': true
    Result of checks for command 'WindowsInstaller4_5\WindowsServer2003.WindowsXP-KB958655-v2-x64-ENU.exe' is 'Bypass'
    Running checks for command 'WindowsInstaller4_5\Windows6.0-KB958655-v2-x86.MSU'
    Result of running operator 'VersionGreaterThanOrEqualTo' on property 'VersionMsiDll' and value '4.5.6001.22308': true
    Result of checks for command 'WindowsInstaller4_5\Windows6.0-KB958655-v2-x86.MSU' is 'Bypass'
    Running checks for command 'WindowsInstaller4_5\Windows6.0-KB958655-v2-x64.MSU'
    Result of running operator 'VersionGreaterThanOrEqualTo' on property 'VersionMsiDll' and value '4.5.6001.22308': true
    Result of checks for command 'WindowsInstaller4_5\Windows6.0-KB958655-v2-x64.MSU' is 'Bypass'
    'Windows Installer 4.5' RunCheck result: No Install Needed
    Running checks for package 'Microsoft .NET Framework 4 (x86 and x64)', phase BuildList
    Reading value 'Version' of registry key 'HKLM\Software\Microsoft\NET Framework Setup\NDP\v4\Full'
    Read string value '4.5.50938'
    Setting value '4.5.50938 {string}' for property 'DotNet40Full_TargetVersion'
    The following properties have been set for package 'Microsoft .NET Framework 4 (x86 and x64)':
    Property: [DotNet40Full_TargetVersion] = 4.5.50938 {string}
    Running checks for command 'DotNetFX40\dotNetFx40_Full_x86_x64.exe'
    Result of running operator 'ValueEqualTo' on property 'InstallMode' and value 'HomeSite': false
    Result of running operator 'VersionGreaterThanOrEqualTo' on property 'DotNet40Full_TargetVersion' and value '4.0.30129': true
    Result of checks for command 'DotNetFX40\dotNetFx40_Full_x86_x64.exe' is 'Bypass'
    Running checks for command 'DotNetFX40\dotNetFx40_Full_setup.exe'
    Result of running operator 'ValueNotEqualTo' on property 'InstallMode' and value 'HomeSite': true
    Result of checks for command 'DotNetFX40\dotNetFx40_Full_setup.exe' is 'Bypass'
    'Microsoft .NET Framework 4 (x86 and x64)' RunCheck result: No Install Needed
    Running checks for package 'Microsoft .NET Framework 4 Client Profile (x86 and x64)', phase BuildList
    Reading value 'Version' of registry key 'HKLM\Software\Microsoft\NET Framework Setup\NDP\v4\Client'
    Read string value '4.5.50938'
    Setting value '4.5.50938 {string}' for property 'DotNet40Client_TargetVersion'
    The following properties have been set for package 'Microsoft .NET Framework 4 Client Profile (x86 and x64)':
    Property: [DotNet40Client_TargetVersion] = 4.5.50938 {string}
    Running checks for command 'DotNetFX40Client\dotNetFx40_Client_x86_x64.exe'
    Result of running operator 'ValueEqualTo' on property 'InstallMode' and value 'HomeSite': false
    Result of running operator 'VersionGreaterThanOrEqualTo' on property 'DotNet40Client_TargetVersion' and value '4.0.30129': true
    Result of checks for command 'DotNetFX40Client\dotNetFx40_Client_x86_x64.exe' is 'Bypass'
    Running checks for command 'DotNetFX40Client\dotNetFx40_Client_setup.exe'
    Result of running operator 'ValueNotEqualTo' on property 'InstallMode' and value 'HomeSite': true
    Result of checks for command 'DotNetFX40Client\dotNetFx40_Client_setup.exe' is 'Bypass'
    'Microsoft .NET Framework 4 Client Profile (x86 and x64)' RunCheck result: No Install Needed
    Running checks for package 'SQL Server 2008 Express', phase BuildList
    Running external check with command 'C:\Users\Roy\AppData\Local\Temp\VSDE1F7.tmp\SqlExpress2008\SqlExpressChk.exe' and parameters '10.0.1600 1033'
    Process exited with code 1
    Setting value '1 {int}' for property 'SQLExpressChk'
    The following properties have been set for package 'SQL Server 2008 Express':
    Property: [SQLExpressChk] = 1 {int}
    Running checks for command 'SqlExpress2008\SQLEXPR32_x86_ENU.EXE'
    Result of running operator 'ValueNotExists' on property 'VersionNT': false
    Result of running operator 'VersionLessThan' on property 'VersionNT' and value '5.1.2': false
    Result of running operator 'VersionEqualTo' on property 'VersionNT' and value '5.2.0': false
    Result of running operator 'VersionEqualTo' on property 'VersionNT' and value '5.2.1': false
    Result of running operator 'ValueEqualTo' on property 'AdminUser' and value 'false': false
    Result of running operator 'ValueEqualTo' on property 'SQLExpressChk' and value '-1': false
    Result of running operator 'ValueEqualTo' on property 'SQLExpressChk' and value '-2': false
    Result of running operator 'ValueEqualTo' on property 'SQLExpressChk' and value '-3': false
    Result of running operator 'ValueEqualTo' on property 'SQLExpressChk' and value '-4': false
    Result of running operator 'ValueLessThan' on property 'SQLExpressChk' and value '-4': false
    Result of running operator 'ValueNotEqualTo' on property 'ProcessorArchitecture' and value 'Intel': true
    Result of checks for command 'SqlExpress2008\SQLEXPR32_x86_ENU.EXE' is 'Bypass'
    Running checks for command 'SqlExpress2008\SQLEXPR32_x86_ENU.EXE'
    Result of running operator 'ValueNotEqualTo' on property 'ProcessorArchitecture' and value 'Intel': true
    Result of checks for command 'SqlExpress2008\SQLEXPR32_x86_ENU.EXE' is 'Bypass'
    Running checks for command 'SqlExpress2008\SQLEXPR_x64_ENU.EXE'
    Result of running operator 'ValueNotEqualTo' on property 'ProcessorArchitecture' and value 'amd64': false
    Result of running operator 'ValueNotEqualTo' on property 'SQLExpressChk' and value '1': false
    Result of checks for command 'SqlExpress2008\SQLEXPR_x64_ENU.EXE' is 'Install'
    Running checks for command 'SqlExpress2008\SQLEXPR_x64_ENU.EXE'
    Result of running operator 'ValueNotEqualTo' on property 'ProcessorArchitecture' and value 'amd64': false
    Result of running operator 'ValueNotEqualTo' on property 'SQLExpressChk' and value '2': true
    Result of checks for command 'SqlExpress2008\SQLEXPR_x64_ENU.EXE' is 'Bypass'
    'SQL Server 2008 Express' RunCheck result: Install Needed
    EULA for components 'SQL Server 2008 Express' was accepted.
    Installation of components 'SyncSDK' was accepted.
    Copying files to temporary directory "C:\Users\Roy\AppData\Local\Temp\VSDE1F7.tmp\"
    Copying from 'C:\Installs\NewMBA\SynSDK\syncsdk-v2.1-x86-enu.msi' to 'C:\Users\Roy\AppData\Local\Temp\VSDE1F7.tmp\SynSDK\syncsdk-v2.1-x86-enu.msi'
    Verifying file integrity of C:\Users\Roy\AppData\Local\Temp\VSDE1F7.tmp\SynSDK\syncsdk-v2.1-x86-enu.msi
    WinVerifyTrust returned 0
    File trusted
    Copying from 'C:\Installs\NewMBA\SqlExpress2008\SQLEXPR_x64_ENU.EXE' to 'C:\Users\Roy\AppData\Local\Temp\VSDE1F7.tmp\SqlExpress2008\SQLEXPR_x64_ENU.EXE'
    Verifying file integrity of C:\Users\Roy\AppData\Local\Temp\VSDE1F7.tmp\SqlExpress2008\SQLEXPR_x64_ENU.EXE
    WinVerifyTrust returned 0
    File trusted
    Running checks for package 'SyncSDK', phase BeforePackage
    The following properties have been set for package 'SyncSDK':
    Running checks for command 'SynSDK\syncsdk-v2.1-x86-enu.msi'
    Result of checks for command 'SynSDK\syncsdk-v2.1-x86-enu.msi' is 'Install'
    'SyncSDK' RunCheck result: Install Needed
    Verifying file integrity of C:\Users\Roy\AppData\Local\Temp\VSDE1F7.tmp\SynSDK\syncsdk-v2.1-x86-enu.msi
    WinVerifyTrust returned 0
    File trusted
    Installing using command 'C:\Windows\SysWOW64\msiexec.exe' and parameters ' -I "C:\Users\Roy\AppData\Local\Temp\VSDE1F7.tmp\SynSDK\syncsdk-v2.1-x86-enu.msi" -q '
    Will attempt to elevate process.
    Process exited with code 0
    Running checks for package 'SyncSDK', phase AfterPackage
    The following properties have been set for package 'SyncSDK':
    Running checks for command 'SynSDK\syncsdk-v2.1-x86-enu.msi'
    Result of checks for command 'SynSDK\syncsdk-v2.1-x86-enu.msi' is 'Install'
    'SyncSDK' RunCheck result: Unknown
    Running checks for package 'SQL Server 2008 Express', phase BeforePackage
    Running external check with command 'C:\Users\Roy\AppData\Local\Temp\VSDE1F7.tmp\SqlExpress2008\SqlExpressChk.exe' and parameters '10.0.1600 1033'
    Process exited with code 1
    Setting value '1 {int}' for property 'SQLExpressChk'
    The following properties have been set for package 'SQL Server 2008 Express':
    Property: [SQLExpressChk] = 1 {int}
    Running checks for command 'SqlExpress2008\SQLEXPR_x64_ENU.EXE'
    Result of running operator 'ValueNotEqualTo' on property 'ProcessorArchitecture' and value 'amd64': false
    Result of running operator 'ValueNotEqualTo' on property 'SQLExpressChk' and value '1': false
    Result of checks for command 'SqlExpress2008\SQLEXPR_x64_ENU.EXE' is 'Install'
    'SQL Server 2008 Express' RunCheck result: Install Needed
    Verifying file integrity of C:\Users\Roy\AppData\Local\Temp\VSDE1F7.tmp\SqlExpress2008\SQLEXPR_x64_ENU.EXE
    WinVerifyTrust returned 0
    File trusted
    Installing using command 'C:\Users\Roy\AppData\Local\Temp\VSDE1F7.tmp\SqlExpress2008\SQLEXPR_x64_ENU.EXE' and parameters '/q /hideconsole /action=Install /features=SQL /instancename=SQLEXPRESS /enableranu=1 /sqlsvcaccount="NT Authority\Network
    Service" /AddCurrentUserAsSqlAdmin /skiprules=RebootRequiredCheck'
    Process exited with code -2068643839
    Status of package 'SyncSDK' after install is 'InstallUnknown'
    Status of package 'SQL Server 2008 Express' after install is 'InstallFailed'

    The SP3 patch installed ok.
    When I ran my software installer, it failed again w/ the error 1001.
    Here is the summary.txt.
    Overall summary:
      Final result:                  Passed
      Exit code (Decimal):           0
      Exit message:                  Passed
      Start time:                    2015-01-20 19:26:40
      End time:                      2015-01-20 19:37:08
      Requested action:              Patch
    Instance MSSQLSERVER overall summary:
      Final result:                  Passed
      Exit code (Decimal):           0
      Exit message:                  Passed
      Start time:                    2015-01-20 19:31:48
      End time:                      2015-01-20 19:34:52
      Requested action:              Patch
    Instance MBA overall summary:
      Final result:                  Passed
      Exit code (Decimal):           0
      Exit message:                  Passed
      Start time:                    2015-01-20 19:34:57
      End time:                      2015-01-20 19:36:17
      Requested action:              Patch
    Instance MBANEW overall summary:
      Final result:                  Passed
      Exit code (Decimal):           0
      Exit message:                  Passed
      Start time:                    2015-01-20 19:36:21
      End time:                      2015-01-20 19:37:01
      Requested action:              Patch
    Machine Properties:
      Machine name:                  JOHN
      Machine processor count:       4
      OS version:                    Windows Vista
      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
      Sql Server 2008      SQLEXPRESS           MSSQL10.SQLEXPRESS             Database Engine Services                
    1033                 Express Edition      10.1.2531.0     No       
      Sql Server 2008      SQLEXPRESS           MSSQL10.SQLEXPRESS             SQL Server Replication                  
    1033                 Express Edition      10.1.2531.0     No       
      Sql Server 2008      MSSQLSERVER          MSSQL10.MSSQLSERVER            Database Engine Services                
    1033                 Express Edition      10.3.5500.0     No       
      Sql Server 2008      MBA                  MSSQL10.MBA                   
    Database Engine Services                 1033                 Express Edition     
    10.3.5500.0     No       
      Sql Server 2008      MBANEW               MSSQL10.MBANEW                 Database
    Engine Services                 1033                 Express Edition     
    10.3.5500.0     No       
    Package properties:
      Description:                   SQL Server Database Services 2008
      SQLProductFamilyCode:          {628F8F38-600E-493D-9946-F4178F20A8A9}
      ProductName:                   SQL2008
      Type:                          RTM
      Version:                       10
      SPLevel:                       3
      KBArticle:                     KB2977321
      KBArticleHyperlink:          
      PatchType:                     GDR
      AssociatedHotfixBuild:         5869
      Platform:                      x64
      PatchLevel:                    10.3.5520.0
      ProductVersion:                10.3.5500.00
      GDRReservedRange:              10.0.1000.0:10.0.1099.0;10.0.3000.0:10.0.3099.0;10.0.4010.0:10.0.4250.0;10.0.5501.0:10.0.5750.0
      PackageName:                   SQLServer2008-KB2977321-x64.exe
      Installation location:         c:\adcd5df38e670a98a9f2aafcc70e\x64\setup\
    Updated product edition:
      Instance             Edition            
      MSSQLSERVER          EXPRESS            
      MBA                  EXPRESS            
      MBANEW               EXPRESS            
    User Input Settings:
      ACTION:                        Patch
      ALLINSTANCES:                  False
      CLUSTERPASSIVE:                False
      CONFIGURATIONFILE:            
      HELP:                          False
      INDICATEPROGRESS:              False
      INSTANCENAME:                  <empty>
      QUIET:                         False
      QUIETSIMPLE:                   False
      X86:                           False
    Rules with failures:
    Global rules:
    There are no scenario-specific rules.
    Rules report file:               C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Log\20150120_192631\SystemConfigurationCheck_Report.htm

  • Upgrade SQL server to increase processing speed

    I have connected SQL server to my web service and currently the number of records being processed by a particular table has increased on a large scale. As a result of deleting and inserting into this table, the performance has gone down. Are there any
    suggestions on how existing SQL server can be updated to increase the performance? Currently im using SQL server Enterprise edition 2012. Only a single server is been used with no replications. Please advice.
    mayooran99

    Hi
    First of all, check out for fragmentation due to massive insert/delete operation an index is out of order
    SELECT avg_fragmentation_in_percent FROM sys.dm_db_index_physical_stats
      DB_ID('testdb'),
      OBJECT_ID('dbo.T1'),
      1,
      NULL,
      NULL
    What does the above return?
    To rebuild index/es
    --single index
    ALTER INDEX IX_Str ON tblname
    REBUILD;
    GO
    --all indexes on the table
    ALTER INDEX ALL ON tblname
    REBUILD WITH (FILLFACTOR = 80, SORT_IN_TEMPDB = ON,
                  STATISTICS_NORECOMPUTE = ON);
    GO
    More over to speed up the query you need to have properly defined indexes on the table.
    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

  • SSIS package fails in sql server agent wirh 'Process exit code "-532459699" runs fine when run independantly

    I have a SSIS package that fails when running via sql server agent.  I can successfully run it from BIDS.    I have created a proxy account that is in the local server administrators group and is sysadmin.  SQL Server Agent and SQL
    Server Integration Services  are running under the same account,
    following the the error message:
    Error: 2014-02-07 10:29:12.59
       Code: 0xC0029151
       Source: Execute De-linking Execute Process Task
       Description: In Executing "d:\cie\files\working\9426\PowerpointConsole.exe" " 60.ppt" at "d:\cie\files\working\9426", The process exit code was "-532459699" while the expected was "0".
    End Error
    This package ran successfully on a different server running windows 2003 and sql server 2008 r2.  The new environment is windows 7 with sql server 2008 r2.

    Hi Gaileg,
    As Abhinav said, to check whether it is a 32-bit/64-bit issue, please check whether the package runs in 32-bit runtime mode or 64-bit runtime mode in BIDS by checking the Run64bitRuntime property of the project. Then, make sure the package runs in the same
    runtime mode in the SQL Server Agent job by checking or unchecking the “Use 32 bit runtime” option for the Execution options of the job step.
    If it is not the issue, please create another job that uses a CmdExec type job step to call the executable “D:\cie\files\working\9426\PowerpointConsole.exe”. If this job also fails, the issue is actually occurs because of the issue between executable and
    SQL Server Agent rather than the SSIS package itself.
    Regards,
    Mike Yin
    TechNet Community Support

  • SQL Server TG Query Optimization

    We are using Oracle Transparent Gateway 9.0.1.1.1 to connect an Oracle (Windows 2000) 9.1.7.4.0 database to a SQl Server 2000 SP2 database.
    When we use two simple queries to retrieve information from the gateway, the data is returned with a response time of less than 100 milliseconds. When we combine these queries into a single query, data is returned with a response time of over 20 seconds.
    QUESTION: Is there any documentation as to the "Do's" and "Don'ts" of querying across the TG for best response times? Anything concerning joining Oracle and SQL Server tables in particular would be appreciated.
    Scott Allen
    [email protected]

    Scott,
    The gateway does not create any type of locks. Could you provide the sql statements in your session. Also take a look at the trace generated by the SQL Server profiler

  • How to get hardware related metrics of SQL Server through query ?

    Hi Folks,
                   I am newbie to the SQL Server programming. I also follow this forum only now. I am not sure if these kind of question had been asked in the past. Let me furnish you more detail about my query. I do like
    to get few details regarding the SQL server. I do need the following details to get the information about it through query
    SQL Server Installation directory
    No. Of CPU(as i read SQL Server standard support 4 cpu and Enterprise support 32 CPU)
    CPU Speed of the SQL Server installed machine
    Disk Storage details
    Operating system on which the SQL Server is installed
    Location of the swap file of SQL Server
    TempDB directory path
    System database directory path
    User database location 
    Log files location
    I do like to get information like this through query. Can i know if such information can be get through query or it should be get only thro' WMI. Please drop your ideas in getting these details.
    Thanks in Advance,
    Regards,
    JeiSurya

    Try this query in the below link 
    http://gallery.technet.microsoft.com/Query-to-find-all-the-8fa765e6
    you will get the SQL Server and H/W Details like 
    IP Address 
    FQDN 
    CurrentSQLNodeName 
    SQL Instance Name 
    SQL Server Product
    SQL Server Edition 
    Service Pack 
    SQL Server Version 
    Operating System
    OS SP Level
    OS Build Number
    SystemManufacturer 
    Processor Type 
    System Model 
    Total RAM in MB 
    NumberOfPhysicalCPUs 
    NumberOfCoresInEachCPU 
    TotalNumberOfCores 
    NumberOfLogicalCPUs

  • SQL Server Architecture

    Hi,
    Please provide any document or URL.
    Which contains Architecture differences/Enhancements  between SQL2005,2008,2008r2 and 2012?

    Hi,
    Check out the following articles:
    Compression: What’s the difference between SQL2005 and SQL2008?
    http://blogs.msdn.com/b/euanga/archive/2007/11/07/compression-whats-the-difference-between-sql2005-and-sql2008.aspx
    What are the differences between SQL Server 2005, 2008 and 2012
    http://touchstone-systems.co.uk/blog/?p=74
    Thanks.
    Tracy Cai
    TechNet Community Support

  • SQL Server Licensing Query

    Hi Team ,
    I have some queries for MS SQL server , can you please clarify the below points :
    Can I buy licenses for SQL 2008 R2 or do I need to buy license for MSSQL server 2012 license and then downgrade it?
    Would there be any additional cost for downgrade ?
    If I want to buy license for MSSQL 2008 ,would it be “per processor “ or “per core” for Virtualization i.e. which of the two licensing policies will apply.
    Please clarify on this.relevant microsoft oem docs/links would be really helpful
    Thanks

    Hi Team ,
    I have some queries for MS SQL server , can you please clarify the below points :
    Can I buy licenses for SQL 2008 R2 or do I need to buy license for MSSQL server 2012 license and then downgrade it?
    Would there be any additional cost for downgrade ?
    If I want to buy license for MSSQL 2008 ,would it be “per processor “ or “per core” for Virtualization i.e. which of the two licensing policies will apply.
    1. You can buy license for 2008 R2, if your requirement is 2008 R2 dont buy 2012 its costly.. You dont need to buy 2012 license and downgrade it.I am not sure whether it is possible or not licensing expert will be in better position to answer this question.
    2.Licensing expert can tell better.
    3.Licensing expert can tell better. Please use information provided by Kalman.But i still suggest you to go for 2008 R2 IF that suits your requirement
    PS: This is technical forum, Licensing question must be directed to licensing expert
    Please mark this reply as the answer or vote as helpful, as appropriate, to make it useful for other readers
    My TechNet Wiki Articles

  • How to fetch presence in Lync 2013 from SQL server (using query)

    We are running Lync 2013 setup with 5 FE and 2 BE SQL (mirrored) servers.
    How can i get presence information for our users by script or SQL queries?
    My Concern is to fetch out current presence information of a list of users (CSV file) by script (Powershell or SQL query) for automation purpose. So that one need not to go to Lync 2013 (or anything) Client for every single user, to check their corresponding
    presence.
    E.g Say a service desk agent is handling tickets of 200 users per day. So it will be time consuming for him/her to go to Lync 2013 client and check presence for every user. It would be better for SD agent to operate, if we could make a script to fetch presence
    status for the list of 200 users.
    We will fetch the information when required and send a mail to him/her.
    i have asked this question under Presence and IM forum.
    https://social.technet.microsoft.com/Forums/en-US/ef6287d1-e474-48ab-a411-f3813d256145/how-to-fetch-presence-information-in-lync-2013?forum=lyncprofile
    been suggested to post it here.

    Create a Store procedure which will give you integer value according to presence status:
    USE [rtc]
    GO
    /****** Object:  StoredProcedure [dbo].[GetAvailability]    Script Date: 05/01/2015 10:36:35 ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    -- =============================================
    -- Author:  <sudipta samanta>
    -- Create date: <02.01.2015>
    -- Description: <fetch presence information of user>
    -- =============================================
    CREATE PROCEDURE [dbo].[GetAvailability]
    @_Publisher varchar(50)
    AS
    DECLARE
    @agrregate_state varchar(500),
    @availability varchar(50),
    @index_first int,
    @index_last int,
    @index int
    BEGIN
    SET NoCount ON
    set @agrregate_state = (select top 1 Data from dbo.DiagPublisherDataView(@_Publisher) order by LastPubTime desc);
    set @index_first = (select CHARINDEX('<availability>',@agrregate_state));
    set @index_last = (select CHARINDEX('</availability>',@agrregate_state));
    set @index = @index_first + 14;
    set @availability = (SUBSTRING(@agrregate_state,@index,@index_last - @index));
    return CONVERT(int, @availability);
    END
    GO

  • Sql Server Express Query String error

    I am having trouble trying to filter my sql database using the query string against a date column in my database.  I set a date variable = "dd/mm/yyy" format but when I apply that in the sql query as:
    StartPeriod = CDate("01/" & Today.Month.ToString & "/" & Today.Year.ToString)
    EndPeriod = CDate(Today.Day.ToString & "/" & Today.Month.ToString & "/" & Today.Year.ToString)
    At this point StartPeriod = #04/01/2015#  and EndPeriod is #04/27/2015#
    sql = "SELECT * FROM Transactions WHERE  ((PaidOutDate IS Null) OR (TransDate >= '" & StartPeriod & "' AND TransDate <= '" & EndPeriod & "')
    When I execute the Sql command I get this error:
    "Conversion failed when converting date and/or time from character string"
    My Current Culture is {en-AU}
    Any help is appreciated.
    Brad
    BHend

    Visakh,
    Further to the problem above.  Your suggestion worked well on my laptop, but when I transferred the program to my desktop it failed with the error: "Conversion failed when converting date and/or time from character string" again.  Both
    computers are running the same version of Windows 8.1, both running the same version of vs express 2012 and both running the same version of ssms.  Both Windows 8.1 versions have the same English (Australia) as the Region and language.  The only
    difference that I can find is that while both have a CurrentCulture of {en=AU} and CurrentUICulture of {en-GB} the laptop, where the program works has an InstalledUICulture of {en-GB} and the PC where it doesn't work has an InstalledUICulture of {en-US}.
    Do you think this could be the problem?  If so, how would I change the InstalledIUCulture?
    As you can tell I am way our of my depth here, I've looked in the Control Panel and both computers appear to have the same settings for options that I think are relevant, but of course there could be hundreds of other settings nI don't know about. 
    I've also progressively worked through the Registry on both computers comparing their settings but could find nothing relevant. 
    Any suggestions of where to look?
    Thanks Again
    Brad
    BHend

  • Query: SQL Server Book Recommendations

    Hi folks!
    There are Books Online. There are the SAP Notes and Documents created by people like Jürgen Thomas (THANKS!!!) ...
    There are many sources of information in the WWW - blogs, documents, discussons ...
    And there are many BOOKS. Too many ...
    I ask you to recommend your favourite books about SQL Server.
    Your recommendations should help all of us to buy those books which are helpful ...
    Kind regards, Rudi

    Hi Rudolf,
      Do you focus only on SQL server, not including Windows Server Failover Cluster and SAP? If yes, I  recommend you to ask in MSDN -> Database Engine.
    Because this is a SAP on SQL forum, I will talk a little bit about WSFC and SAP. Here is my MATERIAL list. Hope this helps.
    PS: These are very useful for troubleshooting and performance optimization. Regarding to reviews, there are so many people wrote in Amazon in great detail. I will skip it.
    1. Search "Failover Cluster" from MS TechEd 2008~2014
    2. Search "SQL Server Performance/Query/execution plan/AlwaysOn" from MS TechEd 2008~2014
    3. A book "Microsoft SQL Server 2005 administrator’s companion"
    3.5 Troushooting Sql Server ( Troubleshooting SQL Server: A Guide for the Accidental DBA )
    4. A material from SAP course "BC 490: ABAP Performance & Tuning"
    5. CD 262: Tune Your Custom ABAP Code.
    6. Performance Do’s and Don’ts – ABAP: http://service.sap.com/performance
    7. SAP performance optimization guide: http://www.amazon.com/SAP-Performance-Optimization-Guide-Edition/dp/1592293689
    8. Juergen best practices: http://scn.sap.com/docs/DOC-1006
    9. SAP DBA Cockpit and Microsoft SQL Server | SCN
    10. DBA Cockpit SQL scripts: http://blogs.msdn.com/b/saponsqlserver/archive/2007/06/05/sap-dbacockpit-and-some-related-sql-scripts-part-1.aspx
    11. Search "Enhancment Package/Solution Manager" from SAP TechEd

Maybe you are looking for