Quantcast
Channel: SQL Server Database Engine forum
Viewing all 12963 articles
Browse latest View live

sql server Virtual Log files

$
0
0

hi,

my Log file size is 50 gb, in that 50 gb log file how many "Virtual log " files are created in internally.


SQL 2012 System_Health extended events parser?

$
0
0

Hi experts,

  I am studying system_health now. I am trying to find out a best system_health extended event parser.

The first one (http://blogs.technet.com/b/sqlpfeil/archive/2013/03/25/sql-2012-system-health-fast-analysis.aspx) is very easy to use but it does not cover all events.

The second one is amazing but it causes many errors when I use. (http://blogs.msdn.com/b/sql_pfe_blog/archive/2013/04/15/sql-2012-system-health-reporting-dashboard-visualizing-sp-server-diagnostics-results.aspx )

I encounter many errors posted in the last comment by me, dennis-lee.

So could you please recommend a best system_health parser or could you tell me how to troubleshoot those errors, thanks.

------

Dennis-lee 11-25-2013 10:15 AM 
#

I found several reports caused errors. Please help.

ConnectivityRingBuffer:

An error has occurred during report processing. (rsProcessingAborted)

Cannot create a connection to data source 'InitialDataSource'. (rsErrorOpeningConnection)

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: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)

DashBoard:

An error has occurred during report processing. (rsProcessingAborted)

Query execution failed for dataset 'CPU'. (rsErrorExecutingCommand)

Invalid column name 'System_idle'.

Query_Processing:

An error has occurred during report processing. (rsProcessingAborted)

Query execution failed for dataset 'QueryProcessing'. (rsErrorExecutingCommand)

Invalid column name 'Timestamp'.

Resource:

An error has occurred during report processing. (rsProcessingAborted)

Query execution failed for dataset 'Memory'. (rsErrorExecutingCommand)

Invalid column name 'state'. Invalid column name 'LastNotification'. Invalid column name 'Target_committed_kb'. Invalid column name 'Pages_free_kb'. Invalid column name 'Pages_in_use_kb'. Invalid column name 'Timestamp'.

CPU usage is increased after installing CU 8 for SQL Server 2008 R2 SP2

$
0
0

Hi,

CPU usage is increased by 15 -20 % after installing CU 8 for SQL Server 2008 R2 SP2.

Does anybody experienced this? are there any known issues with CU8?

Reg : SQL Server unexpected shutdown

$
0
0

Hi All

Greetings for the Day !!

Today morning suddenly one of my client server got restarted and due to which the SQL server got stopped, while starting we are  getting error as

"This error occurs when there is not enough space on the device to create the tempdb database."-- 1841 

Even though my drive is having some 140 GB of space and we have started the SQL forcifully, it started and the TEMP DB path is showing some other drive and that is not there in server from starting.

After logging to management studio after a force start, whenever we are trying to execute any query it is  throwing an error

 "Login failed for user ''hostname\administrator''. Reason: Server is in single user mode. Only one administrator can connect at this time. (Microsoft SQL Server, Error: 18461)"....

** Waiting for your  valuable reply and it is highly appreciated as we are in urgency .

Thanks in advance..


============ Regards Mani

Changing the current value of the Sequence

$
0
0

Hi,

How do i change the Current Value of the Sequences without changing the Restart Sequence?

Right now I have this SEQTitle sequence:

------

Restart Sequence: 1

Current Value: 10

------

I want the Restart Sequence to still start at 1 but to alter the Current Value to 100, such that the next sequence to be used is 101.

Thanks for your help.


cherriesh

Sql Server Configuration is Not Displayed!!

$
0
0

hi all,

 i am using SQL server 2008. i have sysadmin permission in server level, also i have administrator privilege from the windows security.

i am getting the below error when i am trying to see SQL server services in sql server configuration manager.

 

The server threw an exception. [0x80010105]     

can any one please suggests what could be the reason.

Thanks


Tarni

SQL Server running slow

$
0
0

Greetings,

   In my environment we have a linked server between two servers in two different domain, one machine is a physical and another is logical, the application runs MERGE statement between the servers using linked server. Recent days the merge statement started to slow down to several hours. I tried to rebuild indexes, collected statistics on table table but not able to find anything. Let me know how to find the bottleneck.

With regards,

Gopinath.


With regards, Gopinath.

Index Fragmentation

$
0
0

Hello,

Quick question, I have just run DBCC SHOWCONTIG against an index I created against the Person.Person table in the AdventureWorks database and the results are below. Can someone let me know how there can be no logical fragmentation but 12.5% (one extent) extent fragmentation?

Any help or advice would be most appreciated.

Andrew

DBCC SHOWCONTIG scanning 'Person' table...

Table: 'Person' (1765581328); index ID: 5, database ID: 5

LEAF level scan performed.

- Pages Scanned................................: 64

- Extents Scanned..............................: 8

- Extent Switches..............................: 7

- Avg. Pages per Extent........................: 8.0

- Scan Density [Best Count:Actual Count].......: 100.00% [8:8]

- Logical Scan Fragmentation ..................: 0.00%

- Extent Scan Fragmentation ...................: 12.50%

- Avg. Bytes Free per Page.....................: 42.4

- Avg. Page Density (full).....................: 99.48%


sql server Network latency monitoring

$
0
0

when i check wait stats i see most of the waits are async_network_io so how do i check what is the response time from application end for each request.



SQL DUMP

$
0
0

HI~~ I am using a new installed SQL 2012 Server, and recently i find many SQL DUMP in sp_readerrorlog.

is there anything that I can turn that off? is that harm to the system ?

Filegroups or partitioning big table with limit fisical drives

$
0
0

Hi all,
I'm writing from Italy, sorry for my English...I try to do my best, anyway I got a little question about performance and concurrency with bigs tables.

My SQLServer have 4 CPU and 3 fisical drive over C:
- "E" stand for data file (.mdf)
- "F" stand for log file (.ldf)
- "G" stand for back-up files (.bak)

Now with got problems of lock on some big table used from customer care...have millions record.
Lock when comes are always 3-4 second and in many situation user experience, internal user, is bad 'cause there isslowdowns.

Now we have in plan to move this "X" table on partition schema or using filegroups.
I've reads documentation about conceptual of two possible implementations.

First of all is best have 2-3 new fisical disk, ok it's clear, and partitioning is more indicated for ETLapproach.

Filegroups are more simple to managment but the core of all is ndf files...best over disk.

For closing the question is:
Having no disk in addition a partition function can be a best solution for lock problems intheoretical line?
Havingnew discsI would beaddressed to use filegroup mixing data e index storing.

Thanks inadvance for the answers, ALEN


How to restore rows deleted by mistake?

$
0
0

I'm developing an app that runs against a SQL Server Express 2008 database. As I was testing something, I deleted some rows by mistake. There does not seem to be a backup. I tried Task->Restore->Database but no backups are listed. I thought maybe I can roll back the transaction, but Task->Restore->Transaction Log is disabled. Change tracking is enabled on the database, but not on the table I need. 

At that point I've pretty much given up hope that I'll be able to get that data back, but thought to ask if there is some other way to roll back this unfortunate action???

The app is using strongly typed dataset and all transactions are committed to the database immidiately (it's running localy for the time being). I have not ran anything since the accident occured as to not overwrite any data left in memory.

Any help is greatly appreciated. 

Always On Availability Question mark?

$
0
0

Dear Friends,

In my production environment I have two database Servers know as SQL-DB1 (prod) and SQL-DB2 (Stand by server). I have made a cluster between two and SQL-Db1 is my primary database server. Now I used Always on availability feature on both servers and databases were synchronized.

Today I am encountering an issue. There is a small question mark icon coming on the SQL-DB1 which is shown by SQL-DB2 always on availability properties. Moreover it is also not showing that it is a primary database. Why this is happening. Secondly I am encountering a performance issue over SQL-DB2. It is not responding quickly when ever i log on to database through Management studio.

Please have a look to the snapshot


Azwar

Better understanding dead lock behaviour

$
0
0

Hello,

I'm trying to better understandt the internals of deadlocks so I did the following

CREATE TABLE [dbo].[teste](
[c1] [char](50) NOT NULL PRIMARY KEY,
[c2] [bigint] NOT NULL,
[c3] [char](7500) NOT NULL
) ON [PRIMARY]

Then I filled it with some pseudo random data, filling and the rows with 1,2,3,4, etc up to 15.

Then I create two windows to run two "almost simultaneous" transactions on two windows with the text bellow, expecting to get some deadlocks.

BEGIN TRAN
UPDATE teste SET c2=c2 WHERE c1=5
WAITFOR DELAY '00:00:05'
UPDATE teste SET c2=c2 WHERE c1=10
WAITFOR DELAY '00:00:05'
COMMIT

BEGIN TRAN
UPDATE teste SET c2=c2 WHERE c1=10
WAITFOR DELAY '00:00:05'
UPDATE teste SET c2=c2 WHERE c1=5
WAITFOR DELAY '00:00:05'
COMMIT

Now here comes the weird part: If I start with the first window (first query) and "immediately" run the second (second query) I always get a dead lock as expected, but if I start with the second window (second query) and  "immediately" run the first (first query), both transactions run fine and I don't get a dead lock.

I kept looking at the sys.dm_tran_locks but I haven't yet understood why the behaviour is different...

regards,

rdb

Bulk insert internals

$
0
0

Hello everybody,

I'm looking for a good description of the difference between bulk and normal inserts. Sources I've found such as Data Loading Performance Guide focus too much on other aspects of bulk operations (minimal vs. full logged, different methods to start the bulk operation etc.). That's not quite what I'm looking for. I would appreciate a short list of steps which are done differently in (full logged) bulk insert compared to a normal one (operating on pages rather than on individual rows? What are the differences in locking?).

Thanks in advance.


Find process consuming high memory

$
0
0

Hi,

The memory usage by SQL server is around 11GB in our server. I would want to see which process are causing this problem? Is there any simple and straight forward way to find out the processes?

Thanks,

Preetha

How to get further diagnostics from SQL Server for intermittent "Could not continue scan with NOLOCK due to data movement" errors

$
0
0

Hi,

I am trying to diagnose and resolve an intermittent problem on a remote customer's system.  The reported problem is being unable to logon to the application that I support until they restart the system.

The logs from the application show a database call failing that is used as part of the application logon process.  The error message from SQL Server is "Could not continue scan with NOLOCK due to data movement. [80040e14]".

The customer finds that it is not enough to just restart the application services.  In order to resolve the issue they have been resorting to restarting the whole server, which includes restarting SQL Server.  After a restart, the software works as expected for a few days before the problem re-occurs.

I've checked the code (and searched the entire code base), and cannot find any use of the query hint "NOLOCK", and there is also no signs of "SET ISOLATION LEVEL READ UNCOMMITTED".

The customer has run DBCC CHECKDB on the databases (including the tempdb), and has not found any issues.  They were originally using SQL Server 2008 R2 with no service pack.  They installed Service Pack 2 for SQL Server 2008 R2, but have experienced one further instance of this problem.

I have inspected the SQL Error logs from the site, and have not seen anything out of the ordinary in there.  I simply see start up messages, backups of logs being taken, and nightly "DBCC CHECKDB"'s on the various databases.

The same software has been by other customers without having this issue, although on other customer's sites the database is locked down and access to the database is restricted.

Any thoughts of what else I can check?  Is there some additional logging or diagnostic information that I could get from SQL Server as to what may be triggering the problem to occur?  I looked for a trace flag that might be helpful, but didn't find one that appeared relevant.

I'm currently asking them to drop and recreate the stored procedures, just to make sure that the code on site is the same as what I am looking at.  However, this is just something to try, since I have no reason to think that the stored procedures would have been changed in any way.

Thanks.

Geoff.

Deadlock in 2 different table on different update statement

$
0
0

Read committed Snapshot enabled in DB level. 

SQL SERVER 2008 r2 sp2 64bit 

I need to find a solution to resolve this  . Previously i added a non-cluster index to resolve some of the deadlock problem cause by the page lock . But for these one, i try but the deadlock still re-occur .

i have the deadlock graph capture as below:

<deadlock-list>
 <deadlock victim="process4821dc8">
  <process-list>
   <process id="process4821dc8" taskpriority="0" logused="856" waitresource="KEY: 5:72057594043760640 (300adbd885f3)" waittime="36855" ownerId="93184769" transactionname="user_transaction" lasttranstarted="2013-11-26T20:23:24.017" XDES="0xdf5333c0" lockMode="U" schedulerid="1" kpid="10920" status="suspended" spid="100" sbid="0" ecid="0" priority="0" trancount="2" lastbatchstarted="2013-11-26T20:23:24.060" lastbatchcompleted="2013-11-26T20:23:24.053" clientapp=".Net SqlClient Data Provider" hostname="server123" hostpid="8716" loginname="ABCtestuser" isolationlevel="read committed (2)" xactid="93184769" currentdb="5" lockTimeout="4294967295" clientoption1="671088672" clientoption2="128056">
    <executionStack>
     <frame procname="adhoc" line="1" stmtstart="2360" sqlhandle="0x0200000059172f07eebcd1886d749ed22561849457261697">
UPDATE [ABC_itemheader] SET [itm_BagNo] = @p1, [itm_CurrentStageID] = @p2, [itm_LastUpdatedDate] = @p3, [itm_TimeStamp] = @p4, [itm_Baglevel] = @p5, [itm_Remarks] = @p6 WHERE (([itm_AutoID] = @p7) AND ([itm_ItmType] = @p8) AND ([itm_Tracking_No] = @p9) AND ([itm_OrderDate] = @p10) AND ([itm_PickUpDate] = @p11) AND ([itm_OriginBranchID] = @p12) AND ([itm_OriginHubID] = @p13) AND ([itm_DestinationHubID] = @p14) AND ([itm_DestinationBranchID] = @p15) AND ((@p16 = 1 AND [itm_NextDestination] IS NULL) OR ([itm_NextDestination] = @p17)) AND ([itm_CustomerID] = @p18) AND ([itm_CustomerAccountNo] = @p19) AND ((@p20 = 1 AND [itm_ShipmentTypeID] IS NULL) OR ([itm_ShipmentTypeID] = @p21)) AND ((@p22 = 1 AND [itm_BagNo] IS NULL) OR ([itm_BagNo] = @p23)) AND ([itm_Quantity] = @p24) AND ((@p25 = 1 AND [itm_TotalWt] IS NULL) OR ([itm_TotalWt] = @p26)) AND ([itm_initialQty] = @p27) AND ((@p28 = 1 AND [itm_initialWt] IS NULL) OR ([itm_initialWt] = @p29)) AND ((@p30 = 1 AND [itm_L] IS NULL) OR ([itm_L] = @p31)) AND ((@p32 = 1    </frame>
     <frame procname="unknown" line="1" sqlhandle="0x000000000000000000000000000000000000000000000000">
unknown     </frame>
    </executionStack>
    <inputbuf>
(@p1 varchar(8000),@p2 varchar(3),@p3 datetime,@p4 int,@p5 int,@p6 nvarchar(4000),@p7 int,@p8 varchar(1),@p9 varchar(11),@p10 datetime,@p11 datetime,@p12 varchar(7),@p13 varchar(7),@p14 varchar(7),@p15 varchar(7),@p16 int,@p17 varchar(7),@p18 varchar(7),@p19 varchar(5),@p20 int,@p21 varchar(7),@p22 int,@p23 varchar(17),@p24 int,@p25 int,@p26 decimal(10,5),@p27 int,@p28 int,@p29 decimal(10,5),@p30 int,@p31 decimal(7,2),@p32 int,@p33 decimal(7,2),@p34 int,@p35 decimal(7,2),@p36 int,@p37 varchar(8000),@p38 int,@p39 varchar(8000),@p40 int,@p41 nvarchar(1),@p42 int,@p43 nvarchar(4000),@p44 int,@p45 nvarchar(7),@p46 int,@p47 nvarchar(10),@p48 int,@p49 nvarchar(84),@p50 int,@p51 nvarchar(6),@p52 int,@p53 nvarchar(6),@p54 int,@p55 varchar(8000),@p56 int,@p57 datetime,@p58 int,@p59 bit,@p60 int,@p61 bit,@p62 varchar(3),@p63 varchar(16),@p64 datetime,@p65 bit,@p66 int,@p67 varchar(15),@p68 int,@p69 datetime,@p70 int,@p71 int,@p72 nvarchar(4000),@p73 int,@p74 int,@p75 int,@p76 char(1),@p77 int,@p78 decimal(18,3),@p79 i   </inputbuf>
   </process>
   <process id="process4dcf708" taskpriority="0" logused="48204" waitresource="KEY: 5:72057594044350464 (300adbd885f3)" waittime="1503" ownerId="93180162" transactionname="user_transaction" lasttranstarted="2013-11-26T20:23:06.313" XDES="0x1bd1f33c0" lockMode="U" schedulerid="4" kpid="10468" status="suspended" spid="116" sbid="0" ecid="0" priority="0" trancount="2" lastbatchstarted="2013-11-26T20:23:59.420" lastbatchcompleted="2013-11-26T20:23:59.407" clientapp=".Net SqlClient Data Provider" hostname="server123" hostpid="8716" loginname="ABCtestuser" isolationlevel="read committed (2)" xactid="93180162" currentdb="5" lockTimeout="4294967295" clientoption1="671088672" clientoption2="128056">
    <executionStack>
     <frame procname="adhoc" line="1" stmtstart="420" sqlhandle="0x020000005d09b41e3e3a6472599e8304fd7446b3c3d9ae0a">
UPDATE [ABC_PreAlert] SET [prt_Statuscode] = @p1 WHERE (([prt_AutoID] = @p2) AND ([prt_TrackingNo] = @p3) AND ([prt_originbranchID] = @p4) AND ([prt_OriginHubID] = @p5) AND ([prt_DestinationHubID] = @p6) AND ([prt_DestinationBranchId] = @p7) AND ([prt_Statuscode] = @p8) AND ((@p9 = 1 AND [prt_CurrentLocation] IS NULL) OR ([prt_CurrentLocation] = @p10)) AND ((@p11 = 1 AND [prt_NextLocation] IS NULL) OR ([prt_NextLocation] = @p12)) AND ((@p13 = 1 AND [prt_BagNumber] IS NULL) OR ([prt_BagNumber] = @p14)) AND ((@p15 = 1 AND [prt_Baglevel] IS NULL) OR ([prt_Baglevel] = @p16)))     </frame>
     <frame procname="unknown" line="1" sqlhandle="0x000000000000000000000000000000000000000000000000">
unknown     </frame>
    </executionStack>
    <inputbuf>
(@p1 varchar(3),@p2 int,@p3 varchar(11),@p4 varchar(7),@p5 varchar(7),@p6 varchar(7),@p7 varchar(7),@p8 varchar(3),@p9 int,@p10 varchar(7),@p11 int,@p12 varchar(7),@p13 int,@p14 varchar(8000),@p15 int,@p16 int)UPDATE [ABC_PreAlert] SET [prt_Statuscode] = @p1 WHERE (([prt_AutoID] = @p2) AND ([prt_TrackingNo] = @p3) AND ([prt_originbranchID] = @p4) AND ([prt_OriginHubID] = @p5) AND ([prt_DestinationHubID] = @p6) AND ([prt_DestinationBranchId] = @p7) AND ([prt_Statuscode] = @p8) AND ((@p9 = 1 AND [prt_CurrentLocation] IS NULL) OR ([prt_CurrentLocation] = @p10)) AND ((@p11 = 1 AND [prt_NextLocation] IS NULL) OR ([prt_NextLocation] = @p12)) AND ((@p13 = 1 AND [prt_BagNumber] IS NULL) OR ([prt_BagNumber] = @p14)) AND ((@p15 = 1 AND [prt_Baglevel] IS NULL) OR ([prt_Baglevel] = @p16)))    </inputbuf>
   </process>
  </process-list>
  <resource-list>
   <keylock hobtid="72057594043760640" dbid="5" objectname="ABCtestLIVE.dbo.ABC_ItemHeader" indexname="PK_ABC_itemheader" id="lockcaa70480" mode="X" associatedObjectId="72057594043760640">
    <owner-list>
     <owner id="process4dcf708" mode="X"/>
    </owner-list>
    <waiter-list>
     <waiter id="process4821dc8" mode="U" requestType="wait"/>
    </waiter-list>
   </keylock>
   <keylock hobtid="72057594044350464" dbid="5" objectname="ABCtestLIVE.dbo.ABC_PreAlert" indexname="PK_ABC_PreAlert" id="lock8fba2e80" mode="X" associatedObjectId="72057594044350464">
    <owner-list>
     <owner id="process4821dc8" mode="X"/>
    </owner-list>
    <waiter-list>
     <waiter id="process4dcf708" mode="U" requestType="wait"/>
    </waiter-list>
   </keylock>
  </resource-list>
 </deadlock>
</deadlock-list>

One

$
0
0

Here is error message:

Date                     11/24/2013 4:00:02 AM

Step ID                2

A transport-level error has occurred when sending the request to the server

$
0
0

Hi

when connecting from my local machine to a remote sql server i sometimes get this message when trying to execute a query:

"A transport-level error has occurred when sending the request to the server. (provider: TCP Provider, error: 0 - An existing connection was forcibly closed by the remote host.)"

what does it mean? and what can cause this to happen so frequently?

Viewing all 12963 articles
Browse latest View live