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

How can I dump all the data from DBCC Memorystatus?

$
0
0

Hi,

Using this query you lose every section ( of the results losing the meaning.

I've tried unsuccessfully to google on internet each relationship between every results section and the pertinent DMV.

This command retrieves a lot of valuable information.

declare @memoria as table(descript nvarchar(200), figure bigint)

insert into @memoria
(
descript,
figure)

exec('DBCC MEMORYSTATUS')
--DBCC MEMORYSTATUS

select * from @memoria


Capacity Reports for SQL Server 2012

$
0
0

Team,

Please suggest the methods to perform Capacity Reporting for SQL 2012. 600 Databases spanning around 18 instances.

Best Regards,

Sharath


Best Regards, Sharath

0 writes?

$
0
0

Hi,

Can you kindly test this query in the most busiest server have you got?

I am just getting 0

 DECLARE @WriteReads bigint;
SELECT @WriteReads  = cntr_value
  FROM sys.dm_os_performance_counters
  WHERE counter_name = 'Page writes/sec';

WAITFOR DELAY '00:00:10';


SELECT(cntr_value - @WriteReads ) / 10 AS 'Page writes/sec'
  FROM sys.dm_os_performance_counters
  WHERE counter_name = 'Page writes/sec';

Deleted log file (how to create new log file)

$
0
0

Hi All,

I unexpectedly deleted log file..with out deattached the database.

How can i create new log file for the mdf file in same log file location.

Thanks in Advance...

SQL Instance Servers not starting on computer restart

$
0
0

Hello,

    I have an issue that has been going on for a little while and have been unable to figure out what is causing the issue.  Have a Windows 10 Pro computer that is being used for business.  On that computer there are multiple instances of SQL Server running.  Each instance of SQL Server has its own port well out of the norm of used ports (above 40000).  There are no other services that run on these ports, I have verified it with nbstat.

   So when the computer restarts, generally one to four of the five instances will not start.  Windows Event Log shows generally the same message with a different instance name: The MSSQL$SQL16 service terminated with the following service-specific error:
Only one usage of each socket address (protocol/network address/port) is normally permitted.

   Now to get them to work, I have to stop SSIS, SSAS, & SSRS for each instance, then start up the instances of SQL Server, then start up all the others like SSIS, SSAS, SSRS, and SQL Agent.

  Any thoughts on how to make this work correctly?


Michael R. Mastro II

Looking for some useful link with SQL Log messages

$
0
0

Hi there,

"A significant part of sql server process memory has been paged out. This may result in a performance degradation. Duration: 924 seconds[...]"

"Using locked pages in the memory manager"

...

Above messages on SQL Server Error log are very meaningful and useful for us. I am just looking for some link where I can see the most important/relevant.

My goal here is run a stored procedure scheduled on the Agent once a day for digging into the current Error Log file (0) on daily basis and beyond peak-hours and then emailing to some operator alerting the message saved in the log.

By using xp_ReadErrorLog and xp_enumerrorlogs stored procedures would be enough.

Example:

Declare @nfile int = 0

EXEC sys.xp_ReadErrorLog @nfile, 1, N'significant part of sql server process memo'

We can really define native alerts on the server or using some monitoring tool but this innocent and easy piece of code would help to enforce our defensive system.

Thanks,


SQL server assessment

$
0
0

Hello,

We are trying to assess our current production SQL 2012 server, to see if the existing hardware can handle if we add additional users hitting the database in the next couple of months. I reviewed the disk space, RAM. But trying to follow the best practices in forecasting such a growth. If any articles can be shared would be great! Thanks.


sqldev

Please advise about Antivirus Exclusions for SQL Database Files

$
0
0

Hello All,

We have received a request from customer that disbaled the antivirus from Database cluster server(Active\passive).

"The anti-virus can lock up the SQL Server in much the same manner as the snapshots. 
 Unfortunately we can see the issue even when disabling this. The only way to completely take this out of the picture is to temporarily uninstall it from the SQL Servers.  I understand that this is production servers, 
and this would be very temporary until the issue either happens again, or we are comfortable that it isn't happening with this removed."


I have searched Few blogs,found below articles(Pinal dave),
http://blog.sqlauthority.com/2015/05/19/sql-server-antivirus-exclusions-best-practices-with-sql-server/

Should i suggest the customer to excluded from all antivirus scans as mentioned pinal dave.
I hope you will be able to provide the information.

Could you please Confirm if the antivirus software locks a SQL Server files.?


Operating system error 1(Incorrect function.) encountered.

$
0
0

Hi,

I have Driver "D:" with type of File System is "UDF".

When create new Database in SQL 2014, chose Path of new Database is "D:".

Error event 17053 is log in Event Viewer:

If in SQL 2008, Event 17053 is not log.

If type of File System of "D:" is "NTFS", Event 17053 is not log.

Question:

What is Rootcause of issue?

How to fix this issue?

Linked Server Memory Allocation

$
0
0

I am trying to understand how linked server query allocates Memory.

In couple of articles, it was mentioned that Linked server does not use memory from the buffer pool.
I am trying to understand more exactly what this means?

Does this mean linked server query data is not fetched into buffer pool of the local server.

Lets take this scenerio: assume SQL 2014 is being used on both the servers.

Server A - 100GB - SQL Server is using 80GB. Windows - 20GB
Server B - 100GB - SQL Server is using 80GB. Windows - 20GB

A Linked server Query from Server A goes to Server B and fetches some data.
for argument sake, say - it is fetching 2 GB data from the linked server.

So, this 2Gb data comes from the buffer pool of the ServerB into Windows memory(not buffer pool) on ServerA.
Is this right way to interpret linked server memory allocation?


Hope it Helps!!

date issue

$
0
0
we want to use default language (syslanguages) us_english, but all querys are failling because the backend expects the date format 'dmy'. Is there a way to change the date format from mdy to dmy keeping default language us_english.

Deadlock not detected

$
0
0

Hi, I've got a problem with a particular query - it runs for a while then hangs (CPU and IO count remain static). Other processes then get blocked by my query. sp_who2 and SQL Sentry both show that my query is at the head of the blocking chain. However, looking at dm_os_waiting_tasks shows that my query is blocked by one of the processes that I am blocking.

session_id = 558, blocking_session_id = 359

session_id = 359, blocking session_id = 558

Unless I am misunderstanding how this dmv works, what I am seeing is a deadlock. But it is not detected by the engine.


Paul Ross DBA Redrow Homes

Due to storage issue SQL server is not working and moved system DB to new location

$
0
0

Hi,

Due to storage issue SQL server has stopped and I have copied system DB and user Db to new location.

I have changed the startup parameter as well

But SQL server is failing with error "the request failed or the service did not respond in a timely fashion"

Please le me know how can i start the SQL server

Any Plain English to SQL translator??

$
0
0

Hi folks,

I am new here. I am trying to add a natural language (English) database interface to my database. So one can simply type what s/he wants to know in English, then the application can translate the English sentence into SQL query against the database. I did a little search online, it seems that MS used to provide this functionality in SQL Server 2000 (called 'English Query'). Unfortunately, English Query discontinued in SQL Server 2005 and later versions. Is there any alternative that can accomplish similar task? Please advice....

Btw, my database is running on SQL Server 2005

Best,

Ethronj

Delayed_durability purpose?

$
0
0

Hi there, I am questioning myself about either use or not use this setting in live..

As per my understanding if you activate this parameter you can reduce the latency when you are writing against the transaction log of the database affected. is it so? I also read that if you have a high proportion of transactions smaller than 60 kb and when you don't have either shared or full flash SSD behind, it could bring you benefits.

How can I figure out the average size of my transactions?

Thanks a lot,


SQL Server 2014 Instructions to create link server to Redshift

$
0
0

Hi,

Thank you ahead of time for any help. I have sql server 2014 32 bit on my machine and trying to create a link server connection to redshift. Below are the steps I took to try and setup these connections:

1. I downloaded both 32 & 64 bit Amazon Redshift ODBC drivers and ran the connection test and both worked.

2. I then use Access database to connect to redshift server and that also worked

Below are the providers i have for my SQL server and have no clue on how to setup the connection to redshift. I have a server string, user name, password, port and database name to log into Redshift. Please any help will be nice.

thank you




Edwin Lopera

Moving Sql 2008 "MS_AgentSigningCertificate.cer" file to a differen drive

$
0
0

We are moving our sql 2008 DB files from drive D to drive E. I noticed that a "cer" file, mentioned in the Title, is also located on Drive D. 

1. What is this file used for?

2. Will moving the cer file to Drive E r (effectively removing it from D) cause any issues?

TIA,

edm2


SQL Server 2012 memory configuration

$
0
0

Hi All,

We have to total 256 GB physical memory on our PROD DB server & We have total 3 DB's with the max DB size is 208978.19 MB.

Currently we have below memory configuration for MS SQL:

Min memory: 64000 MB & Max memory: 216000 MB.

Can you please advise the above memory configuration is correct or is there any changes required?

1. This is dedicated DB server and we have installed DB engine & SSRS. 

2. We have configured DB mirroring from primary DB to secondary DB.

3. OS version: Windows server 2008 R2


Issue in Sql Server 2016

$
0
0

SQL Server Services of 2016 installed on one of our server stops frequently.

When I check SQL Server Error Log, I get following error Msg, Error: 17311, Severity: 16, State: 1.

SQL Server is terminating because of fatal exception c0000005. This error may be caused by an unhandled Win32 or C++ exception, or by an access violation encountered during exception handling. Check the SQL error log for any related stack dumps or messages. This exception forces SQL Server to shutdown. To recover from this error, restart the server (unless SQLAgent is configured to auto restart).

Problem to dbmail

$
0
0
Hi,
I get
Msg 14624, Level 16, State 1, Procedure sp_send_dbmail, Line 260
At least one of the following parameters must be specified. "@recipients, @copy_recipients, @blind_copy_recipients".


but I already have put parameters to @recipients, @copy_recipients, when calling sp_send_dbmail. Why?

Many Thanks & Best Regards, Hua Min

Viewing all 12963 articles
Browse latest View live


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