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

Dynamics CRM 365 Server Installation

$
0
0
Hi everybody,
I want to install Dynamics CRM 365 using an alias SQL Server so that my Dynamics connects to the DB on another server.
When I use the alias, the server on which I install Dynamics is not able to find the server on which the DB is located. (When I use the non server and not the alias everything works)
Do you have a solution please.

H.B


Error in creating backup directory using Ola Hallengren

$
0
0

I am getting the following error after the backup job running, when Ola is creating the directory it gives space between P-GYMDTSU1$P-GYMDTSU1 and \DAM (P-GYMDTSU1$P-GYMDTSU1 \DAM) and because of this the job failed and it is throwing an error 'the system can't find the path, I have uninstalled and reinstalled the Ola script reconfigured the job, I couldn't be successful. But when I take the backup manually it works fine since it has got the right backup path. but from the sql agent job I am getting the following error, if any one who can face this issue please help. 

Command: DECLARE @ReturnCode int EXECUTE @ReturnCode = [master].dbo.xp_create_subdir N'\\RDGS.local\backups\DBBackups\Prod\P-GYMDTSU1$P-GYMDTSU1 \DAM\FULL' IF @ReturnCode <> 0 RAISERROR('Error creating directory.', 16, 1)
Msg 22048, Level 16, State 1, Line 0
xp_create_subdir() returned error 3, 'The system cannot find the path specified.'
Msg 50000, Level 16, State 1, Line 1
Error creating directory.

Can SQL docker windows image running on a Linux machine ?

$
0
0
Can SQL docker windows image running on a Linux machine ?

The remote copy of database 'Mirroring_Demo' doesn't exist.

$
0
0

Steps I followed to setup Database mirroring were:

1 I took a full and transactional backup the database that i wanted ti mirror on the principal database and restore the full and transactional backup in the mirror server WITH NORECOVERY MODE. And then the database in the restoring mode. However, the mirror didn't go through with the following error message:

The remote copy of database "Mirroring_Demo" does not exist. Check the database name and reissue the command. Error Number: 1448

Would you please help me out!



Execution Plan For A function

$
0
0

Hi All,

I am running follow SQL to view the execution plan for a function. But it does not show up

Also, Is there a DMV which can tell me how many times the execution plan for the function was used. 


SELECT  deqp.query_plan,
dest.text,
SUBSTRING(dest.text, (deqs.statement_start_offset / 2) + 1,
(deqs.statement_end_offset - deqs.statement_start_offset)
/ 2 + 1) AS actualstatement
FROM    sys.dm_exec_query_stats AS deqs
CROSS APPLY sys.dm_exec_query_plan(deqs.plan_handle) AS deqp
CROSS APPLY sys.dm_exec_sql_text(deqs.sql_handle) AS dest
WHERE   deqp.objectid = OBJECT_ID('dbo.FN_GetAllItems');

TIA

Internal vs external Fragmentation

$
0
0

Which one is the internal and external fragmentation ?

new SQL instance name name is not showing after changing the named instance name.

$
0
0

HI All,

i have changed sql named instance name by using below query.

sp_dropserver'Server Name\old_Instance_name'
    go
    sp_addserver'ServerName\New Instance Name','local'

go

however when i querying select@@servername it showing new name only.

but when i trying to connect with new name its not connecting but still able to connect with old name.

if i am using new name with port number i can able to connect instance. in configuration manager

also i can see old name only. is there any thing we need to change the server.

please suggest.

Thanks

Raghavendra


Thanks & Regards Raghavendra Petla

MSSQLSERVER Service Stops Automatically After Restarting

$
0
0

Whether I reboot the server or simply stop/restart the MSSQLSERVICE service, I have the same problem. The sequence of events is:

  1. Stop MSSQLSERVER service
  2. Start MSSQLSERVER service
  3. Starting up database XXXXXX
  4. Clearing tempdb database
  5. Error 1205, Severity 13, State 35
  6. Transaction (Process ID 9) was deadlocked on lock resources with another process and has been chosen...
  7. Could not create tempdb.  You may not have enough disk space.
  8. SQL Server shutdown has been initiated

Then the server shuts down normally.  After maybe the 8th or 9th attempt at starting the service, it comes up normally and all is well.

There is 110GB of disk space free on the server.  The server is 2014-SP3.  I have multiple servers that I manage and this one server is the only one that this occurs on.  Suggestions?

James


James


SA password changed --Login failed for user 'sa'. Reason: Password did not match that for the login provided. [CLIENT: ]

$
0
0

We changed SA password.   Then every minute from SQL logs and application logs, we can Login failed for user 'sa'  Reason: Password did not match that for the login provided. [CLIENT: <named pipe>] 

Platform: Window 2008 R2; SQL Server 2008R2 SP2, Enterprise, Mix mode, Dedicated data server

We don's embed SA password in any 3rd party applications.  Most application use NT authentication or have their own SQL account to make connection to the SQL Server.   We can't find where the error come from.  Please help how we resolve the issue. 

Description:
Login failed for user 'sa'. Reason: Password did not match that for the login provided. [CLIENT: <named pipe>]

Log Name:      Application
Source:        MSSQLSERVER
Date:          6/8/2013 7:21:01 AM
Event ID:      18456
Task Category: Logon
Level:         Information
Keywords:      Classic,Audit Failure
User:          N/A
Computer:      servername.domain.com
Description:
Login failed for user 'sa'. Reason: Password did not match that for the login provided. [CLIENT: <named pipe>]
Event Xml:
<Event xmlns="">
  <System>
    <Provider Name="MSSQLSERVER" />
    <EventID Qualifiers="49152">18456</EventID>
    <Level>0</Level>
    <Task>4</Task>
    <Keywords>0x90000000000000</Keywords>
    <TimeCreated SystemTime="2013-06-08T14:21:01.000000000Z" />
    <EventRecordID>335450</EventRecordID>
    <Channel>Application</Channel>
    <Computer>servername.domain.com</Computer>
    <Security />
  </System>
  <EventData>
    <Data>sa</Data>
    <Data> Reason: Password did not match that for the login provided.</Data>
    <Data> [CLIENT: &lt;named pipe&gt;]</Data>
    <Binary>184800000E0000000B0000005000530042004300530051004C004400450056000000070000006D00610073007400650072000000</Binary>
  </EventData>

In Bytes

0000: 18 48 00 00 0E 00 00 00   .H......
0008: 0B 00 00 00 53 00 53 00   ....S.S.
0010: 42 00 43 00 53 00 51 00   B.C.S.Q.
0018: 4C 00 44 00 45 00 56 00   L.D.E.V.
0020: 00 00 07 00 00 00 6D 00   ......m.
0028: 61 00 73 00 74 00 65 00   a.s.t.e.
0030: 72 00 00 00               r...

SQL Server DDL Events

$
0
0

Hello,

Several years back, I had written a DDL Server trigger to capture certain DDL Events.   Here are some of them:

                DDL_FUNCTION_EVENTS, 
                DDL_USER_EVENTS,
                DDL_ROLE_EVENTS,       
                DDL_AUTHORIZATION_DATABASE_EVENTS,
                DDL_GDR_DATABASE_EVENTS  

Since it has been several years, I can't recall exactly what specific actions would cause the above trigger to fire.  I can guess by looking at the name.  I have been Googling around and I can't find information about them.  I found this page

https://docs.microsoft.com/en-us/sql/relational-databases/triggers/ddl-event-groups?view=sql-server-ver15

but it doesn't explain to me the specific actions that correspond to each of the events.

Does anyone know where I can find more details about DDL Events or DDL Event Groups?

Thanks much

gMSA operating SQL Services as designed, but throwing tons of audit failures in OS Event Security Log

$
0
0

We have been using gMSA's for a bit now and haven't had any issues (that we knew of). Everything on the surface appears to be operating as designed (i.e.- services start and restart without fail, application front ends aren't complaining at all about DB connections, etc.), but our Windows Event Logs under Security have been steadily piling up with Audit Failures for this gMSA while it appears to call the sqlservr.exe on the server. The gMSA has all required permissions in the OS & SQL Server 2016 (& in my opinion, probably more than it requires for the time being). We haven't really noticed or paid too close attention to it previously because it wasn't effecting the apps or the DB itself, but now we have Operations Manager spun up and it is running out of space due the shear amount it is collecting from this box and few others in a like setup. Our AD guy, myself, and the Microsoft SCOM PFE are drawing blanks on what the issue can be. So I ask you all if someone can point us in the right direction. Below is the Windows Security event log for this issue, with obvious redaction of some info for security.

##-- Begin Snippet --##

An account failed to log on.

Subject:

                Security ID:                           <Domain\gmsa-001$>

                Account Name:                    <gmsa-001$>

                Account Domain:                 <domain>

                Logon ID:                               0x1BE6C

Logon Type:                                          3

Account For Which Logon Failed:

                Security ID:                            NULL SID

                Account Name:                    

                Account Domain:                 

Failure Information:

                Failure Reason:                      Unknown user name or bad password.

                Status:                                    0xC000006D

                Sub Status:                            0xC0000064

Process Information:

                Caller Process ID:  0xf6c

                Caller Process Name:          <\Program Files\Microsoft SQL Server\MSSQL13.(named instance)\MSSQL\Binn\sqlservr.exe

Network Information:

                Workstation Name:             <server/vm name>

                Source Network Address:    -

                Source Port:                          -

Detailed Authentication Information:

                Logon Process:                     Authz  

                Authentication Package:     Kerberos

                Transited Services:                -

                Package Name (NTLM only):              -

                Key Length:                           0

This event is generated when a logon request fails. It is generated on the computer where access was attempted.

The Subject fields indicate the account on the local system which requested the logon. This is most commonly a service such as the Server service, or a local process such as Winlogon.exe or Services.exe.

The Logon Type field indicates the kind of logon that was requested. The most common types are 2 (interactive) and 3 (network).

The Process Information fields indicate which account and process on the system requested the logon.

The Network Information fields indicate where a remote logon request originated. Workstation name is not always available and may be left blank in some cases.

The authentication information fields provide detailed information about this specific logon request.

                - Transited services indicate which intermediate services have participated in this logon request.

                - Package name indicates which sub-protocol was used among the NTLM protocols.

                - Key length indicates the length of the generated session key. This will be 0 if no session key was requested.

##-- End Snippet --##

Default virutal account

$
0
0

In SQL 2017 Suppose I am using domain account for SQL server and SQL agent startup account. but there are some default virtual account created in the Database instance

Can disable or delete ?

SQL Server Cluster is offline but AG works

$
0
0

I am trying to understand the AG scenario that is configured in the past and is working currently. 

This is a multi subnet scenario but the cluster was configured with just 1 IP address. Probably a mistake that was made in the past. But surprisingly everything works just fine. 

I have a cluster clust-prod that is configured with 1 static IP address say 10.x.x.x

I have 2 nodes from 2 different subnets

Node1: arz-db1 

Node2: kty-db2 

I have an AG ProdAGdbmarketing setup. I have listener DBprodlstn1 configured with 2 static IPS

ListIP1: 10.y.y.y

ListIP2 : 10.z.z.z

Currently the cluster in Failover cluster manager says offline & IP address says offline

Cluster Core Resources:

Name: clust-prod Offline

  IP Address 10.x.x.x Offline

Ping clust-prod (cluster name) does not work

But surprisingly ping of Listener name, Availability group works just fine. I tried a manual fail over to Node Node2: kty-db2 which works fine. Then failing back to Node1 also works fine. 


I would think, the cluster is setup incorrectly to begin with. I should have been setup with 2 IPs instead of one. 

Although the cluster shows offline, how can AG, listener, failing over work? 

Could anyone figure out how this works.



Physical connection is not usable

$
0
0

One of our stores is often getting the following error: "A transport-level error has occurred when sending the request to the server. (provider: Session Provider, error: 19 - Physical connection is not usable"

The connection type is IDSL and may be intermittent but, I have not seen this error before.  Any idea how to trace it and how to fix it?  I am using connection pooling - FYI.

Exception Type: System.OutOfMemoryException on DatabaseMail service

$
0
0

Hi,

We have a Windows Server 2016 machine in Azure running SQL Server 2016. The server sends around 80 emails a day using DatabaseMail. These are all basically text or HTML emails with no attachments. They are very small emails.

Three days ago we started getting error events in event log related to DatabaseMail. Below are the four events that get raised in order.

Error Event 1:

Database Engine Instance=xxxxxxx;Mail PID=2744;Error Message:

1) Exception Information
===================
Exception Type: System.OutOfMemoryException
Message: Array dimensions exceeded supported range.
Data: System.Collections.ListDictionaryInternal
TargetSite: Boolean TryReadPlpUnicodeChars(Char[] ByRef, Int32, Int32, System.Data.SqlClient.TdsParserStateObject, Int32 ByRef)
HelpLink: NULL
Source: System.Data
HResult: -2147024882


StackTrace Information
===================
   at System.Data.SqlClient.TdsParser.TryReadPlpUnicodeChars(Char[]& buff, Int32 offst, Int32 len, TdsParserStateObject stateObj, Int32& totalCharsRead)
   at System.Data.SqlClient.TdsParser.TryReadSqlStringValue(SqlBuffer value, Byte type, Int32 length, Encoding encoding, Boolean isPlp, TdsParserStateObject stateObj)
   at System.Data.SqlClient.TdsParser.TryReadSqlValue(SqlBuffer value, SqlMetaDataPriv md, Int32 length, TdsParserStateObject stateObj, SqlCommandColumnEncryptionSetting columnEncryptionOverride, String columnName)
   at System.Data.SqlClient.SqlDataReader.TryReadColumnInternal(Int32 i, Boolean readHeaderOnly)
   at System.Data.SqlClient.SqlDataReader.TryReadColumn(Int32 i, Boolean setTimeout, Boolean allowPartiallyReadColumn)
   at System.Data.SqlClient.SqlDataReader.GetValueInternal(Int32 i)
   at System.Data.SqlClient.SqlDataReader.GetValue(Int32 i)
   at Microsoft.SqlServer.Management.SqlIMail.Server.DataAccess.DataAccessAdapter.GetSendMailItem(SqlDataReader itemReader)
   at Microsoft.SqlServer.Management.SqlIMail.Server.Controller.CommandFactory.CreateSendMailCommand(DBSession dbSession)
   at Microsoft.SqlServer.Management.SqlIMail.Server.Controller.CommandRunner.Run(DBSession db)
   at Microsoft.SqlServer.Management.SqlIMail.IMailProcess.ThreadCallBack.MailOperation(Object obj)

Error Event 2:

Database Engine Instance=xxxxxx;Mail PID=2744;Error Message:The connection is not open.

Error Event 3:

Database Engine Instance=xxxx;Mail PID=2744;Error Message:

1) Exception Information
===================
Exception Type: Microsoft.SqlServer.Management.SqlIMail.Server.Common.BaseException
Message: The connection is not open.
Data: System.Collections.ListDictionaryInternal
TargetSite: Void ValidateConnection()
HelpLink: NULL
Source: DatabaseMailEngine
HResult: -2146232832

StackTrace Information
===================
   at Microsoft.SqlServer.Management.SqlIMail.Server.DataAccess.ConnectionManager.ValidateConnection()
   at Microsoft.SqlServer.Management.SqlIMail.Server.DataAccess.ConnectionManager.ValidateConnectionAndTransaction()
   at Microsoft.SqlServer.Management.SqlIMail.Server.DataAccess.ConnectionManager.CommitTransaction()
   at Microsoft.SqlServer.Management.SqlIMail.IMailProcess.ThreadCallBack.MailOperation(Object obj)

Error Event 4:

Database Engine Instance=xxxxx;Mail PID=2744;Error Message:The connection is not open.

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

This problem started about 3 days ago. Little has changed on this server. We can still send emails, it's just creating these events. However yesterday and the day before the databasemail service stopped and i had to restart it manually. I have also never seen this happen in all my years. I have two other similar servers without this issue.

I set up a loop that sent an email every 15 minutes yesterday and tested whether the service had automatically stopped and since i have done this the mail service has continued to run even though it's generating these errors. The fact that the service stopped two days in a row is what lead me to find these events.

I have noticed that the events are raised when the DatabaseMail server cycles i.e. "DatabaseMail process is started" step occurs at the same time that the error are being geneated.

I have no idea what is going on here. I have read everything i can find, i have restarted the server, their is plenty of memory, no big emails are trying to be sent.

My next step is to turn off the looping email and see if the service stops again. I am looking for assistance on what i can check next.

Regards.

Simon.


DBA activities

$
0
0

Good morning Experts,

Could you please let me know the activities that DBA need to perform in this month. We are expecting 15K exams by this month end.

 


Kiran

SQL Server 2016 , SSMS 18.3 Compatibility and Database diagram

$
0
0

I've installed SQL Server 2016 SP2 with SSMS 18.4 (in windows server 2016 standard)

SSMS work fine (i can create database, users , linked server , database diagram ..) but the issues when i reopen my database diagram , ssms crash and restart itself

in Windows event viwer , this is the error :

Nom de l’application défaillante Ssms.exe, version : 2017.140.17289.0, horodatage : 0x5befcf0a
Nom du module défaillant : DataDesigners.dll, version : 2017.140.17289.0, horodatage : 0x5befcf68
Code d’exception : 0xc0000005
Décalage d’erreur : 0x0001d347
ID du processus défaillant : 0x3624
Heure de début de l’application défaillante : 0x01d5f78a921fb192
Chemin d’accès de l’application défaillante : C:\Program Files (x86)\Microsoft SQL Server\140\Tools\Binn\ManagementStudio\Ssms.exe
Chemin d’accès du module défaillant: C:\Program Files (x86)\Microsoft SQL Server\140\Tools\Binn\ManagementStudio\Tools\VDT\DataDesigners.dll
ID de rapport : ed8de36b-f28c-40fa-9335-f143035ceec3
Nom complet du package défaillant : 
ID de l’application relative au package défaillant : 

Strat using Filestream on an existing table containing files

$
0
0

Hello,

I have a table in my database that contains files (files are stored directly on the database) and i noticed a degradation of database performance so i decided to start using FileStream.

My question is how can i change the existing column containing files to use Filestream? what will happen to the existing data and files?

Another question, while using Filestream if i want to set the value of the column containing the file to NULL on a specific row, will the corresponding file in the fileSystem will be deleted automatically? 

PS: I use SQL server 2016 version

Thanks for your reply,

with regards,

[Help]: Peformance SQL Server CPU High!

$
0
0

Hi All!

Today, I see Peformance SQL Server CPU high(~80%), RAM: 35%

After Restart SQL Services CPU SQL Server <10%.

Pls help me, check reason why CPU SQL Server higher

Thank!


SQL Server alwayson data / log files move.

$
0
0

we are moving data/ log files from one drive to another , my question is.. do i've to keep same drive letters on primary database as that of mirrored database? Can i have my primary database moved to new drives and secondary databases remain on the same drives?

Viewing all 12963 articles
Browse latest View live


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