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

Windows could not start the SQL Server (xxx) on Local Computer. For more information, review the System Event Log. If this is a non-Microsof service, contact the service vendor, and refer to service-specific error code -1.

$
0
0

I have two instances of SQL on this machine, 2005 and 2008 R2.  The 2005 server starts and works fine but the 2008 R2 is giving me the above error when trying to start.

Here is the contents of the ERRORLOG file:

2014-07-23 11:02:34.95 Server      Microsoft SQL Server 2008 R2 (SP2) - 10.50.4000.0 (X64)
 Jun 28 2012 08:36:30
 Copyright (c) Microsoft Corporation
 Express Edition (64-bit) on Windows NT 6.1 <X64> (Build 7601: Service Pack 1)

2014-07-23 11:02:34.95 Server      (c) Microsoft Corporation.
2014-07-23 11:02:34.95 Server      All rights reserved.
2014-07-23 11:02:34.95 Server      Server process ID is 628.
2014-07-23 11:02:34.95 Server      System Manufacturer: 'Hewlett-Packard', System Model: 'HPE-500y'.
2014-07-23 11:02:34.95 Server      Authentication mode is MIXED.
2014-07-23 11:02:34.95 Server      Logging SQL Server messages in file 'c:\Program Files\Microsoft SQL Server\MSSQL10_50.MITEK_TP\MSSQL\Log\ERRORLOG'.
2014-07-23 11:02:34.95 Server      This instance of SQL Server last reported using a process ID of 7844 at 7/23/2014 10:55:02 AM (local) 7/23/2014 4:55:02 PM (UTC). This is an informational message only; no user action is required.
2014-07-23 11:02:34.95 Server      Registry startup parameters:
  -d c:\Program Files\Microsoft SQL Server\MSSQL10_50.MITEK_TP\MSSQL\DATA\master.mdf
  -e c:\Program Files\Microsoft SQL Server\MSSQL10_50.MITEK_TP\MSSQL\Log\ERRORLOG
  -l c:\Program Files\Microsoft SQL Server\MSSQL10_50.MITEK_TP\MSSQL\DATA\mastlog.ldf
2014-07-23 11:02:34.99 Server      SQL Server is starting at normal priority base (=7). This is an informational message only. No user action is required.
2014-07-23 11:02:34.99 Server      Detected 6 CPUs. This is an informational message; no user action is required.
2014-07-23 11:02:35.09 Server      Using dynamic lock allocation.  Initial allocation of 2500 Lock blocks and 5000 Lock Owner blocks per node.  This is an informational message only.  No user action is required.
2014-07-23 11:02:35.16 Server      Node configuration: node 0: CPU mask: 0x000000000000003f:0 Active CPU mask: 0x000000000000003f:0. This message provides a description of the NUMA configuration for this computer. This is an informational message only. No user action is required.
2014-07-23 11:02:35.19 spid6s      Starting up database 'master'.
2014-07-23 11:02:35.31 spid6s      FILESTREAM: effective level = 0, configured level = 0, file system access share name = 'MITEK_TP'.
2014-07-23 11:02:35.34 spid6s      SQL Trace ID 1 was started by login "sa".
2014-07-23 11:02:35.34 spid6s      Starting up database 'mssqlsystemresource'.
2014-07-23 11:02:35.36 spid6s      The resource database build version is 10.50.4000. This is an informational message only. No user action is required.
2014-07-23 11:02:35.52 spid10s     Starting up database 'model'.
2014-07-23 11:02:35.52 spid6s      Server name is 'TPT\MITEK_TP'. This is an informational message only. No user action is required.
2014-07-23 11:02:35.52 spid6s      Informational: No full-text supported languages found.
2014-07-23 11:02:35.52 spid6s      Starting up database 'msdb'.
2014-07-23 11:02:35.69 Server      A self-generated certificate was successfully loaded for encryption.
2014-07-23 11:02:35.69 Server      Error: 17182, Severity: 16, State: 1.
2014-07-23 11:02:35.69 Server      TDSSNIClient initialization failed with error 0xffffffff, status code 0x80. Reason: Unable to initialize SSL support.
2014-07-23 11:02:35.69 Server      Error: 17182, Severity: 16, State: 1.
2014-07-23 11:02:35.69 Server      TDSSNIClient initialization failed with error 0xffffffff, status code 0x1. Reason: Initialization failed with an infrastructure error. Check for previous errors.
2014-07-23 11:02:35.69 Server      Error: 17826, Severity: 18, State: 3.
2014-07-23 11:02:35.69 Server      Could not start the network library because of an internal error in the network library. To determine the cause, review the errors immediately preceding this one in the error log.
2014-07-23 11:02:35.69 Server      Error: 17120, Severity: 16, State: 1.
2014-07-23 11:02:35.69 Server      SQL Server could not spawn FRunCM thread. Check the SQL Server error log and the Windows event logs for information about possible related problems.


Where to run DBCC CHECKDB and INDEX REBUILD in SQL Server 2012 ?

$
0
0

Hello there,

We have recently upgraded to SQL Server 2012 with two replicas(PRIMARY and SECONDARY). As we all know that, the transactions occurring on PRIMARY replica would replicate to SECONDARY/all replicas as per the option we choose like synchronous and Asynchronous. We are good till here.

All of our backup jobs are running on Secondary replica to reduce IO/CPU consumption on PRIMARY.

Now, my concern is where to put DBCC CHECKDB and INDEX REBUILD jobs? Do we need to run these jobs on both replicas or running on primary replica is good enough. I believe, In 2012, both databases have their own databases, their own volumes etc. Only transactions can replicate.

How about the maintenance jobs I pointed out. Fixing an error on one replica could fix on others ?

Please help me in understanding this. Thanks in advance.

Hierarical Query Performance

$
0
0

Hi Folks,

I need a quick help from you. I have a hierarical query that is used in the front-end application.

WITH EMP ([EMP_ID],[NAME],  [MANAGER_NAME]  ,[MANAGER_ID], [CHGS]) AS 

(   SELECT [EMP_ID],[NAME],[MANAGER_NAME]  ,[MANAGER_ID], [CHGS]  FROM EMPLOYEE
 WHERE [MANAGER_ID]=101 or [EMP_ID]=101 and  BILLDATE  BETWEEN '10-APRIL-2013' and '10-MAY-2013'
  UNION all  
SELECT a.[EMP_ID], a.[NAME], a.[MANAGER_NAME]  ,a.[MANAGER_ID], a.[CHGS] FROm EMPLOYEE as a inner  JOIN EMP b ON a.[MANAGER_ID]=b.[EMP_ID]) 

SELECT round(sum(distinct([CHGS]))/100,0) as charges FROM EMP.

In Employee table there were 2000 records and it is taking 6 minutes.

Can you kindly suggest me how to improve the performance of this query. Appreciate your help.

Thanks,

Ven.

SQL 2012 OBJECTSTORE_LOCK_MANAGER

$
0
0

We recently experienced a significant performance degradation on our main TP SQL server (Current primary of SQL2012 - 3 servers in High Availability config)

This was diagnosed to the OBJECTSTORE_LOCK_MANAGER consuming approx. 66% of available memory (40gb) which it would not release.

Running 

DBCC FREESYSTEMCACHE ( 'ALL' )

cleared the problem

Investigating log files has not provided info to determine how this situation occurred. What may have caused OBJECTSTORE_LOCK_MANAGER to reach this state?


hojo

SQL 2005 Server Agent not starting job

$
0
0

Apologies if this question has been asked elsewhere on these forums, I've had a search around and have not been able to find something with the same issues.

Last year I took over management of a SQL server (SQL2005 on a Server 2003 R2 O/S), as part of the expansion of operation the DB server is being used for an agent job was created to take customer information from our web site and, where the customer has selected to be contacted, pass those details to our dialler system, so we can rech our customer ideally within 20 minutes of them interacting with the website.

This job runs daily Monday to Friday from 8am to 4:30pm at 15 minute intervals and once a day at 5pm on Saturday and Sunday(same job with muliple schedules), 3 week ago the Saturday job failed to start, then following week the Sunday job failed to start then last weekend the job failed to start on both Saturday and Sunday. There have been no updates or changes made to the job or the server and the job has run for 6 months with this multiple scehduling without any issues at all.

I have checked through the server event/system/application logs and the SQL logs (that I know of) and can find no evidence of errors that would have an effect on the SQL or SQL Agent operation, I can also find no evidence that the server made an attempt to start the job at all, the application log will normally show an event 12288 and 12289 with the source of SQLISPackage for the start and stop of the job. There is no event start notice shown in the application event log on weekend days the job has failed to start. I've check the Agent service status, as well as all the other SQL services and they are all running as they should be.

Does anyone have any ideas where I should be looking next for the cause of this issue or has anyone ever experienced this before and found a cause?

Many thanks

Stuart.

2012 SP 2 Issue

$
0
0

I have a warehouse that was running perfectly under 2012 SP1, it uses CDC with net enabled on the source tables to do incremental loads into the warehouse.

We migrated the databases over to a new SQL 2012 SP2 build (also later applied the hot fix for index rebuild), we are using SSIS and the CDC components for our integration.

So once we migrated a few of our tables were hanging on the CDC Source component beyond our timeout (around 10 minutes), typical CDC source time is 15 seconds.

I then tested the query output in the sis output in management studio and boom it works in under 15 seconds as expected,

I then did a Perlman on it and captured the real queries from SSIS, and the get_net_changes TVF call was wrapped in an sp_execute call, I copied it out and ran it in a SSMS window and it hangs, so I've eliminated everything but the query engine and how it behaves with sp_executesql, if I modify the sp_Executesql to include option (recompile) the sp_executesql for the TVF works in under 15 seconds as well.

Running a dbcc freeproccache just prior to running sp_executesql has no effect either.

What I'm believing is that either plan cache utilization or the plan being created is so horrid that the query never finishes, I've let ssms run for over 30 minutes and still not got a plan back.

Since I can't change the SSIS component to use option (recompile) nor is option recompile valid in a TVF (inline) as they are currently written, I'm more concerned that the behavior is the sign of a larger problem in the optimizer with SP2.

Any guidance in resolving this would be appreciated, at the moment we are considering downgrading the new box to SP1.

Additional information:

Tables giving us trouble are fairly wide, have fairly large PK (from a JDE system), and are fairly high volume change wise, if there are no records or very low records in the CT tables then the functions still perform fast, they also perform as expected when using the ALL instead of Net option.

Thanks

John


John Gooding

Indenty column values is not correct order, can we reorganize it?

$
0
0

Hi All,

Identity values jumping when inserting new records. Looks like records were created and deleted before. How can I correct it, I know it doesn't impact the application but interested to know if we can correct it.

Thanks


Swapna

Can't remote connect to sql server

$
0
0

I have SQL Sever 2008 R2 on the cluster environment

cluster server name is A
Cluster Node 1 name is A1 (current active one)
Cluster Node2 name is A2

SQL Server name is Ab, default instance, tcp/ip port 1433

I am not able to remote connect to the server. I tried A, A1, Ab and their corresponding IP address, not of them works. Should I change to the SQL Server name to match with the cluster server name? Thanks in advance!


Why does session not release space in TEMPDB after dropping temporary tables?

$
0
0

I'm using sql 2008 r2.

I've noticed when a session creates and populates a temporary table and then drops it, the space in tempdb does NOT get released. I've run into a situation where the same session creates and drops many fairly large temp tables, and eventually I run out of space in the tempdb.

Is there a way to make it release the space in the tempdb without disconnecting the session?

This is fairly easy to demonstrate. In the below code, even though I keep dropping the table, the tempdb space used by the session keeps increasing as reported by sys.dm_db_session_space_usage.

-- create and populate temp table, then drop it
CREATE TABLE #test (x CHAR(8000)) GO INSERT INTO #test VALUES ('x') GO 100 DROP TABLE #test GO

-- How much space are we using now?

SELECT user_objects_alloc_page_count FROM sys.dm_db_session_space_usage WHERE session_id = @@spid GO
-- Create and populate a temp table again
CREATE TABLE #test (x CHAR(8000)) GO INSERT INTO #test VALUES ('x') GO 100 DROP TABLE #test GO
-- Now we are using even MORE space SELECT user_objects_alloc_page_count FROM sys.dm_db_session_space_usage WHERE session_id = @@spid GO
DROP TABLE #test
GO




Chuck

MAXDOP and SQL Server Standard

$
0
0
I have gone through tons of articles and it seems pretty condiluted, Does standard edition limit you to MAXDOP 4? The server i am working on has 12 physical cores 12 hyper-threaded with 2 numa nodes so in reality it should be set to 6. But is setting it to 6 getting overwritten by the edition of standard?

Tlog just record DML ?

$
0
0

Dear:

   I met " 

Msg 3023, Level 16, 

Backup, file manipulation operations (such as ALTER DATABASE ADD FILE) and encryption changes on a database must be serialized. Reissue the statement after the current backup or file manipulation operation is completed.

"

Does it means I can not add new datafile during the database backup is running ?  Since sql server has TLOG , does not

it remember the datafiles changed, right ?  It was too weak.

how to convert float value in hh:mm:ss format

$
0
0

Hi Everyone,

I have a requirement that we have time in hours like 21.52 hrs and we want to convert it into hh:mm:ss format

Please anyone suggest me..

Thanks 

A job I have seen was running since 11 hours but in history its duration is 48 minutes only

$
0
0

SQL Server agent 2008 :

A job I have seen was running since 11 hours but in history its duration is 48 minutes only.is It possible.


Thanks

Database Design

$
0
0

Hi all,
I am going to work in new project where I have to design oltp database from scratch.
The project will be 24/7 and there will be huge records.

I have already a server which is already running another project in itself I have to design new DB in same server

Server Configuration
__________________________
64 CPU,
64GB RAM,
Windows sever 2008 r2 Enterprise
SQL server 2008 r2 Standard


Question is : Can Anyone provide Best Practice for implementing New DB
eg(Memory,disksize,files,index,schema,sp,views,maintananceplan,configvalues)<o:p></o:p>

Thanks,
Imran kazi<o:p></o:p>


Excel Connection

$
0
0

Hi,

When I create an SQL connection from my workstation within an Excel file, other users are unable to refresh the data.

Error Message:

            “[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified”

The connection string being:

DRIVER=SQL Server Native Client 10.0;

SERVER=SQLSERVER;

UID=*ME*;

Trusted_Connection=Yes;

APP=Microsoft Office 2010;

WSID=0347;

But they are able to refresh the data if I create the connection from their own workstation.

The connection string being:

DRIVER=SQL Server Native Client 10.0;

SERVER=SQLSERVER;

UID=*OTHERUSER*;

Trusted_Connection=Yes;

APP=Microsoft Office 2010;

WSID=0348;

I can refresh any connection from my workstation regardless of who created it.


I need all users to be able to refresh files that I have created from my workstation.

Presumably the issue is the SQL Server credentials, but if someone is able to confirm this and offer a solution I’d be most grateful.



Custom File Extension for Microsoft Access Text Driver (*.txt, *.csv)

$
0
0

I'm trying to use a custom file extension for the Microsoft Access Text Driver (*.txt, *.csv) driver.

I have updated the FileExtns registry to have my new extension.

When I issue the following it does not work.

select[NoName] fromopenrowset('MSDASQL'
          
,'Driver={Microsoft Access Text Driver (*.txt, *.csv)};
                DefaultDir=c:\filedir'

          
,'select * from "file.lst"')

If I make the file a .csv it works fine.  However, if it has an extension of not CSV or TXT (in this case .lst, which is in the registry setting) extension it throws the following error and cannot seem to find a solution to it. 

OLE DB provider "MSDASQL" for linked server "(null)" returned message "[Microsoft][ODBC Text Driver] Cannot update. Database or object is read-only.". Msg 7350, Level 16, State 2, Line 1 Cannot get the column information from OLE DB provider "MSDASQL" for linked server "(null)".

In addition, (although I can probably find this elsewhere), I need to have the first line 'BLANK' so that it does not miss data (there is no header row).  Is there  a way to use OPENROWSET without BULK to basically include all rows as data?

Any help is appreciated.

recovery is done in Analysis,Redo, undo phases serially

$
0
0

Hi Team,

As per article

http://blogs.msdn.com/b/psssql/archive/2010/12/29/tracking-database-recovery-progress-using-information-from-dmv.aspx

Since the redo and undo portions can actually happen on different tasks in fast recovery scenarios in Enterprise Edition,you could actually see 2 different session_id’s for the same database recovery process.

But recovery is done in Analysis,Redo, undo phases serially.

Regards


Manish

Can't add AlwaysOn Listener

$
0
0

Hello!

When I'm trying to add an Availabilty group listener I get this error:


The cluster is up and running:


Prestaging Listener name in DNS as described here http://technet.microsoft.com/en-us/library/dn466519.aspx does not help - the error still the same. Our DNS servers do not experience any issues... What could be the cause of this???

Thank you in advance,

Michael

Can't add AlwaysOn replica

$
0
0

Hello!

I'm trying to add an AlwaysOn replica - db server Guest2 (Windows Server 2012R2 + SQL 2014 Ent.) - to the AlwaysOn group  with a contained DB and getting the following error:


I can't understand should I explicitly set any permissions on an endpoint for this procedure to succeed given that both SQL servers (Guest1 and Guest2) are members of the same domain?

Thank you in advance,

Michael


SmallDateTime Conversion Issue, Linked Servers & Remote Update Vs. Remote Query

$
0
0

Afternoon all, unsure if this exactly the right spot for this but here goes anyway:
I noticed an issue where my smalldatetime fields were being rounded down instead of up when converting from datetime.

The circumstance which this happens under is when running an update across a linked server while updating other columns that require some form of conversion or contain a variable. Straight away I will say this is in SQL 2005 and I don't know if this bug persists today, so what I am really asking is, does this still happen in later versions?

Table Definition:
CREATE TABLE [aDatabase].[dbo].aTempTable(
 [record_id] INT NOT NULL,
 [record_datetime] SMALLDATETIME NULL,
 [record_text] VARCHAR(200) NULL
)
INSERT INTO aTempTable ([record_id],[record_datetime]) VALUES (1, getdate())

The following sql results in the correct smalldatetime value appearing in the table:
UPDATE [LINKED_SERVER].[aDatabase].[dbo].aTempTable
 SET [record_text] = 'Literal Text'
 , [record_datetime] = '2014-07-24 17:15:38.330'
 WHERE [record_id] = 1
The correct value is '2014-07-25 17:16:00' as 38 seconds should round up to the next minute.

When running the following sql, the incorrectly rounded down version of the date is stored:
DECLARE @SOMETEXT VARCHAR(20)
SET @SOMETEXT = 'Dynamic Text'
UPDATE [LINKED_SERVER].[aDatabase].[dbo].aTempTable
 SET [record_text] = @SOMETEXT
 , [record_datetime] = '2014-07-24 17:15:38.330'
 WHERE [record_id] = 1
This query results in '2014-07-25 17:15:00' being stored, incorrectly.

The difference I see between the two queries is that the first causes a Remote Query to be executed by SQL and the second a Remote Update

Query 1:
  |--Remote Query(SOURCE:(LINKED_SERVER), QUERY:(UPDATE "aDatabase"."dbo"."aTempTable" set "record_text" = 'Literal Text',"record_datetime" = convert(datetime, '2014-07-24T17:15:38.330')  WHERE "record_id"=(1)))

Query 2:
  |--Remote Update(SOURCE:(####), OBJECT:("aDatabase"."dbo"."aTempTable"), SET:([LINKED_SERVER].[aDatabase].[dbo].[aTempTable].[record_text] = [Expr1003],[LINKED_SERVER].[aDatabase].[dbo].[aTempTable].[record_datetime] = [Expr1004]))
       |--Compute Scalar(DEFINE:([Expr1003]=CONVERT_IMPLICIT(varchar(200),[@SOMETEXT],0), [Expr1004]='2014-07-24 17:15:38.330'))
            |--Table Spool
                 |--Filter(WHERE:([LINKED_SERVER].[aDatabase].[dbo].[aTempTable].[record_id]=(1)))
                      |--Remote Scan(SOURCE:(####), OBJECT:("aDatabase"."dbo"."aTempTable"))

Anyone care to weigh in on this? As it is SQL 2005 I am just going to perform a workaround in my query that will drop the seconds before saving the field (as in this instance I actually wanted to round down - I just didn't expect it to! And don't wish to rely on a bug/undocumented behaviour)
A big if, but IF I get the chance I will check this on a more recent version of SQL server.

Regards, Dave

Viewing all 12963 articles
Browse latest View live


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