Quantcast
Channel: SQL Server Database Engine Forum
Viewing all 15872 articles
Browse latest View live

ASYNC Network IO

$
0
0

Hi,

Yesterday I ran into a problem with a client, 
They complain about system performance issues especially during peak hours. 
Querying the sys.dm_exec_requests during those peak hours gives me back some 50 requests currently running on the server all with the status Suspended with wait type: async network io. 
We did a test and when we run a report from the application, when the application gets the full results  the request goes to suspended and now any request in this situation still holds the memory received and any new request are suffering from it. 

The application called Magic xpa Platform, I spoke with their advisor to Magic He said that he knows the problem but he dont have access to the application code.

Anyone know the problem? Has a solution?
Or maybe a different idea of the problem?


Unable to remove TempDB files SQL 2012

$
0
0

Hi Experts,

We have a problem with removing the extra created TempDB files on de SQL 2012 server. We tried several things:

  • Restart services;
  • Rename *.ndb files

We use the following query in the SQL management studio:

USE tempdb;
GO
DBCC SHRINKFILE('tempdev4', EMPTYFILE)
GO
USE master;
GO
ALTER DATABASE tempdb
REMOVE FILE tempdev4;

The error returned is:

DBCC SHRINKFILE: Page 5:40 could not be moved because it is a work table page.

Msg 2555, Level 16, State 1, Line 1

Cannot move all contents of file "tempdev4" to other places to complete the emptyfile operation.

DBCC execution completed. If DBCC printed error messages, contact your system administrator.

Msg 5042, Level 16, State 1, Line 1

The file 'tempdev4' cannot be removed because it is not empty.

It looks like the TempDB is still in use. If the services are stopped and the query is fired right after starting we receive the same error. Any suggestions are welcome.

Regards,

Restore Point to Time

$
0
0

Hello,

I took full backup on 06-April-2014 18:00 and transaction log at 06-April-2014 17:00 ?

I want to restore and recover it to 06-April-2014 17:00.

Can you tell me how to do it ?

Regards,

Pitou

SQL Server 2008 R2 { An Error occured when attaching database(s) }

$
0
0

Hello Guys!

I just installed SQL Server 2008 R2 a couple of days ago, on the first day use i can attach database(.mdf) with out any problem.

on the day 2, i keep getting this error:

http://img515.imageshack.us/img515/14/1212i.png

 

TITLE: Microsoft SQL Server Management Studio
------------------------------

An error occurred when attaching the database(s).  Click the hyperlink in the Message column for details.

------------------------------
BUTTONS:

OK
------------------------------

after clicking the Hyperlink this window open:

http://img34.imageshack.us/img34/8766/hyperg.png

TITLE: Microsoft SQL Server Management Studio
------------------------------

Attach database failed for Server 'STARGAZER-PC\SQLSTARMAX'.  (Microsoft.SqlServer.Smo)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=10.50.1600.1+((KJ_RTM).100402-1539+)&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Attach+database+Server&LinkId=20476

------------------------------
ADDITIONAL INFORMATION:

An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)

------------------------------

Unable to open the physical file "E:\New folder\DataBase.MDF". Operating system error 5: "5(Access is denied.)". (Microsoft SQL Server, Error: 5120)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=10.50.1600&EvtSrc=MSSQLServer&EvtID=5120&LinkId=20476

------------------------------
BUTTONS:

OK
------------------------------

 

in that day i reinstall SQL Server 2008 R2, because I'm so confused. after that i try to attach i still got the same error, what i did is i share the folder where the database is.

i open SSMS and try to attach and i attached without any error...

i think this is the 4rth day, untill now everytime i want to attach a database i got this error, and even i try to share the folder where the database is i still got that error.

 

any advice guys?

 

Thanks a lot

 

 

jhules


if you want to be happy, find something you love to do and do it for free, then find someone to to you for it.

Any advantage for setting database offline regarding server performance?

$
0
0
Any advantage for setting database offline regarding server performance?
I have number of databases on my server which are not in use.So just thinking if there is any performance gain if i set them offline or not

Kamran Shahid Application Developer (MCP,MCAD,MCSD.NET,MCTS,MCPD.net[web])

How to automate Execution SQL Server Jobs scheduling

$
0
0

Hi ,

I have a scenario where I have pull the data from different places at different times. some times the timing of these may change. But I don't want to go to SQL Agent and change the schedule for each of these SSIS Package.

Is there any way so that we can pick Scheduling timing from a table and update SQL Agent's Schedules?

Please help me.


Sanjay

How contacting the technical support for SQL server forums

$
0
0

Hi,

I need to contact the technical support for SQL Server forums to communicate an issue.

Any helps to me, please? Thanks

Can i shrink an database file if it has huge free space ?

$
0
0

Hi,

I have two database one is SharePoint Config file DB[85 GB] & other is SharePoint Application Crawl DB[30 GB] both database have a huge free space.

SharePoint Config Free Space is -->25GB

SharePoint App Crawl DB is -->14 GB

Can anyone please recommend , is it fine to shrink the Database file as it will give me huge amount of space which i require right now!!

And also please suggest in future how can i control the size of the above 2 database??

Thanks in Advance.

Regards,

Purvish Shah



Timeout occurred while waiting for latch: class 'LOG_MANAGER'

$
0
0

Dear Experts,

recently, we observed that the SQL Server was not responding,and so the application (SCOM 2007 R2) stoped working. Upon investigation, I found the following errors( may be aroung 100s) were logged in the SQL error log.

Timeout occurred while waiting for latch: class 'LOG_MANAGER', id 00000000051E09F8, type 4, Task 0x00000000CCAA9288 : 0, waittime 300, flags 0x1a, owning task 0x000000011554FB88. Continuing to wait.

Timeout occurred while waiting for latch: class 'LOG_MANAGER', id 00000000051E09F8, type 4, Task 0x0000000000DA3DC8 : 0, waittime 300, flags 0x1a, owning task 0x000000011554FB88. Continuing to wait.

Timeout occurred while waiting for latch: class 'LOG_MANAGER', id 00000000051E09F8, type 4, Task 0x00000000D0C3FDC8 : 0, waittime 300, flags 0x1a, owning task 0x000000011554FB88. Continuing to wait.

I could not even open the event viewer or services console or the SQL Management studio at that time. All are crashing or not responding. So the only option left was a server reboot. even a remote reboot did not help. I have to force shutdown the server at the Datacenter. After that, all things became normal. After that, as I checked the SQL error logs, I found these errors during that time range. There is no other error in the application or system log of the system. So I am suspecting that, this SQL server error was the culprit, so need to understand what these error are, why they occur and how to get rid of it.

Thanks,


Thanks

Linked servers "Login failed for user 'xxx'. Reason: Not associated with a trusted SQL Server connection"

$
0
0

Hi everyone
I've read many articles about the scenarios where the error "Login failed for user 'xxx'. Reason: Not associated with a trusted SQL Server connection" usually happened. I think I understand the problem and the standard solution. Nevertheless I'm getting in trouble with this once again.
Here's the situation: I have a development environment simulating a customer production environment with a SQL Server 2000 (say Server2000) linked to a SQL Server 2008 (Server2008). Server2000 runs on a different virtual machine. Both servers have "SQL Server and Windows" authentication and the link is defined to establish the connetion with a login and password existing and working on Server2000.
In the logic tier, a windows service connects to Server2008 and executes some SPs which access some tables on Server2000 using the full four part name.
So far so good. As I just configure the link with SQL Server Managent Studio and begin to call the service, everything works fine. But if I turn the machines off and then on again (let's say the next day), I get the unpleasant error "Login failed for user 'xxx'. Reason: Not associated with a trusted SQL Server connection". If I change the account in the link definition and then change in back to the initial one (by means of SSMS), voila, everything works again.
The same occurs if I try to simulate some kind of problem, i.e. I pause Server2000 only and then restart it, when it is back on line the same error appears again.
Wondering and trying, I found that if at this point I run the same SP from the SSMS connected to Server2008, it does work and from this moment on the logic tier service also works again, without any modification on the link definition.
What am I missing? Isn't it really weird?
I hope my description is enough clear, and I'll very much appreciate your explanation and guidance to overcome this very bothering problem.
Thank you in advance

DBCC CHECKDB

$
0
0

I have a stored procedure that will get all the database name on an instance. It will then insert the results of DBCC execution into a table.

INSERT INTO tblErrors(
	Error,[Level],[State],MessageText,RepairLevel,[Status],[DbId],Id, IndId,
   [File],Page,Slot,RefFile,RefPage,RefSlot,Allocation
   )
  EXEC ('dbcc checkdb(''' + @db_name + ''') with tableresults, all_errormsgs')

I then scheduled a job to run the SP.

The problem is my job kept failing with

"Syntax error converting the nvarchar value 'repair_allow_data_loss' to a column of data type int."

So when I do DBCC CHECKDB ('ABC'),  I get

Msg 2576, Level 16, State 1, Line 1

IAM page (0:0) is pointed to by the previous pointer of IAM page (1:80) object ID 1858105660 index ID 0 but was not detected in the scan.

CHECKDB found 1 allocation errors and 0 consistency errors in table '(Object ID 1858105660)' (object ID 1858105660).

DBCC results for 'tblBCD'.

There are 2966 rows in 9 pages for object 'tblBCD'.

I understand the table (tblBCD) has issues; however, is there a way to let the job continue (without erroring out) and just insert the issue record intotblErrors?

Thanks.

Edited: This is for SQL2000




MEMORYCLERK_SQLOPTIMIZER (node n > 0) missing from DBCC MEMORYSTATUS

$
0
0

Last week during an event just like this one:  http://social.msdn.microsoft.com/Forums/en-US/1ecf3d5a-31e3-4346-9ff7-93b1ff57a3cb/blockedprocessreport-what-is-this-waitresource-object-327671246076970-compile?forum=sqldatabaseengine and again here:  http://dba.stackexchange.com/questions/55120/excessive-compile-blocking-on-sp-procedure-params-90-rowset

I noticed that the output of DBCC MEMORYSTATUS only included a section for:

MEMORYCLERK_SQLOPTIMIZER (node 0)        KB

After i had cleared the 'COMPILE blocking' i ran dbcc MEMORYSTATUS again hoping something would show a significant before and after difference.  The only difference was that the after MEMORYSTATUS execution included sections for:

MEMORYCLERK_SQLOPTIMIZER (node 1)        KB

MEMORYCLERK_SQLOPTIMIZER (node 2)        KB

MEMORYCLERK_SQLOPTIMIZER (node 3)        KB

MEMORYCLERK_SQLOPTIMIZER (Total)         KB

Does this indicate anything?  Is it possibly connected to the state of the instance when blocking was happening?

SQL2008r2 Sp2 Cu 8 Standard on Win2008R2


-- dan http://dnhlmssql.blogspot.com/



MSSQL CURRENCY "tr-TR" decimal symbol PROBLEM?

$
0
0

Hi.

when I run this query

FORMAT('1550.50','c2','tr-TR')

I'm getting results

Result----------1.550,50

I want to get these results

I want results----------1,550.50

Thanks to everyone..

How to assign a local service account to SSAS cube.

$
0
0

Hi

How to assign a local service account to SSAS cube.


Royal Thomas

database MDF file is huge but there is not much data in it

$
0
0

I have a database, its MDF file size is 2.63TB

when i count all these tables space it does not reaches even close to the total of MDF file,

i have already rebuild the indexes please advise the solution


k


Where must oledb providers be installed?

$
0
0

I've installed Office 2007 Data Connectivity Components and Access Database Engine 2010 Redistributable on the server.  I've created the following stored procedure and can execute it successfully in SSMS on the server.

CREATE PROCEDURE [dbo].[usp_POLineFollowUpStaging_Insert]
(
 @File VARCHAR(100) = NULL
)
AS
SET NOCOUNT ON
DECLARE @SQL VARCHAR(2000)

SET @SQL =
'SELECT *
FROM OPENROWSET(''Microsoft.ACE.OLEDB.12.0''
, ''Excel 12.0;Database=\\domain\FilePath\' + @File + ';''
, ''SELECT * FROM [Sheet1$]'')'

EXEC(@SQL);

However, when I try to execute this procedure in SSMS on a client it fails.  I would like to understand why it fails when run on a client.  I'm guessing it's because Office 2007 Data Connectivity Components and Access Database Engine 2010 Redistributable are not installed on the client.  Since the procedure, components, and redistributable are all on server I thought it would work.


Kevin

TEMPDB is FULL and not shrinking the space

$
0
0

Hello,
We have Sql 2008 and TEMPDB is FULL, I have restarted the server but it's still showing full.

I ma not thinking to run the Shrink command.

Could you please explain me the correct steps to follow?
I have TEMP DB files (.mdf and .log) on separate drive and one of the .mdf files is shows on server as almost full means I have 5 GB and it shows 4792 MB.

Thanks and Appreciate it!

Question on cluster index creation and data file growth.

$
0
0

Hello,

Will creating a cluster index on a table of size 170 GB creates a copy of the whole table/column as it does during online re-indexing ? If a data file has additional 100 GB will it be sufficient. (to avoid auto grow) Any impact to log file ?

As per my understanding the data file needs only the space required to create index as it initially organizes the data  i.e index size ~100GB

So the total table size will be 170GB (DATA) + 100GB (INDEX)

I just want to understand how SQL handles the creation on cluster index.

Appreciate for any other valuable information.

Thanks



"Fetch Next from" very slow

$
0
0

Hi all ~ There is a cursor inside a store proc. and at the middle of the loop, became extreamly slow..

and I look into "sysprocesses"

"Fetch Next from cursor_name" SUDDENLY uses huge logical read.~~~~

I am using SQL 2008 R2 SP2 .

Anyone meet this kind of case before ?

upgradation issues

$
0
0

can anyone please let me know what are the compatibility issues we get when we upgrade from sql 2008 to 2012  and sql2012 to 2014?

please kindly mention some of the issues and how to resolve them for hassle free upgradation.

thanks in advance.

Viewing all 15872 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>