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

Snap file is created automatically on my SharePoint database ?

$
0
0

Hi,

On My SharePoint Database a snap file is created which consumes lots of space and the performance of server is degraded.

The snap file is created automatically and its also removed automatically after 1 day.

I am new to SQL and won't find any scheduled task for snap file under SQL .

I had checked on technet and won't find an appropriate solution, why snapshot file is created.

The SQL server version is 2008 R2 and SharePoint version is 2013.
Also due to snap file sometime I am unable to take backup of database with DPM (Data Protection Manager).

Thanks,

Nadeem A


Database backup

$
0
0

Hello

I've came to situation where I can not find who is backing up the server. :)

At a specific time database get backed up with two tools. One is known, another is the one that needs to be tracked.
Windows logs show these backups as a regular SQL backups, nothing special about these.
SQL trace shows that backups as a backup with following info

BACKUP DATABASE [DBNAME] TO VIRTUAL_DEVICE='{GUID comes here}' WITH SNAPSHOT,BUFFERCOUNT=1,BLOCKSIZE=1024,COPY_ONLY

SQL Trace shows that backups are done with LocalSystem account and hostname is server name.

I can not find any jobs that might start such backups. Also Backup admins say that they have one tool configured for backups (the known one). And Sharepoint Admins say that database backup is not enabled it the settings (I've checked in SP 2013 you can configure Content DB backup from Sharepoint administration).

Maybe someone can advice how to track down that application, which is doing backups?

Thanks.
Olegas



physical Connection Is Killed, Session Is Killed in extended events logs

$
0
0

hi all 

we are experiencing app timeouts and i am seeing nothing on db logs when i dig into extended events system health session i am seeing below info at same time 

connectivity_ring_buffer_recorded

tds_flagsPhysicalConnectionIsKilled, SessionIsKilled

sourceTDS

typeConnClose

can anyone help on this please 

Simulated buffer.

$
0
0
In SQL sever 2012, there is a new concept Name "Simulated buffer" , is there anyone know what's it?


Please click the Mark as Answer button if a post solves your problem!

SQL Server 2008 Error occurring when trying to attach database

$
0
0

Hi.

I'm trying to attach a database in Management Studio but am recieving an the following error. What can I do to resolve this? I'm using an Administrator account also.

===================================

Attach database failed for Server 'RW113L'.  (Microsoft.SqlServer.Smo)

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

------------------------------
Program Location:

   at Microsoft.SqlServer.Management.Smo.Server.AttachDatabase(String name, StringCollection files)
   at Microsoft.SqlServer.Management.SqlManagerUI.AttachDatabaseData.PrimaryFile.Attach()
   at Microsoft.SqlServer.Management.SqlManagerUI.AttachDatabase.SendDataToServer()

===================================

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

------------------------------
Program Location:

   at Microsoft.SqlServer.Management.Common.ServerConnection.ExecuteNonQuery(String sqlCommand, ExecutionTypes executionType)
   at Microsoft.SqlServer.Management.Common.ServerConnection.ExecuteNonQuery(StringCollection sqlCommands, ExecutionTypes executionType)
   at Microsoft.SqlServer.Management.Smo.ExecutionManager.ExecuteNonQuery(StringCollection queries)
   at Microsoft.SqlServer.Management.Smo.Server.AttachDatabaseWorker(String name, StringCollection files, String owner, AttachOptions attachOptions)
   at Microsoft.SqlServer.Management.Smo.Server.AttachDatabase(String name, StringCollection files)

===================================

Unable to open the physical file "C:\Murach\SQL Server 2008\Databases\AP.mdf". Operating system error 5: "5(failed to retrieve text for this error. Reason: 15105)". (.Net SqlClient Data Provider)

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

------------------------------
Server Name: RW113L
Error Number: 5120
Severity: 16
State: 101
Line Number: 1


------------------------------
Program Location:

   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
   at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
   at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
   at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async)
   at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Microsoft.SqlServer.Management.Common.ServerConnection.ExecuteNonQuery(String sqlCommand, ExecutionTypes executionType)


QUERY window problem

$
0
0

hi team ,

i am able to connecting sql server , but click the new query window getting below error.

Provider to link to Oracle server

$
0
0

I have a question relating to compatability, and the Microsoft documentation seems unclear. Here are the system specs:

Windows Server 2008 R2 (64 bit) Standard

SQL Server 2008 R2 (64 bit) Standard

The desire is to link to an Oracle server. It appears I can possibly use:

Oracle Provider for OLE DB: http://technet.microsoft.com/en-us/library/ms190618(v=sql.105).aspx

or

Microsoft OLE DB Provider for Oracle: http://msdn.microsoft.com/en-us/library/windows/desktop/ms675851(v=vs.85).aspx

We've had issues trying the first one. When I looked closer (and found above link) its suggested that the Oracle provider is not compatable with our system? 32 bit Oracle driver does not work with 64 bit SQL server:http://support.microsoft.com/kb/2555855/en-us and it appears 64 bit driver is simply "None" for support.

Can anyone confirm Which driver(s) I can use given my setup? It looks like the Microsoft driver may be the only compatible driver for our setup. The message regarding it being a discontinued feature concerns me.

estimated execution plan vs actual execution plan

$
0
0
estimated execution plan vs actual execution plan

1.
What is the difference between estimated execution plan vs actual execution plan?

2.
What is the benefit of using estimated execution plan and actual execution plan?

3.
What context should you use estimated execution plan and actual execution plan?

I'm a beginner in performance tuning.

Problem in connecting to database engine

$
0
0

I have installed sql server 2008 R2 on my system. And it was running fine. Then I have installed MS Dynamics NAV 2013 on my system. Now i am not able to connect to my instance of SQL Server.

I have checked all services of sql server and all services are in running mode.

Please Help.

Which of these three sql code with same result does have the best optimal performance?

$
0
0

Problem statement:
Which of these three sql code with same result does have the best optimal performance?

If you run three source code at the same time and each source code has a batch with different percentage value and how much percentage of clustered index or nonclustered index.

Which one does have the best performance and why?

I'm a beginner in performance tuning.

Versioning Tool for SQL Server?

$
0
0
Problem:
Does Microsoft have a versioning tool for SQL server?

I'm thinking about similiar tool as visual studio team foundation but for SQL server?

WOuld like to see any changes in a stored procedure in different version.

Restore backed up (.BAK file) from different server

$
0
0

Good Day,

I have backed up database (.BAK file) in the production, the file is on the Prod box, I would like to restore the .BAK file in to Dev from Prod, is it possible to de that, because we don't have enough space on the Dev box to move .BAK file from Prod to Dev.

Please provide me suitable solution.

Many thanks in advance.

Kind Regards

SQL Logs Size Increasing automatically

$
0
0

Hi,

I am facing a very strange issue in my SQL Server 2008 R2 Logs folder.

Actually in every 10 seconds SQLDump0000,SQLDump0001,.....     and so on named files are being created automatically in the Logs folder where SQL stores it's logs.I don't know why is this happening.

Due to this issue logs folder size is increased to 160GB and  my c drive where windows is installed is keep showing Low space message in fact 0MB space is showing.

Please help urgently.


About Logical Reads

$
0
0

Problem:

1.
If you run a SQL code and you read the logical reads. is it benefit for performance issue to have low value of logical reads not matter what?

2.
What is the definition of logical reads?'

Im a beginner in performance tuning

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.

Drop all the Primary keys in the database

$
0
0

Hello,

I do have a database called "TestDB" (for instance), in that database there are 10 tables, I would like to drop/delete all the primary keys from all the tables using script, because we would like do that very often or please suggest me which is the best to do that, in our environment we have more than 50 tables, we cannot go to each and every table and drop them.

Please provide suitable solution.

Thanks in advance.

Kind Regards

SQL Query fails with Fetch error

$
0
0

We are running JDE ERP 9.0 and have a report that gets this error

“JDB3300020 - Fetch not allowed. Prior successful Select operation required for this request.”

I’ve been troubleshooting this problem for months, and I am no closer to the root cause and need some help. I’ve engaged Microsoft support, we collected a trace but could not find anything that pointed to the cause.

Execution details:

Report runs successfully after database server is rebooted. Otherwise we have to keep rerunning as many as 15 times to get a successful run. When we discovered that report would run after the server reboot, we decided to only restart SQL, to see if it was Query plan related but it still failed. How can we determine why the reboot is making a difference?

Any ideas/help is welcome.

Issue with Merge command not finishing

$
0
0

SQL Server Standard 2008 R2

I have a rather complex MERGE command with when matched, not matched target, and not matched source.  It runs just fine on a data set of 360K rows, but does not complete on a 500K data set.  sp_who2 indicates millions of pagelatch_sh waits.  Yet if on that same data set, I break the Merge up and run each part individually (insert, update, delete) they each run very quickly.

Has anyone seen this before?

Transaction log usage grows due to replication even if I don't use replication at all

$
0
0

Hi

The transaction log usage keeps growing a lot on my user database since few days back. the database is in full recovery model and I do transaction log backups every 10 minutes. The DB was part of Database Mirroring but I removed it. The usage was controlled for many years by the backups but something happened that is messing up the transaction log

this is DBCC OPENTRAN

Transaction information for database 'MyDB'.

Replicated Transaction Information:
        Oldest distributed LSN     : (0:0:0)
        Oldest non-distributed LSN : (1450911:6823:1)
DBCC execution completed. If DBCC printed error messages, contact your system administrator.

log_reuse_wait_desc reports REPLICATION

the funny thing is that I am not using replication at all. I am using CDC.

To reduce the transaction log usage I run below statement every day since the problem started

EXEC sp_repldone @xactid = NULL, @xact_segno = NULL, 
    @numtrans = 0, @time = 0, @reset = 1

Any idea what should I do to solve this problem and be back on a normal situation?

BTW, The server is SQL 2012 (11.0.2383)

Thanks


Javier Villegas | @javier_villhttp://sql-javier-villegas.blogspot.com/

Please click "Propose As Answer" if a post solves your problem or "Vote As Helpful" if a post has been useful to you

An error occurred while executing batch. Error message is: The directory name is invalid.

$
0
0

SQL Server Management Studio 2008

Microsoft SQL Server 2008 (SP3) - 10.0.5512.0 (Intel X86)

Aug 22 2012 15:16:00

Copyright (c) 1988-2008 Microsoft Corporation

Enterprise Edition on Windows NT 6.0 <X86> (Build 6002: Service Pack 2) (VM)

When signed into the server using an account other than the local administrator on the machine I try doing a query with the results going to the grid.  I receive the error

An error occurred while executing batch. Error message is: The directory name is invalid.

I have tried uninstalling and reinstalling the client tools with no luck in fixing the issue.  I have also tried changing the directory to the directory of the local machine that I know exists and the user has access to.  This has not solved the issue either.

The server is a Windows Server 2008 Enterprise Edition with a 32-bit operating system.

Any help would be greatly appreciated.

Let me know if you have any questions.

Thanks

Viewing all 15264 articles
Browse latest View live


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