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

There is insufficient system memory in resource pool 'default' to run this query

$
0
0

As of recent, we get There is insufficient system memory in resource pool 'default' to run this query.Normally, this happens during backups, DBCC checks, or memory intensive (e.g. ranking) procedures. The main DB is about 500GB in size. This is what led up to this point:

  • For about 1 year we ran Microsoft SQL Server 2012, 64 bit, 64GB. Maximum Memory capped at 53GB. Data on SSDs, logs/tempdb on "regular" drives. No memory errors.
  • Then, we upgraded "regular" drives to SSDs and put logs/tempdb on them. Started getting seldom insufficient memory errors
  • Updated the server to Service Pack 1 - 11.0.3373.0 (X64) -- Cumulative Update 5. Now, getting these errors a couple of times a week.

The error log showing messages logged around one of these "events" is here: ErrorLog

Your help on how these memory issues can be addressed would be greatly appreciated.




2 instances at same machine

$
0
0

I created the 2 instances where 1 is default instance and another 1 is named instance.

The default instance currently running ok with port no. 1433.

but the named instance have the remote connection problem. I hit the error below:

1) can both instances sharing the same port no. 1433?

2)Do I need to create another IP for the another instance?

3) I tried connect to the named instance using ip\instance name then I hit error below:

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: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified) (.Net SqlClient Data Provider)

However, I tried the IP\instance name, 1433 but it connected to the default instance.....

Plesae advise what I should do in order to able the named instance able to run ok with allowing the remote user access as well..

thanks.

DBCC shrinkdatabase truncateonly

$
0
0

HI ALL:

I have a database which has free space around 50%,

I use dbcc shrinkdatabase('testing',10,truncateonly) , it takes no effect:

when  I use dbcc shrinkdatabase('testing',10) it works..

I am using SQL 2005.  why dbcc with truncate takes no effect ?

SQL Server 2008 & 2012 Database backup on a shared loaction

$
0
0

Hi,

I have to plan for the Database backup on SQL Server 2008 & 2012 on a shared Path.

We are building a new Maintenance plan &  specify the Database which needs to be backup & at the Folder location we specify the Shared Path Location. These steps I have followed using the below link,

http://social.msdn.microsoft.com/Forums/en-US/be138ca3-4b2f-4464-8115-9a0a6f2e0fe6/sql-database-backup-on-network-share-using-maintenance-plan?forum=sqldatabasemirroring

But the operation fails & throws the below error:

Message
Executed as user Microsoft (R) SQL Server Execute Package Utility  Version 10.50.1600.1 for 64-bit  Copyright (C) Microsoft Corporation 2010. All rights reserved.    Started:  12:27:17 PM  Progress: 2014-02-13 12:27:19.13     Source: {B6CEBA00-4BD1-4931-AF23-B633BEDBEE4A}      Executing query "DECLARE @Guid UNIQUEIDENTIFIER      EXECUTE msdb..sp...".: 100% complete  End Progress  Error: 2014-02-13 12:27:20.63     Code: 0xC002F210     Source: Back Up Database Task Execute SQL Task     Description: Executing the query "BACKUP DATABASE DB TO  DISK ..." failed with the following error: "Cannot open backup device '\\DBBackup\SharePoint_backup\DB_backup_2014_02_13_122719_5314660.bak'. Operating system error 5(Access is denied.).  BACKUP DATABASE is terminating abnormally.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.  End Error  DTExec: The package execution returned DTSER_FAILURE (1).  Started:  12:27:17 PM  Finished: 12:27:20 PM  Elapsed:  2.843 seconds.  The package execution failed.  The step failed.

Note: But when I open the shared path in the Windows Explorer it opens successfully.

Regards,

Purvish Shah

Logshipping vs Mirroring

$
0
0

hi Team,

we have 10 databases each database having min 350 gb,

here we are paling to replication the data from production site to  DR site.

To replication the data which one of high availability is best like "log shipping" or "Mirroring".

we have only two options "logshipping" or "Mirroring".

if we can go for "logshipping" what are the benefits, or we can go for "Mirroring" what are the benefits are available.

 

KB2895494 doesn't seem to work in SQL2012 SP1 CU8

$
0
0

KB2895494 was raised as part of SQL2012 SP1 CU7 to stop a memory leak caused by theMEMOBJ_COMPILE_ADHOC memory object not releasing memory. The KB includes a query:-

select type, sum(pages_in_bytes)/1024.0/1024.00 'Mem in MB', count (*) 'row count' from sys.dm_os_memory_objects where type like '%MEMOBJ_COMPILE_ADHOC%' group by type;

When this query is run over a period of time the Mem in MB and row count goes up and up.

We run CU6 and did not install CU7 but now we are installing CU8 and when I run this query on a CU8 server these numbers continue to climb just like they do on a CU6 build server.

Can somebody confirm that it did work in CU7 and is anybody else seeing this behaviour?

It is showing in both a failover cluster and an Availability Group cluster.

Thanks

Chris

SS2008 Log Shipping Performance Issues on Secondary Server Restore Job

$
0
0

Hi folks,

I'm having an issue with log shipping. What has taken 2-5 minutes in the past is now taking 20-40 minutes which is no good really. File sizes have not increased.

I've run the log shipping with a global trace on 3004 & 3605.

The issue appears to be the step Restore: Transferring data to <db_name> which is taking about 90% of the process time in the Restore job on the secondary server.

I'm unsure what this element does in the restore, so am looking for further details / suggestions / where to look for issues.

I'm providing the log from the trace below with the specific area highlighted in bold,

many thanks

Stuart

2014-01-24 09:56:01.41 spid88      RestoreLog: Database <db_name>
2014-01-24 09:56:01.41 spid88      X-locking database: <db_name>
2014-01-24 09:56:01.41 spid88      Opening backup set
2014-01-24 09:56:01.43 spid88      Restore: Configuration section loaded
2014-01-24 09:56:01.43 spid88      Restore: Backup set is open
2014-01-24 09:56:01.43 spid88      Restore: Planning begins
2014-01-24 09:56:01.44 spid88      Halting FullText crawls on database <db_name>
2014-01-24 09:56:01.44 spid88      Dismounting FullText catalogs
2014-01-24 09:56:01.44 spid88      Restore: Planning complete
2014-01-24 09:56:01.44 spid88      Restore: BeginRestore (offline) on <db_name>
2014-01-24 09:56:01.44 spid88      Restore: Undoing STANDBY for <db_name>
2014-01-24 09:56:03.10 spid88      SnipEndOfLog from LSN: (19960:7863:1)
2014-01-24 09:56:03.10 spid88      FixupLogTail(progress) zeroing F:\<db_name>_Log1.ldf from 0x139b6e00 to 0x139b8000.
2014-01-24 09:56:03.10 spid88      Zeroing F:\<db_name>_Log1.ldf from page 40156 to 40177 (0x139b8000 to 0x139e2000)
2014-01-24 09:56:03.10 spid88      Zeroing completed on F:\<db_name>_Log1.ldf
2014-01-24 09:56:03.10 spid88      Restore: Finished undoing STANDBY for <db_name>
2014-01-24 09:56:03.13 spid88      Restore: PreparingContainers
2014-01-24 09:56:03.13 spid88      Restore: Containers are ready
2014-01-24 09:56:03.13 spid88      Restore: Restoring backup set
2014-01-24 09:56:03.13 spid88      Restore: Transferring data to <db_name>
2014-01-24 10:15:44.16 spid88      Restore: Waiting for log zero on <db_name>
2014-01-24 10:15:44.16 spid88      Restore: LogZero complete
2014-01-24 10:15:44.41 spid88      FileHandleCache: 440 files opened. CacheSize: 14
2014-01-24 10:15:44.41 spid88      Restore: Data transfer complete on <db_name>
2014-01-24 10:15:44.41 spid88      Restore: Backup set restored
2014-01-24 10:15:44.41 spid88      Restore-Redo begins on database <db_name>
2014-01-24 10:15:52.18 spid88      Rollforward complete on database <db_name>
2014-01-24 10:15:52.18 spid88      Restore: Done with fixups
2014-01-24 10:15:52.20 spid88      Transitioning to STANDBY
2014-01-24 10:15:52.33 spid88      Starting up database '<db_name>'.
2014-01-24 10:15:52.34 spid88      The database '<db_name>' is marked RESTORING and is in a state that does not allow recovery to be run.
2014-01-24 10:15:58.25 spid88      FixupLogTail(progress) zeroing F:\<db_name>_Log1.ldf from 0x5b000 to 0x5c000.
2014-01-24 10:15:58.25 spid88      Zeroing F:\<db_name>_Log1.ldf from page 46 to 526 (0x5c000 to 0x41c000)
2014-01-24 10:15:58.27 spid88      Zeroing completed on F:\<db_name>_Log1.ldf
2014-01-24 10:15:59.03 spid88      Recovery is writing a checkpoint in database '<db_name>' (10). This is an informational message only. No user action is required.
2014-01-24 10:16:00.46 spid88      Recovery completed for database <db_name> (database ID 10) in 8 second(s) (analysis 5796 ms, redo 0 ms, undo 546 ms.) This is an informational message only.                                              No user action is required.
2014-01-24 10:16:00.58 spid88      Starting up database '<db_name>'.
2014-01-24 10:16:00.69 spid88      Database <db_name> was started . 
2014-01-24 10:16:01.00 spid88      CHECKDB for database '<db_name>' finished without errors on 2014-01-18 17:31:21.020 (local time). This is an informational message only; no user action is required.
2014-01-24 10:16:01.01 spid88      Database is in STANDBY
2014-01-24 10:16:01.01 spid88      Resuming any halted fulltext crawls
2014-01-24 10:16:01.01 spid88      Restore: Writing history records
2014-01-24 10:16:01.01 Backup      Log was restored. Database: <db_name>, creation date(time): 2012/07/18(16:20:49), first LSN: 19960:7863:1, last LSN: 19961:712:1, number of dump devices: 1, device information: (FILE=1, TYPE=DISK: {'G:\<db_name>_LS\<db_name>_20140124095000.trn'}). This is an informational message. No user action is required.
2014-01-24 10:16:01.01 spid88      Writing backup history records
2014-01-24 10:16:01.40 spid88      Restore: Done with MSDB maintenance
2014-01-24 10:16:01.40 spid88      RestoreLog: Finished
2014-01-24 10:16:01.43 spid88      Setting database option MULTI_USER to ON for database <db_name>.

EDIT

Thanks for the responses esp John S. I was away on holiday hence my silence. I was always pondering on the disk side of things, but didn't say that as everyone then just agrees with what has already been said by the op ie myself. I unfortunately have not had a chance to analyse the disks, but when I do I will post an update. Thx again, S



Change Tracking internals behave differently, SQL Server 2012 vs SQL Server 2008

$
0
0

<original post by Glenn Estrada>

Reposting an issue from Stack Overflow that a coworker and I are dealing with.

In trouble shooting an issue with synchronizing disconnected devices with a central database server using Sync Framework 1.0, we are experiencing a problem after upgrading to SQL Server 2012 on the server. It appears that the CHANGE_TRACKING_MIN_VALID_VERSION is returning a value 1 higher than it should (or at least than it did prior to the upgrade.)

I have been working thru Arshad Ali's great walk thru example of how to set up a simple example.

I have run the scripts from #1 thru #5 to insert, delete, and update a row in the Employee table in both a SQL Server 2008 and a 2012 environment.

In 2008, the following statement returns a 0:

SELECT CHANGE_TRACKING_MIN_VALID_VERSION(OBJECT_ID('Employee'))

In 2012, it returns a 1.

In working thru a few more scripts (6-8) in the tests, I set the retention period to 1 minute to hopefully force a cleanup action. I left for the day and apparently it ran overnight.

In the 2008 instance, the CHANGE_TRACKING_CURRENT_VERSION and the CHANGE_TRACKING_MIN_VALID_VERSION are equal (11). In the 2012 instance, the CHANGE_TRACKING_MIN_VALID_VERSION is one higher (12) than the CHANGE_TRACKING_CURRENT_VERSION (11). This could have an impact to the synchronization process when a database is idle for extended periods of time. And we have found that process could get caught in a loop, especially when the following test is performed to determine if a re-initialization, as opposed to synchronization, is required:

IF CHANGE_TRACKING_MIN_VALID_VERSION(object_id(N'dbo.Employee'))>@sync_last_received_anchor RAISERROR(N'SQL Server Change Tracking has cleaned up tracking information for table ''%s''...

Has anyone else experienced this change in behavior? Does anyone have an explanation?


Bulk recovery model and minimal logging

$
0
0

Hi all

I was brushing up my fundamentals by reading sql 2008 wrox and i get confused.

Book says : Bulk recovery model do minimal logging in case of bulk operation. This means it writes only undo part of transaction and leave redo in t-log file.

As per book :"only the information required to roll back the transaction is logged.Redo

information is not logged."

My confusion is, if just after a pico second of transaction committed my sql server restarted  (means in log file transaction is committed but data file doesnt yet reflect change beacause its changes was yet in data cache)then transaction should be recoverd from log file but log file doesnt have redo part for this committed transaction. So will sql server recover my bulk transaction???? and how


Thanks Saurabh Sinha http://saurabhsinhainblogs.blogspot.in/ Please click the Mark as answer button and vote as helpful if this reply solves your problem

Column Mask support?

Turning Off my SQL Profiler Trace

$
0
0

I created a trace out of Profiler a coule weeks ago.  However I did not think it was still running.  However it is slowing process down and I can see my log_xxx.trc file is conitinuing to log much information about the SQL server.  I open the file in Profiler but all the options to Run, Stop Trace our greyed out.

I really need to stop this because I would kie to use it again but it is not needed right now.

SQL 2005

Using linked server between SQL 2005 and SQL 2008R2 becomes very slow

$
0
0

Hello,

We use for several years for our application a linked server to transfer data from an SQL Server 2005 Express to SQL Server 2005 Standard. Amount of data can be large. But all was find till we use now SQL 2008R2 Standard instead of 2005. The transfer becomes very very slow (about 10 times mores). After investigation, we find that the problem is not the same in function of the way we use the transfer.

--case 1
-- call by the client via a remote store procedure on the HOST
SET @SQLInsert = 'INSERT INTO [CLIENT\SQLEXPRESS].destdb.dbo.desttable SELECT * FROM SrcTable'
Execute @RetExec = sp_executesql  @SQLInsert                                                                                     



--case 2
-- call by the client via a remote store procedure on the HOST but calling query via remote syntaxe
SET @SQLInsert = 'INSERT INTO desttable SELECT * FROM [HOST\INSTANCE].srcdb.dbo.SrcTable'
SET @Query = quotename(@Server) + '.' + @DataBase + '.dbo.sp_executesql N'
SET @Query = @Query + ''''+@SQLInsert+''''                                                                                   

Execute @RetExec = sp_executesql  @Query     

in the case 1, (case that we use first) the transfer is very slow

in the case 2 the transfer is 10 times shorter for the same data to transfer. So putting a wireshark on the network , we can see that the transfer format is not the same and it's bigger on the case 1.

We have many application deployed on customer site and we can find this problem only for transfer with SQL 2008R2, and not for all sites.

Perharps there's somes configuration that can help ? It's a very big problem for us, is someone know a solution for this problem ?

Thank you


David (Adents)

SQL Server 2008

$
0
0

I have this table where:

A        B             C                D1        D2           K   

10     FW         SP2012         22          2           IM          

10     FW         SU2012      10         3           IE

20     FW         SP 2012        5            4          IM

10   FW          SU2012       6          5            PE  

Above two highlighted are common except column K

 I Want to get:

A        B             C             M        D1or D2              K   

10     FW         SP2012     22            D1                  IM          

10     FW         SU2012    16             D1                  IE and PE

20     FW         SP 2012    5              D1                 IM

10     FW         SP2012     2              D2                  IM          

10     FW         SU2012    8               D2                IE and   PE

20     FW         SP 2012    4               D2                 IM

How do I get a result like this????


SPPandey


Big data Implementation in sql server 2008 r2

$
0
0

Can Some one please explain what is big data and implementation of big data or usage of big data with clear explanation, Screen shots will be more helpfull.

Thanks in Advance.

Tanks,

G.Satish Reddy.

droping Publication

$
0
0

Msg 15404, Level 16, State 11, Procedure sp_replcmds, Line 1
Could not obtain information about Windows NT group/user 'domain\user', error code 0x534.

here i want to delete publication but its not happing.


Error: 15404

$
0
0

For a job under particular user who is not in organization.

[298] SQLServer Error: 15404, Could not obtain information about Windows NT group/user 'Domain\User', error code 0x2. [SQLSTATE 42000] (ConnIsLoginSysAdmin)

Thanks in Advancce.

SQL 2012 DBCC CHECKDB Run Very Slow

$
0
0

Does anyone experience this? SQL 2012 DBCC CHECKDB runs very slow on one of the server. I monitored the server and it seems DBCC CHECKDB does not hit the disk hard enough. It can read 100 mb per second on of my slower server, but on this particular server, it only read 1 mb per second. I saw parallel processes, but it just not read disk hard enough. I am curious what causes this? There is no user using the server when I run DBCC command. The full database restore took 3 hours, but DBCC CHECKDB took more than 11 hours.  Thanks for any input.

Lijun

How to versioning Jobs on SQL Server 2012

$
0
0

Hello

I try to track who and what could be changed in Jobs on the SQL Server Agent (in case of emergency after an alter fail, i want to know who did modifications and to maybe do a Rollback).

In the msdb.dbo.sysjobs, i can find the last Date_modified and that's all. 

Do you have any ideas ?  Triggers maybe  ... ?

Thanks !

Attach a autocad DWG files to Table in database

$
0
0

Hi 

How could i attach Auto Cad Drawing files to a Table?

Thank you

Merge two tables into one.

$
0
0

Hi all,

I have two totally different tables with completely different data fields. Also, there is no common relationship between these two tables. However, I want to pick few data fields from the each table and merge into a new table! Is this even possible? If so how can I do that?

Thanks.


artistdedigital

Viewing all 15264 articles
Browse latest View live


Latest Images

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