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

Accidentally set SQL Server Max memory too low

$
0
0

I accidentally set my sql server maximum memory too low  (32MB).   After I changed it, no one could log on.  We got an error message "Shared Memory Provider: No process is on the other end of the pipe".

I stopped and ended task all SQLServer related services.  I still could not login into the db again.  I tried to start sqlserver with:

sqlservr.exe -m

And try to logged in using "c:\sqlcmd -A" but I could not log on to change maximum memory.   Then I tried to start with

sqlservr.exe -f

I still could not log in.  It complaint that only one adminstrator can log in.

 

After two hours of frustration, I started the database again using

sqlservr.exe -f -m  

This did the trick.  I was able to login again using "sqlcmd -A"  on a separate session and reset the maximum memory to 4GB:

sp_configure 'show advanced options', 1;

GO

RECONFIGURE;

GO

sp_configure 'max server memory', 4096;

GO

RECONFIGURE;

GO

 

Question: Is there any way to change max memory in the Registry?

 

Thanks

 


Log_reuse_wait_desc is stacked to XTP_CHECKPOINT

$
0
0

I have a database on sql 2016 where usage of in memory tables took place. The Log_reuse_wait_desc is stacked to XTP_CHECKPOINT and this cause various issues:

1. Restore operations cannot be complete (WAIT_XTP_TASK_SHUTDOWN wait) and the only way to create a new database from a backup is to bring offline the sql server /copy files and use attach instead of restore

2. The transaction log is not truncated and is increased over the time (my data file is 919128 and the transaction log is 2519608 and used 99%).

3. Database management operations like offline cannot be completed due to WAIT_XTP_TASK_SHUTDOWN wait.

Database is on simple recovery model and the version of the sql is SP2-CU12) (KB4536648).

I have try to take a full backup and a transaction log backup but with no success regarding the transaction log truncation. 

The client was unable to reuse a session with SPID 443, which had been reset for connection pooling. The failure ID is 46. This error may have been caused by an earlier operation failing. Check the error logs for failed operations immediately before this

$
0
0

Hi Everyone

Since upgrading from SQL Server 2016 to Microsoft SQL Server 2019 (RTM-CU4) (KB4548597) - 15.0.4033.1 

I have been seeing a lot of the following errors in the logfile.

The client was unable to reuse a session with SPID 443, which had been reset for connection pooling. The failure ID is 46. This error may have been caused by an earlier operation failing. Check the error logs for failed operations immediately before this error message.

Login failed for user xxxxxx'. Reason: Failed to open the database 'xxxxx' configured in the login object while revalidating the login on the connection. [CLIENT: xxx.xxx.xx.xxx]

Please can someone help to find a resolution.

Regards

Clive

Cannot drop the user because it does not exist or you do not have permission

$
0
0
I am getting this message for some users when executing sp_revokedbaccess procedure for database users. Users I am trying to remove are selected from sys.database_principals with type = S, W or G (sql server or windows users) and are not system users (principal_id > 4). I checked if the user I can't remove owns any schema and it is not the case. The user is not an orphan user also. I am comparing a user that was removed and a user that gave me this error and can't find any differences. I do see the user in the database security folder so it does exist and has a corresponding server login (no sid mismatch). Also I am a sysadmin on a server level and should have permissions. I am stock with this last couple days and can't solve it. I am not a DBA, just a developer and may be there is something else i am missing. Please help.

Linked Server Set-Up and Access

$
0
0

What am I doing wrong here?

I am correctly executing EXEC master.dbo.sp_addlinkedserver and I indeed see my Linked Server defined.

However when I drill down on Linked Servers\(Linked Server Name)\Catalogs, I am NOT seeing the Databases.

We set-up the Linked Server to use SQL Server Authentication and a defined ServiceAccount and made sure that the ServiceAccount was granted access on the Linked Server and the specific Databases it would need to access and even verified that by signing onto the Linked Server directly using the ServiceAccount.

Now the Versions are different.

The Source Server, the Server I am trying to Link FROM is SQL Server Version...

Microsoft SQL Server 2014 (SP3-GDR) (KB4532095) - 12.0.6118.4 (X64)   Dec 12 2019 21:46:15   Copyright (c) Microsoft Corporation  Enterprise Edition: Core-based Licensing (64-bit) on Windows NT 6.3 <X64> (Build 9600: ) (Hypervisor) 

The Linked Server we are trying to access TO set-up and access is SQL Server Version...

Microsoft SQL Server 2016 (SP1-GDR) (KB4505219) - 13.0.4259.0 (X64)   Jun 15 2019 19:20:12   Copyright (c) Microsoft Corporation  Developer Edition (64-bit) on Windows Server 2012 R2 Datacenter 6.3 <X64> (Build 9600: ) (Hypervisor) 

Could that have anything to do with it??

Thanks for your review and am hopeful for a reply.

Issue to link to DB

$
0
0

Hi,

Any help to error below?

ADOConnection::Connect, Description: Error when connecting to database. Microsoft OLE DB Provider for SQL Server Cannot open database "hMailserver" requested by the login. The login failed


Many Thanks & Best Regards, Hua Min

SQL Server 2016- Latest Service Pack/CU update

$
0
0

Hi,

We are using SQL Server 2016 Enterprise Edition base version. We want to upgrade it to latest Service pack or Cumulative update.

I want to know which is the latest service Pack or Cumulative update for our version.

As per below site I found SP2 is latest service pack.

https://sqlserverbuilds.blogspot.com/

But as per below site CU13 update is latest.

https://support.microsoft.com/en-us/help/3177312/sql-server-2016-build-versions

Can we install directly CU13 in our SQL Server 2016 or we have to install SP2 first then have to apply CU13?

DBCC shrinkdatabase not able to release allocated unused space

$
0
0

I am trying to release allocated free space from my database. Cuurent state of my database 



I was trying to run DBCC SHRINKDATABASE (N'DBName') command and it will end up with following message. I want to reduce this allocatedUnused Space to zero(almost). Any help appropriated. 

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

DBCC SHRINKDATABASE: Page 1:6914608 could not be moved because it is an off-row persistent version store page. Page holdup reason: Unknown. Page holdup timestamp: -1.


Let us TRY this |


My Blog :: http://quest4gen.blogspot.com/


different sql installation in one cluster

$
0
0

Hello,

I am going to migrate all sql server production databases to SQL Server 2017 and SQL Server 2019 (this is recommendation from Application team) to the new hardware.

I want to know if i can install SQL Server 2017 and SQL server 2019 under  one cluster on the new server?

Thanks






Reusable assets on MS SQL Server for DBA

$
0
0

Hi

Can you please share few examples for creating reusable assets on MS SQL Server for DBA.

Reusable assets: - tasks that are common and repeated - maximize productivity through asset reuse.

Thanks in advance.

Group by and row_number

$
0
0

Suppose I am having a table

col1      col2     col3

a          a1         testing_a1_1

a          a1         testing_a1_2

a          a2         testing_a2_1

a          a2         testing_a2_2

How can I make a query to have

colnew  col1      col2                  col3

 1              a          a1         testing_a1_1

1               a          a1         testing_a1_2

2               a          a2         testing_a2_1

 2               a          a2         testing_a2_2

is it possible to use row_number() over to do it ?

sql Severity 020 alert - A read operation on a large object failed

$
0
0

Hi 

getting this alert from SQL box.   but i cannot track which application/query/SP  creates this.   

( None of db’s are using “Read Un-Committed” ,    but someone is using no-lock hint in query's )


Severity 020:

Error: 7886, Severity: 20, A read operation on a large object failed while sending data to the client. A common cause for this is if the application is running in READ UNCOMMITTED isolation level. This connection will be terminated.

Database 'mssqlsystemresource' is being recovered.

$
0
0

Hi Team,

I was facing performance issue with my sql server 2012 database enterprise edition.It was very slow to extent that i was not able to make any connection.So I stopped and started the SQL Service .But,during stopping it hung in "change pending " state.So,i stopped it by using "Shutdown with NOWAIT" command and it worked for me.Now, after successfully starting services,i am not able to connect any database and getting below error:

TITLE: Connect to Server Cannot connect to "servername".ADDITIONAL INFORMATION: An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)

--Database 'mssqlsystemresource' is being recovered. Waiting until recovery is finished. (Microsoft SQL Server, Error: 922)

any help on this will be much appreciated

Viewing the past blocked sessions

$
0
0

Hello All,

Is there any way to get the list of blocked session in past some time ( say 2 hours / 5 hours).

Note : i know this can be achieved via SQL Profiler & Extended events. Any other way 


Please mark this reply as answer if it solved your issue or vote as helpful if it helped so that other forum members can benefit from it

Maintenance Plan Not Deleting Old Backup Files

$
0
0

I have created a maintenance plan on an instance running SQL Server 2008 R2 SP3. The first step of the maintenance plan is a Maintenance Cleanup Task that is supposed to delete files older than 7 days. The task is "succeeding" but the files are not being deleted.

I have already checked the usual causes of this:

  1. I am NOT using ".bak" in the File Extension box
  2. Both the SQL Server service account and the SQL Server Agent service account have "Full Control" on the backup folder
  3. The files are NOT in a first-level subfolder
  4. The file extension of the backup files is the same case as the extension I specified in the File Extension box

Does anyone know of any other possible reasons why the files are not being deleted?



Export from SQL Server to Excel

$
0
0

I need to run a query each month in SQL Server and send the result in Excel format.  Are there any ways to do it automatically?


i would like to abstract a database qualifier

$
0
0

hi we run 2014 std.  we have 2 dbs (staging and warehouse) that are always on the same server and we often reference both in certain procs.  the procs are always on staging.

in order to have multiple environments set up for development purposes,  i'll often combine the tables from each (staging and warehouse) in one local db, call it x.  and simulate real life by not qualifying queries targeted for staging and prefixing queries going to warehouse with x.dbo....

for my testing to be more valid i'd like a way for the x to be "mappable" by a parameter or something as i move thru the dev, qa and prod environments so that the x is "soft replaced" by the word warehouse.

is there a way to do this?

Step-By-Step Set-up of a SQL Server Sandbox

$
0
0

We would like to create a SQL Server Sandbox in order to test T-SQL and SQL Server Stored Procedures and proposing new Indexes, etc..

In the past we have down this using Temporary Tables...creating those Temporary Tables to simulate a Production Table and then doing an INSERT-SELECT to load the Temporary Table and then creating Indexes on the Temporary Table to simulate Production and the Optimizer and how it would access it.

Is there somewhere we can reference as to the Step-By-Step approach of creating a SQL Server Sandbox? And then, I'm assuming, we can use SQL Server Management Studio then to copy and sync Production Tables to our newly created Sandbox to test out some things.

Thanks for your review and am hopeful for a reply.

Question on Azure jobs/ SSIS Packages.

$
0
0

Greetings. Not sure where else to post this so if it needs to be moved feel free. 

So I'm going the down the road of creating jobs in Azure SQL DB elastic pools. Seems doable, but a bit of a pain. Specifically, in the past I've created a few jobs on an on-prem box, that used a linked server to do stuff in an Azure SQL DB. It's been a while, but if I recall it seemed like a decent approach. 

Are there any pros or cons to doing one over the other? My jobs will be mainly to run SSIS Packages, and some DBA maintenance stuff. 

Related -- what's about storing SSIS in Data Factory for scheduling purposes? The alternative would be to store in an on-prem SSIS server I already own. Why one over the other?

Thanks!


Thanks in advance! ChrisRDBA


Thanks in advance! ChrisRDBA

SQLCMD connect to sql server error SSL provider

$
0
0

When I connecting sql server using SQLCMD -S servername -E

then It throw the following error.


while telnet to 1433 is possible and also the SQL Server didn't enforce connection encryption . Any idea ?

Viewing all 12963 articles
Browse latest View live


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