Required info on SQL Server Performance Issue Analysis and Troubleshoot way

Dear All,
I am going to prepare the simple documentation steps on SQL Server Performance Issue Analysis and troubleshoot method. I am struggling to make this documentation since we have different checklist (like network latency,disk latency, memory/processor pressure,SQL
query tuning etc) to validate once application performance issue reported from the customer.So, I am looking for the experts document or link sharing .
Your input will help for document preparation in better way.
Thanks in advance.

Hi,
Recommendations and Guidelines on configuring disk partitions for SQL Server
http://support.microsoft.com/kb/2023571
Disk and File Layout for SQL Server
https://blogs.technet.com/b/dataplatforminsider/archive/2012/12/19/disk-and-file-layout-for-sql-server.aspx
Microsoft SQL Server 2012 Performance Tuning: Implementing Physical Database Structure
http://www.packtpub.com/article/sql-server-2012-implementing-physical-database-strusture
Database Mirroring Best Practices and Performance Considerations
http://technet.microsoft.com/en-us/library/cc917681.aspx
Hope the information helps.
Tracy Cai
TechNet Community Support

Similar Messages

  • SQL Server Performance Issue in Memory

    Dear All
    Can you please help me out of this below issue.
    My Server having : Windows 2012 SD 64 bit
    SQL : SQL 2008 R2 64 bit SP1 
    Memory : 64 GB
    SQL Min Memory : 45 GB and Max memory : 55 GB so remaining 9 GB available
    but my sql server any time shows 94% memory utilization. i have checked below points
    Physical Memory_MB                      Physical Memory_GB                      Virtual Memory GB
    65536                                   64                                      8192
    Buffer Pool Usage at the Moment
    BPool_Committed_MB                      BPool_Commit_Tgt_MB                     BPool_Visible_MB
    56320.000000                            56320.000000                            56320.000000
    Total Memory used by SQL Server Buffer Pool as reported by Perfmon counters
    Mem_KB               Mem_MB                                  Mem_GB
    57671680             56320.000000                            55.000000000
    Memory needed as per current Workload for SQL Server instance
    Mem_KB               Mem_MB                                  Mem_GB
    57671680             56320.000000                            55.000000000
    Total amount of dynamic memory the server is using for maintaining connections
    Mem_KB               Mem_MB                                  Mem_GB
    912                  0.890625                                0.000869750
    Total amount of dynamic memory the server is using for locks
    Mem_KB               Mem_MB                                  Mem_GB
    40296                39.351562                               0.038429260
    Total amount of dynamic memory the server is using for the dynamic SQL cache
    Mem_KB               Mem_MB                                  Mem_GB
    2056                 2.007812                                0.001960754
    Total amount of dynamic memory the server is using for query optimization
    Mem_KB               Mem_MB                                  Mem_GB
    2880                 2.812500                                0.002746582
    Total amount of dynamic memory used for hash, sort and create index operations.
    Mem_KB               Mem_MB                                  Mem_GB
    0                    0.000000                                0.000000000
    Total Amount of memory consumed by cursors
    Mem_KB               Mem_MB                                  Mem_GB
    28464                27.796875                               0.027145385
    Number of pages in the buffer pool (includes database, free, and stolen).
    8KB_Pages            Pages_in_KB                             Pages_in_MB
    7208960              57671680.000000                         56320.000000000
    Number of Data pages in the buffer pool
    8KB_Pages            Pages_in_KB                             Pages_in_MB
    6710944              53687552.000000                         52429.250000000
    Number of Free pages in the buffer pool
    8KB_Pages            Pages_in_KB                             Pages_in_MB
    234598               1876784.000000                          1832.796875000
    Number of Reserved pages in the buffer pool
    8KB_Pages            Pages_in_KB                             Pages_in_MB
    0                    0.000000                                0.000000000
    Number of Stolen pages in the buffer pool
    8KB_Pages            Pages_in_KB                             Pages_in_MB
    263418               2107344.000000                          2057.953125000
    Number of Plan Cache pages in the buffer pool
    8KB_Pages            Pages_in_KB                             Pages_in_MB
    135772               1086176.000000                          1060.718750000
    Page Life Expectancy - Number of seconds a page will stay in the buffer pool without references
    Page Life in seconds PLE Status
    111450               PLE is Healthy
    Number of requests per second that had to wait for a free page
    Free list stalls/sec
    373
    Number of pages flushed to disk/sec by a checkpoint or other operation that require all dirty pages to be flushed
    Checkpoint pages/sec
    8052165
    Number of buffers written per second by the buffer manager"s lazy writer
    Lazy writes/sec
    1247
    Total number of processes waiting for a workspace memory grant
    Memory Grants Pending
    0
    Total number of processes that have successfully acquired a workspace memory grant
    Memory Grants Outstanding
    0
    My User asking how much sql transaction takes out off 55 GB , and each transaction how much takes, how to find sql healthy and sql needs how much memory. 
    Thanks
    Mohamed Udhuman

    Issue i mentioned here, Memory bottleneck is available or not , how to avoid sql buffer pool takes more memory means.
    Thanks
    Mohamed Udhuman
    Hello,
    Your output you posted does not makes sense or may be I am not able to understand it..If you want through analysis I need following from you
    1.
    select
    (physical_memory_in_use_kb/1024)Memory_usedby_Sqlserver_MB,
    (locked_page_allocations_kb/1024 )Locked_pages_used_Sqlserver_MB,
    (total_virtual_address_space_kb/1024 )Total_VAS_in_MB,
    process_physical_memory_low,
    process_virtual_memory_low
    from sys. dm_os_process_memory
    2 What is reason for keeping Max server memory and Min server mmory almost equal. 55 G is MAX and 45 G is min.
    3. Does SQL server account has locked pages in memory privilege ?
    4. Did you see any out of memory error ?
    5 Please post output of DBCC MEMORYSTATUS and SP_readerrorlog on skydrive and post location here.
    PS: SQL server utilizing memory is normal behavior ,what you posted does not exactly points to memory pressure and what seems to me cause here is poorly written queries running.
    Please mark this reply as the answer or vote as helpful, as appropriate, to make it useful for other readers
    My TechNet Wiki Articles

  • SQL SERVER 2008 R2 Analysis Services

    Hi 
    We have a SQL Server 2008 R2 Analysis Services and it was running fine but suddenly its not processing the cube. I have checked log the file msmdsrv.log and there its continuously logging the following error message.
    Message: The file '\\?\C:\Program Files\Microsoft SQL Server\MSAS10_50.MSSQLSERVER\OLAP\Data\TRCOLAP.0.db\Fact SL Financial Transaction.0.dim\466.SL Journal Type.kstore' could not be opened. Please check the file for permissions or see if other applications
    locked it. (Source: \\?\C:\Program Files\Microsoft SQL Server\MSAS10_50.MSSQLSERVER\OLAP\Log\msmdsrv.log, Type: 3, Category: 289, Event ID: 0xC1210023) 
    Would really appreciate help in this regard. It our production box
    Thanks
    inazakat

    Hi Inazakat,
    According to your description, your SQL Server Analysis Services database cannot be processed that can be processed without any problems before, right?
    Based on the message, file could not be opened. Please check the file for permissions or see if other applications locked it. It seems that the file is corrupt. This issue can be caused by that the file was deleted by antivirus. You can go to the corresponding
    folder and check if this file exist or not. If this file was deleted or corrupt, you can open the original project on BIDS, and redeploy it to your server. And then process this database.
    Regards,
    Charlie Liao
    TechNet Community Support

  • Is Distributed Transaction Coordinator services of the application role are required by SQL Server 2012 for clustering and support of SharePoint 2013.

    All I want to know is if Distributed Transaction Coordinator services of the application role are required by SQL Server 2012 for clustering and support of SharePoint 2013.
    I have been planning and deploying my companies first Windows Server 2012/SQL Server 2012 Always On cluster and Always On Availability Groups Multi-Subnet cluster and instances for SharePoint 2013, and I will be brutally honest, the documentation on either
    the MSDN and TechNet leave alot to be desired. Continually finding links in the documentation will take me from a Windows 2012 reference to a page talking about Windows Server 2008 or R2, The differences of which there are so many when it comes to configurations,
    settings, roles, services when working with SQL Server 2012. I have been confused, frustrated, screaming mad, with all the misdirection in this documentation.  The documentation takes me windows 2008 R2 which is different than 2012!
    Tired and trying to pick myself up off the floor!
    Greg
    Gman

    In general, DTC is not required for SQL 2012.  But, since you are asking specifically about SharePoint, it would be better to ask in a SharePoint forum.  They would be more likely to know those situations where FTC might be needed by SharePoint. 
    .:|:.:|:. tim

  • How to get sql server performance counters using query?

    Hai i want to see my sql server performance counters like, Full Scans/sec,  Buffer
    Cache Hit Ratio,  Database Transactions/sec, User
    Connections, Average Latch Wait Time (ms), Lock
    Waits/sec, Lock Timeouts/sec, Number
    of Deadlocks/sec, Total Server Memory, SQL
    Re-Compilations/sec, User Settable Query. If any one know how to get it by using query means, please help me.
    Thanks in advance

    Hello,
    Below is query created by Jonathan Kehayias for measuring Perfom counters using DMV sys.dm_os_performance_counter.
    You can download book from below link
    https://www.simple-talk.com/books/sql-books/troubleshooting-sql-server-a-guide-for-the-accidental-dba/
    DECLARE @CounterPrefix NVARCHAR(30)
    SET @CounterPrefix = CASE WHEN @@SERVICENAME = 'MSSQLSERVER'
    THEN 'SQLServer:'
    ELSE 'MSSQL$' + @@SERVICENAME + ':'
    END ;
    -- Capture the first counter set
    SELECT CAST(1 AS INT) AS collection_instance ,
    [OBJECT_NAME] ,
    counter_name ,
    instance_name ,
    cntr_value ,
    cntr_type ,
    CURRENT_TIMESTAMP AS collection_time
    INTO #perf_counters_init
    FROM sys.dm_os_performance_counters
    WHERE ( OBJECT_NAME = @CounterPrefix + 'Access Methods'
    AND counter_name = 'Full Scans/sec'
    OR ( OBJECT_NAME = @CounterPrefix + 'Access Methods'
    AND counter_name = 'Index Searches/sec'
    OR ( OBJECT_NAME = @CounterPrefix + 'Buffer Manager'
    AND counter_name = 'Lazy Writes/sec'
    OR ( OBJECT_NAME = @CounterPrefix + 'Buffer Manager'
    AND counter_name = 'Page life expectancy'
    OR ( OBJECT_NAME = @CounterPrefix + 'General Statistics'
    AND counter_name = 'Processes Blocked'
    OR ( OBJECT_NAME = @CounterPrefix + 'General Statistics'
    AND counter_name = 'User Connections'
    OR ( OBJECT_NAME = @CounterPrefix + 'Locks'
    AND counter_name = 'Lock Waits/sec'
    OR ( OBJECT_NAME = @CounterPrefix + 'Locks'
    AND counter_name = 'Lock Wait Time (ms)'
    OR ( OBJECT_NAME = @CounterPrefix + 'SQL Statistics'
    AND counter_name = 'SQL Re-Compilations/sec'
    OR ( OBJECT_NAME = @CounterPrefix + 'Memory Manager'
    AND counter_name = 'Memory Grants Pending'
    OR ( OBJECT_NAME = @CounterPrefix + 'SQL Statistics'
    AND counter_name = 'Batch Requests/sec'
    OR ( OBJECT_NAME = @CounterPrefix + 'SQL Statistics'
    AND counter_name = 'SQL Compilations/sec'
    -- Wait on Second between data collection
    WAITFOR DELAY '00:00:01'
    -- Capture the second counter set
    SELECT CAST(2 AS INT) AS collection_instance ,
    OBJECT_NAME ,
    counter_name ,
    instance_name ,
    cntr_value ,
    cntr_type ,
    CURRENT_TIMESTAMP AS collection_time
    INTO #perf_counters_second
    FROM sys.dm_os_performance_counters
    WHERE ( OBJECT_NAME = @CounterPrefix + 'Access Methods'
    AND counter_name = 'Full Scans/sec'
    OR ( OBJECT_NAME = @CounterPrefix + 'Access Methods'
    AND counter_name = 'Index Searches/sec'
    OR ( OBJECT_NAME = @CounterPrefix + 'Buffer Manager'
    AND counter_name = 'Lazy Writes/sec'
    OR ( OBJECT_NAME = @CounterPrefix + 'Buffer Manager'
    AND counter_name = 'Page life expectancy'
    OR ( OBJECT_NAME = @CounterPrefix + 'General Statistics'
    AND counter_name = 'Processes Blocked'
    OR ( OBJECT_NAME = @CounterPrefix + 'General Statistics'
    AND counter_name = 'User Connections'
    OR ( OBJECT_NAME = @CounterPrefix + 'Locks'
    AND counter_name = 'Lock Waits/sec'
    OR ( OBJECT_NAME = @CounterPrefix + 'Locks'
    AND counter_name = 'Lock Wait Time (ms)'
    OR ( OBJECT_NAME = @CounterPrefix + 'SQL Statistics'
    AND counter_name = 'SQL Re-Compilations/sec'
    OR ( OBJECT_NAME = @CounterPrefix + 'Memory Manager'
    AND counter_name = 'Memory Grants Pending'
    OR ( OBJECT_NAME = @CounterPrefix + 'SQL Statistics'
    AND counter_name = 'Batch Requests/sec'
    OR ( OBJECT_NAME = @CounterPrefix + 'SQL Statistics'
    AND counter_name = 'SQL Compilations/sec'
    -- Calculate the cumulative counter values
    SELECT i.OBJECT_NAME ,
    i.counter_name ,
    i.instance_name ,
    CASE WHEN i.cntr_type = 272696576
    THEN s.cntr_value - i.cntr_value
    WHEN i.cntr_type = 65792 THEN s.cntr_value
    END AS cntr_value
    FROM #perf_counters_init AS i
    JOIN #perf_counters_second AS s
    ON i.collection_instance + 1 = s.collection_instance
    AND i.OBJECT_NAME = s.OBJECT_NAME
    AND i.counter_name = s.counter_name
    AND i.instance_name = s.instance_name
    ORDER BY OBJECT_NAME
    -- Cleanup tables
    DROP TABLE #perf_counters_init
    DROP TABLE #perf_counters_second
    Please mark this reply as the answer or vote as helpful, as appropriate, to make it useful for other readers

  • SQL query performance issues.

    Hi All,
    I worked on the query a month ago and the fix worked for me in test intance but failed in production. Following is the URL for the previous thread.
    SQL query performance issues.
    Following is the tkprof file.
    CURSOR_ID:76  LENGTH:2383  ADDRESS:f6b40ab0  HASH_VALUE:2459471753  OPTIMIZER_GOAL:ALL_ROWS  USER_ID:443 (APPS)
    insert into cos_temp(
    TRX_DATE, DEPT, PRODUCT_LINE, PART_NUMBER,
    CUSTOMER_NUMBER, QUANTITY_SOLD, ORDER_NUMBER,
    INVOICE_NUMBER, EXT_SALES, EXT_COS,
    GROSS_PROFIT, ACCT_DATE,
    SHIPMENT_TYPE,
    FROM_ORGANIZATION_ID,
    FROM_ORGANIZATION_CODE)
    select a.trx_date,
    g.segment5 dept,
    g.segment4 prd,
    m.segment1 part,
    d.customer_number customer,
    b.quantity_invoiced units,
    --       substr(a.sales_order,1,6) order#,
    substr(ltrim(b.interface_line_attribute1),1,10) order#,
    a.trx_number invoice,
    (b.quantity_invoiced * b.unit_selling_price) sales,
    (b.quantity_invoiced * nvl(price.operand,0)) cos,
    (b.quantity_invoiced * b.unit_selling_price) -
    (b.quantity_invoiced * nvl(price.operand,0)) profit,
    to_char(to_date('2010/02/28 00:00:00','yyyy/mm/dd HH24:MI:SS'),'DD-MON-RR') acct_date,
    'DRP',
    l.ship_from_org_id,
    p.organization_code
    from   ra_customers d,
    gl_code_combinations g,
    mtl_system_items m,
    ra_cust_trx_line_gl_dist c,
    ra_customer_trx_lines b,
    ra_customer_trx_all a,
    apps.oe_order_lines l,
    apps.HR_ORGANIZATION_INFORMATION i,
    apps.MTL_INTERCOMPANY_PARAMETERS inter,
    apps.HZ_CUST_SITE_USES_ALL site,
    apps.qp_list_lines_v price,
    apps.mtl_parameters p
    where a.trx_date between to_date('2010/02/01 00:00:00','yyyy/mm/dd HH24:MI:SS')
    and to_date('2010/02/28 00:00:00','yyyy/mm/dd HH24:MI:SS')+0.9999
    and   a.batch_source_id = 1001     -- Sales order shipped other OU
    and   a.complete_flag = 'Y'
    and   a.customer_trx_id = b.customer_trx_id
    and   b.customer_trx_line_id = c.customer_trx_line_id
    and   a.sold_to_customer_id = d.customer_id
    and   b.inventory_item_id = m.inventory_item_id
    and   m.organization_id
         = decode(substr(g.segment4,1,2),'01',5004,'03',5004,
         '02',5003,'00',5001,5002)
    and   nvl(m.item_type,'0') <> '111'
    and   c.code_combination_id = g.code_combination_id+0
    and   l.line_id = b.interface_line_attribute6
    and   i.organization_id = l.ship_from_org_id
    and   p.organization_id = l.ship_from_org_id
    and   i.org_information3 <> '5108'
    and   inter.ship_organization_id = i.org_information3
    and   inter.sell_organization_id = '5108'
    and   inter.customer_site_id = site.site_use_id
    and   site.price_list_id = price.list_header_id
    and   product_attr_value = to_char(m.inventory_item_id)
    call        count       cpu   elapsed         disk        query      current         rows    misses
    Parse           1      0.47      0.56           11          197            0            0         1
    Execute         1   3733.40   3739.40        34893    519962154           11          188         0
    total           2   3733.87   3739.97        34904    519962351           11          188         1
    |         Rows Row Source Operation
    | ------------ ---------------------------------------------------
    |          188 HASH JOIN (cr=519962149 pr=34889 pw=0 time=2607.35)
    |          741 .TABLE ACCESS BY INDEX ROWID QP_PRICING_ATTRIBUTES (cr=519939426 pr=34889 pw=0 time=2457.32)
    |    254644500 ..NESTED LOOPS (cr=519939265 pr=34777 pw=0 time=3819.67)
    |    254643758 ...NESTED LOOPS (cr=8921833 pr=29939 pw=0 time=1274.41)
    |          741 ....NESTED LOOPS (cr=50042 pr=7230 pw=0 time=11.37)
    |          741 .....NESTED LOOPS (cr=48558 pr=7229 pw=0 time=11.35)
    |          741 ......NESTED LOOPS (cr=47815 pr=7223 pw=0 time=11.32)
    |         3237 .......NESTED LOOPS (cr=41339 pr=7223 pw=0 time=12.42)
    |         3237 ........NESTED LOOPS (cr=38100 pr=7223 pw=0 time=12.39)
    |         3237 .........NESTED LOOPS (cr=28296 pr=7139 pw=0 time=12.29)
    |         1027 ..........NESTED LOOPS (cr=17656 pr=4471 pw=0 time=3.81)
    |         1027 ...........NESTED LOOPS (cr=13537 pr=4404 pw=0 time=3.30)
    |          486 ............NESTED LOOPS (cr=10873 pr=4240 pw=0 time=0.04)
    |          486 .............NESTED LOOPS (cr=10385 pr=4240 pw=0 time=0.03)
    |          486 ..............TABLE ACCESS BY INDEX ROWID RA_CUSTOMER_TRX_ALL (cr=9411 pr=4240 pw=0 time=0.02)
    |        75253 ...............INDEX RANGE SCAN RA_CUSTOMER_TRX_N5 (cr=403 pr=285 pw=0 time=0.38)
    |          486 ..............TABLE ACCESS BY INDEX ROWID HZ_CUST_ACCOUNTS (cr=974 pr=0 pw=0 time=0.01)
    |          486 ...............INDEX UNIQUE SCAN HZ_CUST_ACCOUNTS_U1 (cr=488 pr=0 pw=0 time=0.01)
    |          486 .............INDEX UNIQUE SCAN HZ_PARTIES_U1 (cr=488 pr=0 pw=0 time=0.01)
    |         1027 ............TABLE ACCESS BY INDEX ROWID RA_CUSTOMER_TRX_LINES_ALL (cr=2664 pr=164 pw=0 time=1.95)
    |         2063 .............INDEX RANGE SCAN RA_CUSTOMER_TRX_LINES_N2 (cr=1474 pr=28 pw=0 time=0.22)
    |         1027 ...........TABLE ACCESS BY INDEX ROWID RA_CUST_TRX_LINE_GL_DIST_ALL (cr=4119 pr=67 pw=0 time=0.54)
    |         1027 ............INDEX RANGE SCAN RA_CUST_TRX_LINE_GL_DIST_N1 (cr=3092 pr=31 pw=0 time=0.20)
    |         3237 ..........TABLE ACCESS BY INDEX ROWID MTL_SYSTEM_ITEMS_B (cr=10640 pr=2668 pw=0 time=15.35)
    |         3237 ...........INDEX RANGE SCAN MTL_SYSTEM_ITEMS_B_U1 (cr=2062 pr=40 pw=0 time=0.33)
    |         3237 .........TABLE ACCESS BY INDEX ROWID OE_ORDER_LINES_ALL (cr=9804 pr=84 pw=0 time=0.77)
    |         3237 ..........INDEX UNIQUE SCAN OE_ORDER_LINES_U1 (cr=6476 pr=47 pw=0 time=0.43)
    |         3237 ........TABLE ACCESS BY INDEX ROWID MTL_PARAMETERS (cr=3239 pr=0 pw=0 time=0.04)
    |         3237 .........INDEX UNIQUE SCAN MTL_PARAMETERS_U1 (cr=2 pr=0 pw=0 time=0.01)
    |          741 .......TABLE ACCESS BY INDEX ROWID HR_ORGANIZATION_INFORMATION (cr=6476 pr=0 pw=0 time=0.10)
    |         6474 ........INDEX RANGE SCAN HR_ORGANIZATION_INFORMATIO_FK2 (cr=3239 pr=0 pw=0 time=0.03)Please help.
    Regards
    Ashish

    |    254644500 ..NESTED LOOPS (cr=519939265 pr=34777 pw=0 time=3819.67)
    |    254643758 ...NESTED LOOPS (cr=8921833 pr=29939 pw=0 time=1274.41)There is no way the optimizer should choose to process that many rows using nested loops.
    Either the statistics are not up to date, the data values are skewed or you have some optimizer parameter set to none default to force index access.
    Please post explain plan and optimizer* parameter settings.

  • SQL Server Connection Issue

    I've tried going through the steps to resolve the issue, but I am still coming up blank. The part that I am not understanding is the, "A non-recoverable error occurred during a database lookup." part.
    Is this a security problem? I can establish an ODBC connection to the server as well as connect and query through visual studio, however when trying to run it through one of our custom programs, it throws this error message. 
    A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider:
    TCP Provider, error: 0 - A non-recoverable error occurred during a database lookup.)

    There are many reasons of SQL server connectivity issue. Refer checklist to find out the real cause of connectivity issue.
    1. Check SQL services are running
    2. Check SQL Browser service is running
    3. Check remote connections are enabled
    4. Network connectivity between database & application servers by TRACERT command
    5. Check TCP/IP protocol enabled at SQL server
    6. Check talent connectivity – telnet <IP address> <port no on SQL server running>
    7. Check UDP port 1434 is open or not on SQL Server
    8. Check firewall is running or not Check
    9. If firewall running, SQL Server & UDP port must be added in exception in firewall
    10. Run SQL Discovery report on machine SQL server installed, to check you are using correct instance name to connect( default \named) -http://mssqlfun.com/2013/02/26/sql-server-discovery-report/
    http://mssqlfun.com/2012/09/28/check-list-for-sql-server-connectivity-issue/
    Regards,
    Rohit Garg
    (My Blog)
    This posting is provided with no warranties and confers no rights.
    Please remember to click Mark as Answer and Vote as Helpful on posts that help you. This can be beneficial to other community members reading the thread.

  • Sql server partition parent table and reference not partition child table

     
    Hi,
    I have two tables in SQL Server 2008 R2, Parent and Child Table.  
    Parent has date time, and it is partitioned monthly,  there is a Child table which just refer the Parent table using Foreign key relation.   
    is there any problem the non-partitioned child table referring to a partitioned parent table?
    Thanks,
    Areef

    The tables will need to be offline for the operation. "Offline" here, means that you wrap the entire operation in a transaction. Ideally, this transaction would:
    1) Drop the foreign key.
    2) Use ALTER TABLE SWITCH to drop the old data.
    3) Use ALTER PARTITION FUNCTION to drop the old empty partition.
    4) Use ALTER PARTITION FUNCTION to add a new empty partition.
    5) Reapply the foreign keys WITH CHECK.
    All but the last operation are metadata-only operation (provided that you do them right). To perform the last operation, SQL Server must scan the child tbale and verify that all keys are present in the parent table. This can take some time for larger tables.
    During the transaction, SQL Server holds Sch-M locks on the table, which means that are entirely inaccessible, even for queries running with NOLOCK.
    You avoid this the scan by applying the fkey constraint WITH NOCHECK, but this can have impact on query plans, as SQL Server will not consider the constraint as trusted.
    An alternative which should not be entirely dismissed is to use partitioned
    views instead. With partitioned views, the foreign keys are not an issue, because each partition is a pair of tables, with its own local fkey.
    As for the second question: it appears to be completely pointless to partition the parent, but not the child table. Or does the child table only have rows for a smaller set of the rows in the parent?
    Erland Sommarskog, SQL Server MVP, [email protected]

  • SQL Server 2005 High Availability and Disaster Recovery options

    Hi, We are are working on a High Availability & Disaster Recovery Planning solution for an application database which is on SQL Server 2005. What different options have we got to implement this for SQL Server 2005 and after we have everything setup how
    do we test the failover is working?
    Thanks in advance.........
    Ione

    DR : Disaster recovery is the best option for the business to minimize their data loss and downtime. The SQL server has a number of native options. But, everything is depends upon your recovery time objective RTO and recovery point objective RPO.
    1. Data center disaster
    Geo Clustering
    2. Server(Host)/Drive (Except shared drive) disaster
    Clustering
    3. Database/Drive disaster     
    Database mirroring
    Log shipping
    Replication
    Log shipping
    Log shipping is the process of automating the full database backup and transaction log on a production server and then automatically restores them on to the secondary (standby) server.
    Log shipping will work either Full or Bulk logged recovery model.
    You can also configure log shipping in the single SQL instance.
    The Stand by database can be either restoring or read only (standby).
    The manual fail over is required to bring the database online.
    Some data can be lost (15 minutes).
    Peer-to-Peer Transactional Replication
    Peer-to-peer transactional replication is designed for applications that might read or might modify the data in any database that participates in replication. Additionally, if any servers that host the databases are unavailable, you can modify the application
    to route traffic to the remaining servers. The remaining servers contain same copies of the data.
    Clustering
    Clustering is a combination of one or more servers it will automatically allow one physical server to take over the tasks of another physical server that has failed. Its not a real disaster recovery solution because if the shared drive unavailable we cannot
    bring the database to online.
    Clustering is best option it provides a minimum downtime (like 5 minutes) and data loss in case any data center (Geo) or server failure.
    Clustering needs extra hardware/server and it’s more expensive.
    Database mirroring
    Database mirroring introduced in 2005 onwards. Database Mirroring maintain an exact copy of a database on a different server. It has automatic fail over option and mainly helps to increase the database availability too.
    Database mirroring only works FULL recovery model.
    This needs two instances.
    Mirror database always in restoring state.
    http://msdn.microsoft.com/en-us/library/ms151196%28v=sql.90%29.aspx
    http://blogs.technet.com/b/wbaer/archive/2008/04/19/high-availability-and-disaster-recovery-with-microsoft-sql-server-2005-database-mirroring-and-microsoft-sql-server-2005-log-shipping-for-microsoft-sharepoint-products-and-technologies.aspx
    http://www.slideshare.net/rajib_kundu/disaster-recovery-in-sql-server
    HADR Considerations
    Need to Understand the business motivations and regulatory requirements that are driving the customer's HA/DR requirements. Understand how your customer categorizes the workload from an HA/DR perspective. There is likely to be an alignment between the needs
    and categorization.
    Check for both the recovery time objective (RTO) and the recovery point objective (RPO) for different workload categories, for both a failure within a data center (local high availability) and a total data center failure (disaster recovery). While RPO and
    RTO vary for different workloads because of business, cost, or technological considerations, customers may prefer a single technical solution for ease in operations. However, a single technical solution may require trade-offs that need to be discussed with
    customers so that their expectations are set appropriately.
    Check and understand if there is an organizational preference for a particular HA/DR technology. Customers may have a preference because of previous experiences, established operational procedures, or simply the desire for uniformity across databases from
    different vendors. Understand the motives behind a preference: A customers' preference for HA/DR may not be because of the functions and features of the HA/DR technology. For example, a customer may decide to adopt a third-party solution for DR to maintain
    a single operational procedure. For this reason, using HA/DR technology provided by a SAN vendor (such as EMC SRDF) is a popular approach.
    To design and adopt an HA/DR solution it is also important to understand the implications of applying maintenance to both hardware and software (including Windows security patching). Database mirroring is often adopted to minimize the service disruption
    to achieve this objective.
    HADR Options :
    Failover clustering for HA and database mirroring for DR.
    Synchronous database mirroring for HA/DR and log shipping for additional DR.
    Geo-cluster for HA/DR and log shipping for additional DR.
    Failover clustering for HA and storage area network (SAN)-based replication for DR.
    Peer-to-peer replication for HA and DR (and reporting).
    Backup & Restore ( DR)
    keep your server DB backups in network location ( DR)
    Always keep your sql server 2005 upto date, in case if you are not getting any official support from MS then you have to take care of any critical issues and more..
    Raju Rasagounder Sr MSSQL DBA

  • [Microsoft][SQL Server Native Client 11.0][SQL Server]The text, ntext, and image data types cannot be compared or sorted, except when using IS NULL or LIKE operator.  'Items' (OITM) (OITM)

    Dear Experts,
    i am getting the below error when i was giving * (Star) to view all the items in DB
    [Microsoft][SQL Server Native Client 11.0][SQL Server]The text, ntext, and image data types cannot be compared or sorted, except when using IS NULL or LIKE operator.  'Items' (OITM) (OITM)
    As i was searching individually it is working fine
    can any one help me how to find this..
    Regards,
    Meghanath.S

    Dear Nithi Anandham,
    i am not having any query while finding all the items in item master data i am giving find mode and in item code i was trying to type *(Star) and enter while typing enter the above issue i was facing..
    Regards,
    Meghanath

  • SQL Server Express 2008 R2 and Windows 8.1 (Standard)

    I recently re-engineered the backend of a legacy Access 2003 application because we knew that going forward we were going to loose the replication capability in Access. This is a small, departmental app, so the new SQL Server Express 2008 R2 backend is
    hosted on a robust Windows 7 system. I tested the implementation with both Windows XP and Windows 7 clients running the updated Access 2003 frontend and everything worked great.
    We are now in the midst of a company-wide upgrade to Windows 8.1 and I'm having issues. The legacy frontend works fine with Access 2013 (full version) when run locally on the Win7 machine, but I can't get any of the new Win 8.1 clients to connect to the
    SQL database using the Access 2013 Runtime module. I CAN create ODBC connections to SQL Server from the clients and they test successfully, so I think I have a valid SQL connection to the Win 7 box.
    To recap: old clients were WinXP Pro with Office 2003 Pro, new clients are Win 8.1 (non-Pro) with Access 2013 Runtime module.
    Any ideas?

    Hi ,
    Glad to hear that you have found the solution. Thank you for coming back and let us know the result:)
    Best Regards,
    Tracy
    Tracy Cai
    TechNet Community Support

  • Can i use sql server express 2008, 2012, and 2014 for commercial purpose?

    Good day,
    I saw that the sql server express 2005 can be used for commercial purpose without buying additional license
    https://social.msdn.microsoft.com/Forums/sqlserver/en-US/8df18025-fc2b-43c2-8476-532336ff09e3/sql-server-express-for-commercial-use?forum=sqlexpress
    the question is can I do the same for sql server express 2008,2012, and 2014?
    can I install and use sql server express 2008, 2012 and 2014 on an azure vm? specifically
    http://azure.microsoft.com/en-us/pricing/details/virtual-machines/
    A0 instance
    just an off topic question, is it required to pay to use sql server on virtual machines?
    why is there a different pricing here
    http://azure.microsoft.com/en-us/pricing/details/virtual-machines/#Sql

    Hello,
    Yes, you can use all versions SQL Server Express for commercial use. Please read more resources about it.
    https://social.msdn.microsoft.com/Forums/sqlserver/en-US/01dbc5c3-b5fe-42d4-9eb9-91683cf8285b/can-any-commercial-application-that-uses-sql-server-express-freely-redistribute-the-sql-server?forum=sqlexpress
    https://social.technet.microsoft.com/Forums/en-US/661ebf2e-ff2f-4dae-a8ae-e2179a764c09/sql-server-2012-express-in-commercial-product?forum=sqlexpress
    Hope this helps.
    Regards,
    Alberto Morillo
    SQLCoffee.com

  • SQL Server 2005 64 bit and Oracle 9

    Hi,
    I have a situation which involves SQL Server 2005 64 bit and Oracle 9 32 bit,
    I have a requirement that involves creating Stored Procedures from Oracle 9 which will call tables from SQL Server 2005 64 bit, with operations involving 'Select' 'Insert' 'Update' and 'Delete'.
    it works fins, except when attempting to search for an SQL Server 'varchar' value, wher no mapping is done
    though the Oracle sees the field as 'varchar2'
    can anyone please advice on this
    thanks
    Basel

    I think you're somehow not getting a resuklt because you're query doesn't return any data.
    Why the fiealdA=pat=parameterA construct? Wouldn't it just work if you changed it to fieldA=parameterA?
    Also, can you not just define parameterA as a varchar to make them match?
    What if you do "select * from (<your query without where>) a where a.fieldA = :parameterA"
    While not efficient, it would make the filtering occur in Oracle and maybe that will let you see the problem in native Oracle land and then reuse the solution in your orginal query. If that doesn't work, drop the where clause and inspect the data closly and hardcode a simple where without using PL*SQL or bind variables.

  • Known performance issue bugs and patches for R12.1.3

    Hi Team,
    We have upgraded oracle application from 12.1.1 to 12.1.3.
    I wanted to apply the known performance issue bugs and patches for R12.1.3.
    Please let me know for any details.
    Thanks,

    Are u currently facing any performance issues on 1213?
    Tuning All Layers Of E-Business Suite – Performance Topics
    http://www.oracle.com/technetwork/apps-tech/collab2011-tuning-ebusiness-421966.pdf
    • Start with Best Practices : (note: 1121043.1)
    • SQL Tuning
    – Trace files
    – SQLT output (note: 215187.1)
    – Trace Analyzer (note: 224270.1)
    – AWR Report (note: 748642.1)
    – AWR SQL Report (awrsqrpt.sql)
    – 11g SQL Monitoring
    – SQL Tuning Advisor
    • PL/SQL Tuning
    – Product logs
    – PL/SQL Profiler (note: 808005.1)
    • Reports Tracing
    – note: 111311.1
    • Database Tuning
    – AWR Report (note: 748642.1)
    – ADDM report (note: 250655.1)
    – Automated Session History (ASH) Report
    – LTOM output (note: 352363.1)
    • Forms Tuning
    • Forms Tracing (note: 373548.1)
    • FRD Log (note: 445166.1)
    – Generic note: 438652.1
    • Middletier Tuning
    – JVM Logs
    – JVM Sizing (note: 362851.1)
    – JDBC Tuning (note: 278868.1)
    • OS
    – OSWatcher (note: 301137.1)

  • SQL Server Processor/Core Licensing and Windows CALs

    I've scoured the internet for an answer to this question, so I'm assuming the scenario isn't as common as I think, or people are purposely looking the other way because they don't want to know the answer :)
    The application in question is pretty simple - An ASP.net web application using ASP.net forms auth (no end-user Windows Authentication).  Using Windows Server 2008 Web Edition, we've confirmed that no Windows CAL is required on the front-end web tier.
    So then on the back-end data tier (SQL Server) it also seems pretty straight forward.  As far as I can tell, the SQL Server licensing makes it pretty clear "...users who input data into, query, or view data through a web-based application... require
    a CAL".  So that makes it pretty obvious, you need a CAL or a per-processor/pre-core license of SQL Server.
    Here's where it gets tricky... What about the licensing requirements for the Windows Server that SQL Server is running on?  Do we need a
    WindowsCAL for each connection from the Web Tier to the SQL Server? Note that Windows CALs and SQL Server CALs are completely separate in terms if purchasing, and nothing says a SQL Server CAL is of a higher
    order than a Windows CAL (thereby covering both).
    It would seem ridiculous (IMHO) to allow unlimited connections to SQL, but then dump you back to the CAL model on Windows (since there is no "unlimited" option in Windows Server).  But licensing is a strange beast, and non-compliance is not
    something I'm interested in.
    Any insight with pointers to Microsoft documentation would be greatly appreciated!
    Thanks guys,

    For those of you who would like an answer on this without calling licensing support, here's the answer :)
    Windows Server 2012 does NOT have a CAL limitation for "public" web traffic.  I specifically asked about ASP.net Forms Authenticated users, and the licensing specialist said any website that uses anonymous authentication which then passes
    auth onto some other back-end process (e.g. ASP.net forms auth) you do not need a Windows CAL.  You DO need a Windows CAL if your application is somehow tied to services on the Windows box where the website user actually enters credentials which are authenticated
    against the local account store or domain controller.  So to me, that's a pretty simple answer - 
    anonymous auth = No CALs
    integrated auth = CAL required
    Ok, onto SQL Server... As quoted from my original post, SQL licensing makes it very clear that ANY connection to the database requires a CAL, even if it's multiplexed through IIS or some other middle-tier.  Bottom line? Simple answer here as well:
    public website with a SQL back-end = per-socket or core-licensing (since you can't count "CALs" on a public site)
    Finally, the most illusive question (for me anyway).  What about the copy of Windows running your SQL Server?  the answer here was  - No CALs required if it's purely a SQL Server connection.  Meaning, if all your Windows server is doing
    is running SQL Server and fielding query requests from your front-end IIS ASP.net app, you're do NOT need any Windows Server CALs.  You obviously do need SQL CALs or socket/core licenses, which I covered above.  You will however need Windows CALs
    on your SQL Server box for any Support specialists or Deployment folks who remote into the machine using TS or using UNC file shares and such to work with the server.
    Hopefully that helps someone else looking for a quick answer.  And as the moderator noted, if that doesn't make sense you should definitely call the licensing specialist.  They are very helpful and surprising quick to answer questions (without
    any sales pressure).
    Thanks for posting this, I am in the same boat. I will have a public facing web server and a backend SQL server. The web site requires all users to login so they can see the content. We use forms authentication as well (no Windows or Active Directory authentication).
    The application does all the authentication itself using the backend database (credentials are stored in a database table).
    I just called the licensing pre-sales number and spoke to a rep who said the web server would require CALs (or an External Connector in this case), because I am requiring people to login to view the content. He said it did not matter what the authentication
    method was. I clearly explained the web application handles all the authentication, but he still said we would need CALs in this case because users must authenticate to access the content. He likened it to a museum. If you need to buy a ticket to get in to
    see the content (in this case login to the web site), you need CALs he said.
    He also said I would need Windows Server CALs/EC for the Windows server that hosts the database. I will be using SQL Core licensing, so no additional SQL CALs will be needed.
    Just thought I would share what I learned.
    Sorry to dredge up an old thread, but I have been doing a lot of reading on CALs lately in anticipation of launching a public website.  Reading the license agreement, I don't think you need CALs on the front end Windows Server 2012 just because people
    are authenticating.  The Windows Server 2012 license agreement makes no mention of this that I can find.  It only says you need CALs for employees or your affiliates' employees.  A non-employee visitor does not fall under the definition an affiliate.
    The SQL Server licensing is tricky, and not written for public website access.  Is every user with an account to your online store need a CAL?  The only other option is SQL Server Enterprise licensed by CPU cores.

Maybe you are looking for

  • HT2731 How do I start a new iTunes ID for my daughter?  She is under 10 with a new iPod.

    Can I use my account?  Or how do I sign her up since she is not old enough?

  • Problem with wifi

    Since I got internet I was given a wi-fi modem since that some of my online games like hay day some working I had use someone else wi-fi to play it what is the cause of that ?

  • Question on Upgrading to JDeveloper 10.1.3.5

    Hi All, We have application running on ADF 10.1.3.3 and OAS 10.1.3.3. Reading on the bug fix of release 10.1.3.5, I am thinking of upgrading to JDeveloper 10.1.3.5. The question is : 1) Is upgrading the applications & projects from jDev 10.1.3.3 to 1

  • NI scope 5911

    Hello Guys,         Am using PCI 5911 scope card, When i'm putting this card in the computer and doing self test at first it is getting pass. But after 10 or 15 min the card getting more heat and the self test getting fail.         I cant trouble sho

  • Demo problem

    Not sure if I'm in the right forum with this but this is an unusual problem. If I download a demo for a try out as soon as I open it up I get the message "You have been using this demo for 385 days". This has happened to the only 2 demos I have downl