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

Cannot start SQL Server Service Broker on Database Could not start Service Broker for database id: 13

$
0
0

Dear Team,

I am getting below error in event log

Cannot start SQL Server Service Broker on Database Could not start Service Broker for database id: 13

could you please help me to understand what does the above error mean and how can we resolve it.

Appreciate your input.

Regards

ChetanV


[MSSQL2005Std 64-bit] - EXECUTE sys.xp_logininfo - Error

$
0
0

HEllo All.

I have 4 MS SQL 2005 Std EN 64-bit servers SQL Server processes and Agent Processes are working as domain user. The same for all servers end services.

But only on one server error occurs.

When I am trying to launch the Job - error appear:

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

I can ommit the error, when as Job Owner I choose non domain account - but this is only bypass the problem, not solve.

I found, that error is called from sys.xp_logininfo function.

If I call function as:

EXECUTE sys.xp_logininfo 'DOMAIN\Marek'
 - Error occurs.

If I call as:

EXECUTE sys.xp_logininfo 'DOMAIN\marek'
 - login name with lower letters - all is OK.

It seems, the function is case sensitive. I cannot change Job Owner to the lower letter - after I close window OK button and open again upper letter appears in the field.

On other 3 servers, with the same configuration, all is OK.

Is anybody who can help me?

Regards

Marek

SQL Server Standard Edition - Memory Question

$
0
0

We have a SQL 2012 Instance Standard Edition. I know Standard Edition supports only 64 GB of RAM. But with 112 GB RAM on the server, I set the max server memory as 96 GB and the memory usage on the server is about 100 GB, with SQL using up the 96 GB. If Standard supports only 64 GB, how come my SQL is using 96 GB?

Thanks

Satya

WMIEventProviderNotificationQueue is filling up space in msdb database

$
0
0

Hi All,

I setup SQL audit and created SQL Alerts (for WMI events I enabled service broker on MSDB database andWMIEventProviderNotificationQueue is created behind and is holding all messages related toAUDIT_DATABASE_OBJECT_MANAGEMENT_EVENT ) on servers to monitor SQL audit not touched. Now I am seeing the msdb is filling up with message_queue_xxxxxxxx object(WMIEventProviderNotificationQueue). I found out this caused because of WAITFOR (RECEIVE message_body FROM WMIEventProviderNotificationQueue), TIMEOUT 5000not running wherever this issue occurred.

So why WAITFOR (RECEIVE message_body FROM WMIEventProviderNotificationQueue), TIMEOUT 5000 is not running. How to fix this problem?

server details:

SQL version: sql server 2012 EE SP2

windows: windows 2012 R2

vmware

Thanks in advance.

Brahma


------------------------ Brahma http://brahmarao.tech.officelive.com http://nani1211.info/sql

SQL Server 2012 - Linked Server - Error: 10054 - OLE DB provider "SQLCLIN11" - for linked server - unable to establish connection

$
0
0

I am trying to establish a linked server between SQL Server 2012 (11.0.5613) and SQL Server 2012 (11.0.6020). I am getting the below error message:

TITLE: Microsoft SQL Server Management Studio
------------------------------

The test connection to the linked server failed.

------------------------------
ADDITIONAL INFORMATION:

An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)

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

TCP Provider: An existing connection was forcibly closed by the remote host.

OLE DB provider "SQLNCLI11" for linked server "###.###.###.##" returned message "Client unable to establish connection". (Microsoft SQL Server, Error: 10054)

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


An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)

------------------------------
Program Location:

   at Microsoft.SqlServer.Management.Common.ServerConnection.ExecuteNonQuery(String sqlCommand, ExecutionTypes executionType)
   at Microsoft.SqlServer.Management.Smo.ExecutionManager.ExecuteNonQuery(String cmd)
   at Microsoft.SqlServer.Management.Smo.LinkedServer.TestConnection()
   at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.LinkedServerConnectionTest.Invoke()

===================================

TCP Provider: An existing connection was forcibly closed by the remote host.

OLE DB provider "SQLNCLI11" for linked server "###.###.###.##" returned message "Client unable to establish connection". (.Net SqlClient Data Provider)

Server Name: Server NAME\SQL Instance
Error Number: 10054
Severity: 16
State: 1

------------------------------
Program Location:

   at Microsoft.SqlServer.Management.Common.ConnectionManager.ExecuteTSql(ExecuteTSqlAction action, Object execObject, DataSet fillDataSet, Boolean catchException)
   at Microsoft.SqlServer.Management.Common.ServerConnection.ExecuteNonQuery(String sqlCommand, ExecutionTypes executionType)

Unable to open physical file - Operating system error 5: 5(error not found) Microsoft SQL Server: Error 5120

$
0
0

I am trying to attach a database to SQL 2005. This database has not previously been attached. I have only just installed SQL.

 

I get the following message: Unable to open physical file "C:\ArrowSQL\Arr@Data\Arrow_data.mdf" Operating system error 5: "5(error not found)" (Microsoft SQL Server: Error 5120)".

 

I have loaded SQL and the database fiel and directory with the same user acccount which is a local adminstrator ont hsi machine. I have checked that I have read/write access to the file.

 

The machine runs Windows Vista Business. SQL has SP 2 loaded.

 

What causes this?

SQL Server service not started after reboot even when set to Atomatic

$
0
0

Hi,

I am installing sql server 2014 by bundling in installshield. It is installed successfully but the service is not starting after reboot.

Below is the command line parameters used.

/Q /HIDECONSOLE /ACTION="Install" /SECURITYMODE=SQL /SAPWD="DMSUser@123" /INSTANCENAME="DMSSERVER" /IACCEPTSQLSERVERLICENSETERMS="True" /FEATURES="SQLENGINE,Replication" /SQLSVCACCOUNT="NT AUTHORITY\NETWORK SERVICE"   /TCPENABLED="1" /NPENABLED="1" /SQLSVCSTARTUPTYPE="Automatic" /SQLSYSADMINACCOUNTS="BUILTIN\ADMINISTRATORS" /BROWSERSVCSTARTUPTYPE="Disabled" /SKIPRULES=RebootRequiredCheck

Regards,

Arif Shaikh


cannot drop the view 'XXX' because it does not exist or you do not have permission

$
0
0

We migrated our servers from 2005 to 2014, User is able to delete it in the 2005 server But in 2014 we are getting the error as do not have permission or does not exits We have given to same permissions and even he is a system admin.In our application side they are not able to drop the view the application users are connecting through a user in our database he has all the permissions and he is sysyadmin

view: username.viewname

username is the schema name

In our db side I am able to drop it

drop view username.viewname

but at our application side its not working

in 2005 it worked properly


Opened my website database in Management Studio--now my website cannot log in

$
0
0

My new data-intensive website uses SQL Server 2005 Express.  It has been working fine for weeks so I know that my connection string is correct.  A few days ago I downloaded SQL Server 2005 Express Management Studio and made a slight adjustment to one of the views in the database.  Since then the website has been unable to log in to the database.

I am getting this error message:  "cannot open database <name> requested by the login.  The login failed.  Login failed for user 'NT AUTHORITY\NETWORK SERVICE'."  I do not have a user account with that name.

It is possible that Management Studio is not the cause of the problem--I also copied some slightly modified pages into my website on the same day.  However I have replaced most or all of the pages with the ones that were previously working.


LouatMonaco

two-field index semantics, indexed versus included

$
0
0

We have a piece of code, a statement in an SP, that is sporadically misbehaving - instead of running in 0.2 seconds it gets a bad plan and runs in 80 seconds.  Does this whether or not we hang an option(recompile) on it. It involves a couple of smallish (typically well under 1000 row) temp tables joined to some larger perm tables.

Several very similar statements seem to run fine 100% of the time.

One small difference in the problem case is that the central perm table had a slightly different index for the one that misbehaves.

The other cases/statements each have an index that covers two fields, "on (xid, aid)", both simple integer identity pks for related tables.

The one that misbehaves had an index on one field and the other included, "on (yid) include (aid)".

I would have thought this just fine, maybe even preferable - but judging on the evidence, perhaps not.

So here's the (maybe) interesting part, xid and yid are nullable - and are null 90% of the time.  aid is not null.

Is there some semantic difference to this, that if the first index field is nullable then it suddenly matters a lot if the second field is indexed versus included?

Thanks,

Josh

sql server 2008 stored procedure select one table and get selected table's column description from another table

$
0
0

Dear All,

    Good Day! I am MS Visual Studio 2008 (Visual C#) and MS SQL Server Management Studio 2008.

In this i have to generate a report.  In this my C# code is below.

cn.open();  //to opren the remote server connection
                 cmd = new SqlCommand("dbo.GetReport", cn);
                 cmd.CommandType = CommandType.StoredProcedure;
                 cmd.Parameters.AddWithValue("@fldStnName", SqlDbType.VarChar).Value = txtRshwavrpt.Text.Trim();
                 cmd.Parameters.AddWithValue("@fldFrmDtEpoch", SqlDbType.BigInt).Value = frmDateEP;
                 cmd.Parameters.AddWithValue("@fldToDtEpoch", SqlDbType.BigInt).Value = toDateEP;
                 cmd.Parameters.AddWithValue("@fldShiftName", SqlDbType.VarChar).Value = txtRsltSft.Text.Trim();

                 using (SqlDataAdapter adpt = new SqlDataAdapter(cmd))
                 {
                     DataSet ds = new DataSet();
                     adpt.Fill(ds);

                     gridGroupingControl1.DataSource = ds;

                 }

                 //cmd.ExecuteNonQuery();
                 cmd.Dispose();

In SQL server i am using stored procedure to get report. Normally to get report i am using the following query.

IF @fldStnName='tAerator' BEGIN SELECT * FROM [itcdb].[dbo].[tAerator] WHERE fldepochts>=@fldFrmDtEpoch AND fldepochts<=@fldToDtEpoch ORDER BY fldepochts DESC END

By this above query i can adapt that particular to gridgroupcontrol view. But while i am showing in grid view that instead of selected (tAerator) table's column i want to show description of column from another table. Normally use with condition in query. But this below query not working. How to do it. Can you please help me to do this. 

SELECT [itcdb].[dbo].[tValidation].[tLblText] FROM [itcdb].[dbo].[tValidation] WHERE [itcdb].INFORMATION_SCHEMA.COLUMNS = [itcdb].[dbo].[tValidation].[tFName] 

    


Thanks & Regards Sasi ................. Go Green

FILESTREAM error at server startup

$
0
0

When one of our SQL Server instances starts up I am getting the following errors in the log:

07/04/2016 08:21:59 FILESTREAM: effective level = 0, configured level = 2, file system access share name = 'MSSQLSERVER'.
07/04/2016 08:21:59 FILESTREAM feature could not be initialized. The Windows Administrator must enable FILESTREAM on the instance using Configuration Manager before enabling through sp_configure.
07/04/2016 08:21:59 Error: 5597, Severity: 16, State: 2.

However the impacted SQL Server service has the configuration:

If I subsequently try to enable this within SQL Server I get the error:

Prior to this problem, the most recent restart of SQL Server had the following message in the SQL errorlog:

05/04/2016 01:04:33 FILESTREAM: effective level = 2 (remote access enabled), configured level = 2, file system access share name = 'MSSQLSERVER'.

and everything worked fine.

For additional information, these databases are participating in an AlwaysOn Availability Group however the non-FILESTREAM databases have all started successfully.

Can anyone assist?

Thanks for your help.

Sql Server 2008 R2, table with Image cloumn consuming 380 GB while actual value is aroung 4 GB

$
0
0

Hi All,

We have a table with image column and its consuming 380 GB storage. We tried to dump the data to a new table or file its just consuming 4 GB.

Below is what we did to dump the table to a file.

EXEC master..xp_cmdshell 'bcp "select Content from tablename " queryout "D:\tmp\tmp.dat" -T -c'

Any lead or suggestion why its consuming so much space?

Thanks,

-SreejitG

Cannot send mails to mail server. (The operation has timed out.)

$
0
0

HI Everyone,

  IF anyone faces this issue with Database mail  on SQL 2012 SP3? it used to work till yesterday and all of sudden stopped receiving mail alerts from SQL and found this. 

The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 1 (2016-04-03T17:32:25). Exception Message: Cannot send mails to mail server. (The operation has timed out.).
)

Any help or workaround is greatly appreciated. 

Thanks


Please Mark As Answer if it is helpful. \\Aim To Inspire Rather to Teach

SCOM 2012 and MS SQL Server

$
0
0

Hello Expert ..

the SCOM always send  Alert: SQL 2008 DB Average Wait Time is too high and actually couldn't find out what this alert means or what related to and when I check SQL everything seems normal..

any help what does this mean and should I pay any attention to this

Thanks


Problem to connection

$
0
0
Hi,
I get error
Server Error in '/Start3' Application.


Cannot open database "web_schema" requested by the login. The login failed.
Login failed for user 'ws_login'.


Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.


Exception Details: System.Data.SqlClient.SqlException: Cannot open database "web_schema" requested by the login. The login failed.
Login failed for user 'ws_login'.


Source Error:


An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.


Stack Trace:



[SqlException (0x80131904): Cannot open database "web_schema" requested by the login. The login failed.
Login failed for user 'ws_login'.]
   System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) +6568558
   System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) +717
   System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) +4515
   System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +84
   System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK) +53
   System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, SecureString newSecurePassword, Boolean ignoreSniOpenTimeout, TimeoutTimer timeout, Boolean withFailover) +368
   System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(ServerInfo serverInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString connectionOptions, SqlCredential credential, TimeoutTimer timeout) +6597311
   System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(TimeoutTimer timeout, SqlConnectionString connectionOptions, SqlCredential credential, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance) +6597891
   System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, SqlCredential credential, Object providerInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions, SessionData reconnectSessionData) +942
   System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions) +1162
   System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnectionPool pool, DbConnection owningObject, DbConnectionOptions options, DbConnectionPoolKey poolKey, DbConnectionOptions userOptions) +72
   System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection) +6601145
   System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection) +103
   System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection) +2102
   System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection) +116
   System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection) +1079
   System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions) +6605639
   System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource`1 retry) +233
   System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry) +278
   System.Data.SqlClient.SqlConnection.Open() +239
   Start._Default.refresh_ddlist() +691
   Start._Default.Page_Load(Object sender, EventArgs e) +135
   System.Web.UI.Control.LoadRecursive() +71
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3178


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.3428

using this

<add name="Mssqlconn2" connectionString="Data Source=WIN-O3CHI1MHE5D\SS2012EXPR;Initial Catalog=web_schema;Integrated Security=False;User ID=ws_login;Password=????" providerName="System.Data.SqlClient"/>

within Web.config, while by the same login and password, I can login the database by SSMS. Why?


Many Thanks & Best Regards, Hua Min

SQL Server after upgrade from Win7 to Win10

$
0
0

After upgrade to windows 10 the SQL server process cannot start.

In logs I hvae message:

"Cannot use file 'C:\Program Files\Microsoft SQL Server\MSSQL10_50.SQLEXPRESS\MSSQL\DATA\master.mdf' because it was originally formatted with sector size 4096 and is now on a volume with sector size 3072. Move the file to a volume with a sector size that is the same as or smaller than the original sector size"

It was SQL Server Express version

I was reinstall using SQL Server 2016 but I still have the same error (Error code: 0x84B40002) with same as above message in logs.

KA

SQL 2000 - Any option to find query history? Need execuse to shut down old server

$
0
0

We have an old SQL 2000 server that at some point, just stopped being used, or at least we think so.  Im running a profiler trace now to see what shows up, but since this is 2000, I cant use dm_exec_sql_text to see any statement history, and from what I recall, this kind of information really isnt kept anywhere with this version.  I also looked at the error logs and hardly anything showed up in the last year or more that wasnt "system event noise".

My "redneck" solution = shut it down and see who complains :)

Any other suggestions to look for "user activity"

Once the backup completed Disk I/O error occurred - SQLServerLogMgr::LogWriter: Operating system error 1117 encountered.

$
0
0

Hi I'm using windows server 2012 R2 with SQL server 2012 enterprise. I have this server from AWS. Today got the Disk I/O error so many times. But I found that whenever the backup is done it has occurred.
SQL server error Log:
SQLServerLogMgr::LogWriter: Operating system error 1117(The request could not be performed because of an I/O device error.) encountered.
Write error during log flush.

Windows event log:
The IO operation at logical block address 0x5b8b00 for Disk 3 was retried.
The system failed to flush data to the transaction log. Corruption may occur in VolumeId: :F, DeviceName: \Device\HarddiskVolume5. (The I/O device reported an I/O error.)
Help he to fix this permanently

FlushCache:clean up and I/O requests taking longer

$
0
0
Recently lot of messages gets logged in sql server as

12:01 -> SQL Server has encountered  x occurrence(s) of I/O requests taking longer than 15 seconds to complete on file

12:00 PM -> FlushCache: cleaned up bufs with writes in ms (avoided new dirty bufs) for db


I understand that the flush cache will be logged if it cross the  checkpoint interval,
but does I/O request taking longer to complete relates to Flushcache cleanup?

because at the time of I/O request taking longer complete I did not see any heavy query running, Also want to know does alwayson can be responsible for this ? as noted there is no delay in AOAG dashboard(Synchronized)

Best Regards Moug

Viewing all 15264 articles
Browse latest View live


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