Quantcast
Viewing all 12963 articles
Browse latest View live

SQL Health Check Script.

Hi,

I need a SQL health check script, or powershell script, in where we just provide a servername as input in stored proedure or powershell and it shoots a mail to me with complete health check report.

Is there any such readymade handy script available? If so, please share it, any help will be much appreciated.

You can also mail to - yoursrj@gmail.com

Thank You.

Raj


Did anyone saw that passage regarding Log Manager

I saw a passage about bufferpool yesterday.

The passage address is:

http://sqlblog.com/blogs/elisabeth_redei/archive/2009/03/01/bufferpool-performance-counters.aspx

In the passage ,it mentioned about  Log Manager.

The quote word is 'For log records, there is a special Log Manager and I will talk about how log records are written in another post.)'.

I want to know the writer wrote the passage about Log Manager  , or not.

If you have any clue about the passage Log Manager  , such as the passage address , tell me please

Thanks a lot. 


Love SQL

Why Pages In Use is higher than Pages Allocated?

I use DBCC MEMORYSTATUS to check our server's memory

Here are the data

--Pages In Use  204248 
--Pages Free  9704  
--Pages Allocated   162920
--Locked Pages Allocated  175248
--Large Pages Allocated

I don't know why Pages In Use is higher than Pages Allocated.

I hope someone can give me explain.

Thanks a lot.


Love SQL

SQLServerAgent initiating self-termination.

Dear All,

Getting following error while starting SQL Server Agent

Exception 5 caught at line 188 of file d:\sql10_katmai_t\sql\mpu\sqlagent\src\autostrt.cpp.  SQLServerAgent initiating self-termination.

how to get into SQL Server - Installation done through DPM tool. DO not have SA password.

HI Every one,

  Hope you guys having wonderful Friday. 

well I have some weird situation so don't know some one can help me here .

in Past some one has Installed SQL Server when installing  Microsoft DPM  ( Data Protection Manager) tool. that time person didn't added  any other AD group during installation. and do not have SA password either. 

I have password under which SQL Server running but I am not able to login into SQL severer under that account. 

what are the other ways to Log in into SQL?

Thanks

How many times does a SQL job run if it is set to run twice a day and it takes 13 hours for the job to run each time?

Hi,

I have a SQL job set to run twice a day. However, the time taken for the job to run each time is 13 hours. In such a case, can you please let me know the number of times the job will run?

Thanks in advance for the reply!!

Unable start DB service

Hi All,

Here is the event log file.

Log Name:      Application
Source:        MSSQLSERVER
Date:          13/4/2015 4:48:04 PM
Event ID:      17058
Task Category: Server
Level:         Error
Keywords:      Classic
User:          N/A
Computer:      db.contoso.com
Description:
initerrlog: Could not open error log file 'f:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\Log\ERRORLOG'. Operating system error = 3(failed to retrieve text for this error. Reason: 15105).
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <System>
    <Provider Name="MSSQLSERVER" />
    <EventID Qualifiers="49152">17058</EventID>
    <Level>2</Level>
    <Task>2</Task>
    <Keywords>0x80000000000000</Keywords>
    <TimeCreated SystemTime="2015-04-13T08:48:04.000000000Z" />
    <EventRecordID>37909</EventRecordID>
    <Channel>Application</Channel>
    <Computer>db.contoso.com</Computer>
    <Security />
  </System>
  <EventData>
    <Data>f:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\Log\ERRORLOG</Data>
    <Data>3(failed to retrieve text for this error. Reason: 15105)</Data>
    <Binary>A24200001000000008000000440042002D004900540032003800000000000000</Binary>
  </EventData>
</Event>

The server does not have F drive and no share drive is in use.

SQL Agent wont start

I have recently bought a new a laptop running Windows 8 Pro and have tried to install SQL server 2008 and 2012 but all to the same effect the SQL agent wont start so I cant therefore connect to my database, I have tried everything on the forums but to no avail I currently have 2012 version installed from this source: https://www.microsoft.com/en-gb/download/details.aspx?id=29062 first installing ENU\x64\SQLManagementStudio_x64_ENU.exe then ENU\x64\SQLEXPR_x64_ENU.exe 

The SQL agent wont start and currently returns with did not respond in a timely manner, the error logs dont present any useful information but can provide these if needed.

Please help I really need this to work if there is anything I have have missed please let me know and also if the is anymore information I can provide that will help thank you.


2008 R2 The duration spent while attempting to connect to this server was - [Pre-Login] initialization=1; handshake=14999;

We are intermittently receiving the following error.  This is very infrequent but the magnitude is enough to trigger alerts from our error monitoring system.  They last about 30 seconds and dissipate.  They seem to happen without any other major changes in traffic or resource consumption on the SQL Server or the Application Server that is attempting to instantiate the connection.    They do occasionally, but not always, get thrown in conjunctions with spid reuse errors on the SQL Server.

We are using ADO.NET to create the connections.  

ConnectionTimeoutExpired.Thetimeoutperiodelapsedwhileattemptingtoconsumethepre-loginhandshakeacknowledgement.Thiscouldbebecausethepre-loginhandshakefailedortheserverwasunabletorespondbackintime.Thedurationspentwhileattemptingtoconnecttothisserverwas- [Pre-Login] initialization=1; handshake=14999;

SQL build: 10.50.2796.0

.NET version: .NET Framework 4.5

Any help is appreciated.


dweh01

When calculate between int and decimal, what is the precision and scale of the result

So far I understand:

1. When an operator combines two expressions of different data types,  data type with the lower precedence is converted to the data type with the higher precedence implicitly.  According to https://msdn.microsoft.com/en-us/library/ms190309.aspx, decimal is higher than int

2. decimal property is the maximum number of total digit for a number, scale property is the number of decimals

When I run the query below

SELECT CAST(10 AS decimal(5,1)) / CAST(140 AS int)

Why is the result 0.071428571428?

Can anyone tell me what the data type for this result is?

I am assuming it is decimal, but why is the scale 12? 

Thanks guys

database alias - connection goes to default instance

Hi

we are moving our sharepoint databases between SQL servers, and we have moved the databases ok and are at the stage of creating a database alias on the sharepoint server to point to the new instance that hosts the databases.

The Database server is SQL2008R2, and has a default install, and a named instance install that will host the sharepoint.

The instance is called dbserver\sqlsp.

I can connect to the instance fine from the sharepoint box.

I have created a database alias (both 32bit and 64bit) called newdb, which points to dbserver\sqlsp on port 1433.

When I connect to the alias from the sharepoint box, it connects me to the DEFAULT instance of sql running on dbserver, not to the named instance.  It appears that the instance name on the end of the alias is being ignored.

Any ideas?

SQL Database Corrupted

Hi Team,

I have a scenario, please give me the answer.
1) Every SUNDAY 12 AM Full Backup
2) Every DAY 2 AM Differential Backup
3) Every 1 Hour T.log Backup
4) Wed 9.30 AM i taken Full Backup Manually
5) Wed 9.30 AM Full Backup Deleted Some one
6) Saturday 8 PM my database corrupted

I Want to make database online, how to recover the db.
Please Let me Know

SQL Srever multiple instance on same server

Hi Everyone,

 To  maintan multiple version of sql server I have intalled sql server 2005/2008 R2 and sql server 2012 on same developement server. When I am opening any of the SSMS (2005/2008 r2/2012) ,in server lists its showing only two server (even after brawse more ) even if I open SSMS of 2012 still I am geting these two server name. These two are one for sql server 2005 and another for sql server 2008 r2 .   Finally I am not able to connect with sql server 2012 instance.  Can any body help me to connect with sql server 2012 instance.

Thanks

 


Regards Vikas Pathak

What will be the immediate behavior of server once the model, msdb, tempdbs are corrupted?

Hi,

Can someone help me to get the below information.

What will be the immediate behavior of server once the model, msdb, tempdbs are corrupted?

Latency on SAN SQL Server get blamed

Hi,

I am running SQL Server 2008 R2 on a SAN disk with around 20 databases. i have 4 different production servers and all are hosted on same server. Latency is happening now quite often and our IT department straightway blame SQL for this. I constantly monitor SQL and can't find any evidence of Latency. When i get notice by IT department that there is Latency i usually jump on and run sp_who2 to check and most of time i usually don't get anything odd running. but i did notice that on some occusion there is Alot high Disk I/O mainly to do with reading.

I am running Performance monitor but not sure how to capture the event. 

Is there any way in SQL server i can capture the even as and when it happens(email or eventlog). I want to see if SQL is really causing the problem or is there any other server which is causing the bottleneck.


Does Shrinkfile operations fill transactional log?

Hi all,

I've a database using full recovery model, I've just finished implementing data compression (a mix of ROW, PAGE and NONE based on Microsoft best practices), now I wish to reclaim the space freed with a shrikfile operation.

Does this operation fills the transactional log record of the database?

Backup a secondary database

Hi,

Can I perform a full or differential backup of a secondary database in log shipping SQL Server 2008 and 2008 R2 ?

SQL server 2008 R2 downgrade from Enterprise to standard edition

Hello,

we are going to downgrade SQL server 2008R2 from enterprise to standard for a server whose databases are not using any of the enterprise features. 

Per the link http://www.mssqltips.com/sqlservertip/3079/downgrade-from-sql-server-enterprise-edition-to-standard-edition/ we had made a plan to do so.

However, we are not sure of two points:

1) Do we need to import the SSIS packages, i.e. after downgrade would all the packages vanish? Therefore what should be done for the Integeration services on this instance?

2) second would be related to reports configured. Would all the settings in reporting configuration also change? If yes what should be done while downgrading (removing the reporting services as well)

Thanks, please suggest.


Login problem querying by SSMS

Hi guys, I got one colleague, let's say Tom that is having problems connecting a db by SSMS. The situation for Tom is:

Security-->Login He has permission in the DB as datawriter

DB-->Security-->Users He has permission has datawriter

but when he try to run a query it retutrns the msg

Msg 229, Level 14, State 5, Line 2 
The SELECT permission was denied on the object 'ers_contract', database 'DBXXXX', schema 'dbo'.

I tried to delete the user (DB-->Security-->Users) and/or to remove the user from the db (Security-->Login) but both operation return The dataset principal owns a schema in the database, and cannot be dropped.

Any thoughts? Thanks



Database Log File getting full by Reindex Job

Hey guys

I have an issue with one of my databases during Reindex Job.  Most of the time, the log file is 99% free, but during the Reindex job, the log file fills up and runs out of space, so the reindex job fails and I also get errors from the DB due to log file space.  Any suggestions?

Viewing all 12963 articles
Browse latest View live


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