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

Getting error 1222: "Lock request time out period exceeded" even though LOCK_TIMEOUT is -1

$
0
0

I have a batch job that takes a couple of hours to run. During that time we are seeing a very large number of errors for 1222: "Lock request time out period exceeded" being logged as EXCEPTION by Service Broker event notifications. The LOCK_TIMEOUT is configured as -1, so I am not clear why this would be happening. Any suggestions would be appreciated. SQL Server 2012 SP1.

Thanks,

Ron Rice


Ron Rice


Some strange problem with XA transactions (FInitTranManWithTC)

$
0
0

Good day!

I'm writing application using WildFly 8.2 Application Server that holds it data in MS SQL Server 2012. Sometimes I received errors in my log. This errors contains such messages:

2015-06-24 15:52:33,494 WARN  [org.jboss.jca.core.connectionmanager.listener.TxConnectionListener] (sdsMessageListenerContainer-7) IJ000305: Connection error occured: org.jboss.jca.core.connectionmanager.listener.TxConnectionListener@733537c1[state=NORMAL managed connection=org.jboss.jca.adapters.jdbc.xa.XAManagedConnection@2adf9afe connection handles=0 lastUse=1435143153492 trackByTx=true pool=org.jboss.jca.core.connectionmanager.pool.strategy.OnePool@70e81d5a mcp=SemaphoreArrayListManagedConnectionPool@37ec08e9[pool=someDatasourceDs] xaResource=XAResourceWrapperImpl@319e0228[xaResource=org.jboss.jca.adapters.jdbc.xa.XAManagedConnection@2adf9afe pad=false overrideRmValue=false productName=Microsoft SQL Server productVersion=11.00.3000 jndiName=java:jboss/someDatasourceDs] txSync=null]: javax.transaction.xa.XAException: The function START: failed. The status is: -5. Error: "*** SQLJDBC_XA DTC_ERROR Context: FInitTranManWithTC, state=4, StatusCode:-5 (0xFFFFFFFB) ***"

I set up XA transactions as said in documentation. (Put DLL's to right places, run SQL script, grant roles and so on). At most of time whole system working well, but sometimes this messages flood my log and nothing working.

Can you help me with this problem?

System database increasing

$
0
0
TempDb increased automatically how to solved ?

bcp output is performing an Ascending Sort based on the values of the First Column

$
0
0

Hello Forum

As bcp does not allow for the column names to be included; I have developed a method for providing the columns.

The end result is that two Tables are required for each output; a "ColumnNames" table and the Table that contains the actual data; however the bcp command is sorting the data; can anyone please explain why this is happening?  According to Microsoft, by default bcp will not apply any sorting unless specified.

Here is the command I am using to perform the bcp output: -

SET

@bcpCommand =(select'bcp "SELECT * FROM GPReports.dbo.MIS001_BCPColumnNames UNION  SELECT * FROM GPReports.dbo.voltemp" queryout '+ @FilePath+' -c -t \t -T')


EXEC

master..xp_cmdshell @bcpCommand

This is the bcp topic I referred to  https://msdn.microsoft.com/en-gb/library/ms162802.aspx?f=255&MSPPError=-2147217396


Please click "Mark As Answer" if my post helped. Tony C.

Logon failed for login due to trigger execution

$
0
0

I have a logon trigger on a SQL Server 2008 R2 Express Advanced production database to prevent remote logons. The trigger works fine. 
When I need to connect via my local machine, remotely, I connect via a VPN, can connect with SSMS and do whatever I need.

However, if I use a linked server on my local machine (still connected via VPN), I receive the logon error
Msg 17892, Level 14, State 1, Line 1
Logon failed for login 'sa' due to trigger execution.

The trigger is below and it logs any failures, except for the linked server.

If I disable the trigger, the linked server connects ok.

Could someone explain what is going on and how to work around it?

CREATE TRIGGER [tr_MasterLogon]
   ON  ALL SERVER  WITH EXECUTE AS 'sa'
   FOR LOGON
AS
BEGIN
 DECLARE
  @ClientAddress varchar(48) = (SELECT client_net_address
             FROM sys.dm_exec_connections
             WHERE session_id = @@SPID),
  @Logon sysname = ORIGINAL_LOGIN()
  IF NOT
    (
     @ClientAddress IN('<local machine>','<named pipe>')
     OR @ClientAddress LIKE '192.168%'
    )
   BEGIN
    ROLLBACK
    INSERT INTO Junk.dbo.tblMsgLog
     (Msg, MsgDate)
     VALUES('Login fail for ' + @Logon + ' from address ' + @ClientAddress, GETDATE())
   END
END

Fragmentation %

$
0
0
What is the impact of fragmentation when my tables fragmentation is 99% but page count is 300 only?

Amit kr mishra, IT Consltant

TEMPDB Contention

$
0
0

I am troubleshooting a performance problem, and I suspect that there is TempDB Contention.  I have been unable to prove my theory as when I run some queries that have been identified as showing tempdb contention nothing shows up.

We are currently running SQL Server 2012 SP2 CU1 with 1 datafile and 1 logfile for tempDB.  Both data and log files for tempdb are on separate Luns running Raid 5.  We have 4 cores for each of our SQL Server VMs.  I am looking to add 3 additional datafiles, but I have run into road blocks, due to I have nothing to prove that tempdb is an issue. 

Any assistance would be appreciated.

DJ



sql server 2012 standard edition download link needed

$
0
0

Hi ,

can any one plz share a link to sql server 2012 standard edition 

i cannot see it in microsoft downloads

plz help,

Thanks in advance,

shravan


Single user or Isolation level

$
0
0

Hallo,

For replacing data with the ones from backup(SQL Server database)  I am looking for best practices.

Is there any performance considerations I have to take care whether I go for single user or setting isolation level.

Thank u for your help in advance :-)

Regards

Swingme


AppDomain 19 (database.dbo[runtime].30) is marked for unload due to memory pressure.

$
0
0

HIi All,

In my error log i am getting the follwing error on and off 

AppDomain 19 (databaseName.dbo[runtime].30) is marked for unload due to memory pressure.

May i know what is the root of it 

SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_TYPE = 'VIEW'

$
0
0

SELECT * FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_TYPE = 'VIEW'

hi i run the above query its taking more than 1 and 30 mins but i dont get any resul set.

can any body please  help me in this regards

MEMORYCLERK_XE consuming 30 GB Memory of 100 GB‏

$
0
0
I Have a client production server where we have 128 GB memory and SQL Server max memory is configured to 100 GB. We are facing slowness issue in this server. The PLE seems to be good with 6449. But the top memory consuming component report shows MEMORYCLERK_XE component take approx 30 GB memory. What is the component for? Is it extended event related? The client says they are not running any trace or extended event related feature. Could anyone confirm what is the memory type? Can we clear this cache? thanks Madhu
MCITP, MCTS, MCDBA,MCP

Autogrowth of the *.mdf-file is set to none, a performance problem?

$
0
0
Hi forum,
I was given a sql server. There are some databases where the "old" db-admin (having space problems?) just set the primary *.mdf file autogrowth to  "none", means: only the secondary *.ndf files placed on different drives are growing. My question is: is it a "good thing"? Does it have any inpact at the database performance? SQL-Server needs the *.mdf (even if autogrowth=none) to track down the space-allocation for the *.ndf files?
Thanks for you help
Purclot

SSPI handshake failed with error code 0x80090311

$
0
0

I have a SQl2k8 R2 up and running on a win2k8 R2, I have a domain controller as well with AD 2k8 R2. It works fine but from time to time I receive a dozen of successive alerts like th folowing

DATE/TIME:      11/22/2010 12:19:57 PM

 

DESCRIPTION:  SSPI handshake failed with error code 0x80090311, state 14 while establishing a connection with integrated security; the connection has been closed. Reason: AcceptSecurityContext failed. The Windows error code indicates the cause of failure. [CLIENT: <named pipe>].

 

COMMENT:      (None)

JOB RUN:           (None)

I understand from some threads here that it is an issue related to contacting the AD. In event viewer it is not clear what is casuing this. I have WSS databases, Biztalk server datatbases.....and some other user databases. NO home made applications contact sql server.

 

What is the best route to follow to see who is not being able sometimes and why contacting the AD. I read the thread athttp://blogs.msdn.com/b/sql_protocols/archive/2006/03/23/558651.aspx but it is related to express 2005 and it does not apply to my case.

 

Thanks in advance

 

getting big difference in actual number of records and estimated number of records and Operator used tempdb to spill data during execution with spill level 1

$
0
0

Hi Experts,

 I have come up with one problem, I have some join that returns 1300000 records, I placed the distinct then it returns 555 records. Now I am planing to make this result set as order by, But it causing "Operator used tempdb to spill data during execution with spill level 1" even for the 555 records. My question here is  where SQL server optimizer is missing to know that we have only 555 record need to sort?

  Here I am seeing huge difference between actual number of row and estimated number of rows.

Regards,

Vikas 


Regards Vikas Pathak



Restore Database only with MDF File

$
0
0

Hi Folks,

One of our database came to Restoring mode. I suddenly stop my SQL service and Copied only MDF files again Started SQL service ,unexpectedly i dropped the Database. Now i cant able to attach the database only with my MDF file.

I tried below Scripts but its not help me. All scripts shows same error.

EXEC sp_attach_single_file_db @dbname='PhoenixPolice',
@physname=N'C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\PhoenixPolice.mdf'
GO

CREATE DATABASE PhoenixPolice ON
    (NAME = N'PhoenixPolice',
    FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\PhoenixPolice.mdf')
FOR ATTACH_REBUILD_LOG
GO

CREATE DATABASE phoenixPolice ON (FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\PhoenixPolice.mdf')
FOR ATTACH

All scripts shows below error

File activation failure. The physical file name "F:\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\PhoenixPolice_1.ldf" may be incorrect.
The log cannot be rebuilt because there were open transactions/users when the database was shutdown, no checkpoint occurred to the database, or the database was read-only. This error could occur if the transaction log file was manually deleted or lost due to a hardware or environment failure.
Msg 1813, Level 16, State 2, Line 1
Could not open new database 'PhoenixPolice'. CREATE DATABASE is aborted.

Please Somebody help me to Recover the Database., It very urgent. Hope Some one help me

Thanks

RamKarthik KN



Transaction log backup issues on Always on databases

$
0
0
I am using alwayson on my SQL 2012 databases. I am using ola hallengren scripts for backing up databases. Full & diff db backups work fine, but the log is not getting backed up. The tran log backup job doesn't error out too. Trying to figure out what I may be missing, did any one run into this kind of issue? Thanks.

sqldev

TFS 2013, backup setting failed, error TF400976

$
0
0

Hi there,

 I use TFS admin console to setting backup schedule, during configure, error TF400976 be popup, here is the log

-+-+-+-+-| Granting SQL permission to backup path |+-+-+-+-+-
[Info   @02:26:11.293] Starting Node: SQLBACKUPPERMISSION
[Info   @02:26:11.293] NodePath : Container/Progress/SQLBACKUPPERMISSION
[Info   @02:26:11.293] Grant SQL Server permission to backup files
[Info   @02:26:11.293] Reading backup set information
[Info   @02:26:11.293] Granting SQL Server permission
[Info   @02:26:11.433] Granting account 'NT Service\MSSQLSERVER' permissions to path '\\DBserver\db backup'
[Warning@02:26:11.433] TF400976: SQL Server service account NT Service\MSSQLSERVER does not have the required permissions to create backups on the backup path \\DBserver\db backup
[Info   @02:26:11.433] Node returned: Error
[Error  @02:26:11.433] TF400976: SQL Server service account NT Service\MSSQLSERVER does not have the required permissions to create backups on the backup path \\DBserver\db backup
[Info   @02:26:11.433] Completed GrantSqlPermissionToBackups: Error

-------------------

Seems it is a permission issue. Can someone tell me how to fix it?


Jou Chen

SQL Server Browser

$
0
0

Hi all,

In my server has been installed SQL Server two different versions:
    - Microsoft SQL Server 2008 (RTM) - 10.0.1600.22 (X64)
    - Microsoft SQL Server 2008 R2 (RTM) - 10.50.1600.1 (X64)

I want to know, which version that SQL Server Browser service in running on?


Best regards,
Phea

    

The specified resource type cannot be found - event id 17137

$
0
0

Hi,

We've got these errors appearing 4 at a time every 5 minutes on a new SBS 2008 box.

Log Name:      Application
Source:        MSSQL$MICROSOFT##SSEE
Event ID:      17137
Task Category: (2)
Level:         Information
User:          NETWORK SERVICE

Description:
The description for Event ID 17137 from source MSSQL$MICROSOFT##SSEE cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer.
If the event originated on another computer, the display information had to be saved with the event.
The following information was included with the event:
SharePoint_AdminContent_d4e397f2-a27a-48a0-a628-d25db6672bab
The specified resource type cannot be found in the image file

Anyone have any idea why this may be or how to resolve it ?

Olly

Viewing all 12963 articles
Browse latest View live


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