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

FILESTREAM: failed to connect to kernel driver RsFx0502

$
0
0

Environment is SQL Server 2017. The problem occurs on different installations. 

I describe one of the cases that im investigating:

On a Windows Server are 5 SQL Server Instances installed. All 5 SQL Server instances are configured to use SQL Server Filestreams. The Startup of all 5 Services for the SQL Server Instances are configured on "Automatic"

Usually, when the Windows Server is restarted, for example after Servicepack Installation, all 5 SQL Server Instances start without any problem. SQL Server Log Message: "FILESTREAM: connected to kernel driver RsFx0502. This is an informational message. No user action is required." Everything is alright. 

But in some cases, after a restart ob the Windows Server, 2 of the SQL Server Instances can initialize the FileStreams. But the other 3 SQL Server Instances fail to initialize the Filestream Features:
Error Message: 
FILESTREAM: failed to connect to kernel driver RsFx0502.
<{1038F43D-3391-45F7-B1B3-BADF26459429}>Failed to initialize CFsaShareFilter: Error 0x80070015 (-2147024875)

I can manually restart the 3 SQL Server Instances, and the FileStream Features get initialized. 

Just my guess, is there a timing Problem with the Filestream Feature an the SQL Server Instance Start?
Is it possible to configure a dependency on the Service Start of the SQL Server Instance to wait for the Filestream Services?

My other thought was to configure all SQL Server Instance Services to manual and start the SQL Server Services with the Windows Scheduler using a PowerShell script to delay/time the start of the 5 SQL Server instances and their related Services.

Any advice, suggestion or fix for the problem? 

Best regards
Paolo


Rebuild Master database

Sql Server Agent - Job from MSX\TSX

$
0
0

Hi,

I have many jobs which some of them is used from MSX\TSX  and the others are local jobs but have not etl job (SSIS). I get some locked process when the some jobs run at the same time and the locked process show that executed  command is from
[msdb].[dbo].[sp_ssis_getfolder\sp_ssis_getpackage] . I want to know that I have not any etl job but ssis procedure runs my job. How is work  sp_ssis_getfolder\sp_ssis_getpackage?


SQL2019 -->WHY 4 new system database files are installed : modelmsdbdata.mdf, modelmsdblog.ldf, modelreplicatedmaster.ldf, modelreplicatedmaster.mdf if no new SQL2019 feature installed?

$
0
0
After installing the SQL2019 DEVELOPER edition (RTM-CU3) (KB4538853) - 15.0.4023.6 (X64) ( with the following FEATURES=SQLENGINE,FULLTEXT,CONN,IS) it is noticed that installation is showing 4 new system database files: modelmsdbdata.mdf,
model
msdblog.ldf,
modelreplicatedmaster.ldf,
model
replicatedmaster.mdf,
BUT no such systemDB is displayed in SSMS under system DBs. Can you please advise further?

signing clr assemblies for 2019 migration

$
0
0

Hi, i'm showing the clr warnings from the migration assistant regarding our migration from 2014 to 2019. 

can someone explain at a high level what mitigating this entails and why? is it safe to say that at the time the warning was issued the target 2019 "instance" didnt have one or both of the 2 more vulnerable alternatives set?  is there an easy way to see what those settings are on the source right now?

basically we have 2 assemblies, 3 if you count one that seems to have no dependencies.  clrroutines ->fn_splitstringsclr-> 23 procs.  clrutilities->fn_splitlongstringclr->15 procs.  microsoft.sqlserver.types->no dependencies. 

Assembly '[CLRRoutines]' with PERMISSION_SET = 'Safe' cannot be migrated. For more details, please see: Line 1, Column 1.<p>When CLR Strict Security is enabled, attempting to create an unsigned assembly will cause an error. Use the following steps to create a signed assembly: </p><ol><li>Create a key pair file. For more information, see How to: Create a Public-Private Key Pair.</li><li>Compile the module and sign it using the key file. For more information, see How to: Sign an Assembly with a Strong Name.</li><li>Create an asymmetric key in the master database from the key file 
CREATE ASYMMETRIC KEY MyStrongNameKey FROM FILE = 'C:\MyStrongNameKey.snk'</li><li>Create a login from the asymmetric key 
CREATE LOGIN MyStrongNameKeyLogin FROM ASYMMETRIC KEY MyStrongNameKey</li><li>Grant UNSAFE ASSEMBLY permission to the login 
GRANT UNSAFE ASSEMBLY TO MyStrongNameKeyLogin</li><li>Now users with CREATE ASSEMBLY permissions can create assemblies signed by the key</li></ol>
We recommend signing assemblies by following the steps outlined above. However, you can alternatively do one of the following: <ul><li>Set the Trustworthy Property of the database to ON and grant UNSAFE ASSEMBLY permission to the login that owns the database. This is not recommended because marking a database as Trustworthy can allow malicious assemblies to impact resources outside the database. For more information, see Guidelines for using the TRUSTWORTHY database setting in SQL Server. </li><li>Disable CLR Strict Security by using sp_configure. This is not recommended because assemblies marked SAFE or EXTERNAL_ACCESS may enable elevation of privilege from a database user to a sysadmin.
sp_configure 'show advanced options', 1 
GO 
sp_configure 'clr strict security', 0 
GO 
RECONFIGURE 
GO</li></ol></p>

 


Access to INFORMATION_SCHEMA denied

$
0
0

The login has db_datareader role. This works on 15 other databases, but one issues the following error

Msg 7314, Level 16, State 1, Line 16  The OLE DB provider "SQLNCLI11" for linked server "JCI-LN.JCI.ASTEC.LOCAL" does not contain the table ""ln106"."information_schema"."tables"". The table either does not exist or the current user does not have permissions on that table.

Unable to find MSQLSvc service type while adding servers into service account delegation in AD

$
0
0

HI Experts,

i wanted to add servers into service account delegation but unable to find while adding server in to account delegation.

Could you please suggest how we can find that.




Thanks & Regards Raghavendra Petla

SQL Server 2014 database restored on SQL Sever 2017

$
0
0

I have restored SQL Server 2014 Database on SQL Server 2017.

Please provide answer to following questions : 

1. Will 2014 database be compatible on SQL Server 2017 ?

2. Will the restored database still be able to use all of the the SQL Server 2017 features.



How to start MSSQL server with out model database

$
0
0

Suppose the model database is corrupt , and method to start without it?

seems also using single_user mode (-m) switch still can't start it up .

Can I identify the number of uncommitted changes from a SPID

$
0
0

I'm pretty sure I know the answer to this question, but I'm hoping I'm wrong.

We had an issue last night where a session was updating a table and, consequently, blocking other sessions from accessing it - nothing strange there. The session came from an external system which was processing a number of rows of data in a loop and for each one:

  • passing them off to a third-party application
  • waiting for the result
  • updating the problematic table

What we don't know is whether each loop was being performed as one transaction from a SQL-perspective or whether a COMMIT was occurring after each UPDATE and before the next iteration of the loop. If there was a way I could determine how many uncommitted changes there were on the session I could see if this is increasing.

Is this possible or is there a way I could identify what I'm trying to do without that ability?

N/W latency - lead timeout in SP

$
0
0

Team

We have ServerA (sql engine)  & ServerB (application). both are in same Vnet (N/W).

some times the ping 1433 status from ServerB to ServerA is  more than 1ms  ( 14ms to 25ms).

is this creates any timeout Issue in application?  because some SP getting Timeout sometimes .

Deadlock after setting Single user mode.

$
0
0

We have some scripts that are executed during installation of our application.

One of them is used for setting Database Collation, the other one is used for setting compatibility level. We use the following construction for these scripts:

ALTER DATABASE [DB_NAME] SET SINGLE_USER WITH ROLLBACK IMMEDIATE
GO

ALTER DATABASE [DB_NAME] SET COMPATIBILITY_LEVEL = DB_COMPATIBILITY_LEVEL
-- ALTER DATABASE [DB_NAME] COLLATE 'Collation Name'
GO

ALTER DATABASE [DB_NAME] SET MULTI_USER
GO

The question is:

Is it possible for some background process to get an access after setting single user mode? In this case our script couldn't be executed. I saw this issue and it seems similar, so I decided to ask a question.

You can find it by title on this forum: "Single user mode session lost after backgound processes jump in"

This issue was related to restoring database.

alterdatabase[test-db]set single_user withrollback immediate;--This sql is run using test-dbuse master;restoredatabase[test-db]from database_snapshot ='snapshot_test-db';alterdatabase[test-db]set multi_user;

But I don't fully understand the difference between restoring and altering the database in the single user mode. 

In the first case will be enough to set database offline.

Any help will be appreciated.

Thanks in advance.

How to Partition an existing table by Year

$
0
0

Hello,

I have a sql table in a database which has 15 million rows.  I need to partition this by year. 

Everything from 2018 and above should be in primary. Everything below 2018 should be separated from primary.

Please help with steps on how to do this. I have never done before.

Slow execution of query when using startdatetime

$
0
0

query is running slow in sql server 2017 because datetime parameter was there. The query contains below parameter in where clause. If we removed this "startdatetime" parameter, query is running normal. please why it takes long time for execution with startdatetime parameter.

Parameter:

StartDateTime between '2020-01-01 00:00:00' and '2020-02-25 23:59:59'

Min/Max memory configuration is not working on linux version.

$
0
0

Hi.

We have running SQL server 2017 on CentOS 7 on VM.

@@Version : "Microsoft SQL Server 2017 (RTM-CU19) (KB4535007) - 14.0.3281.6 (X64)  Jan 23 2020 21:00:04   Copyright (C) 2017 Microsoft Corporation  Standard Edition (64-bit) on Linux (CentOS Linux 7 (Core))"

The total physical memory is 5GB on OS.

I set memory.memorylimitmb is 3072 in mssql_conf.

And min/max memoryconfiguration is 2048 in sql server. (sp_configure 'min server memory', '2048' / sp_configure 'max server memory', '2048')

But, "Target Server Memory (KB)" value for sys.dm_os_performance_counters table is 2048MB under. 
It was lowered to below 500MB.

Is not working the Min/Max memory configuration on linux version?


the rsexecutionlog db

$
0
0

Hi , the best i can tell, the rsexecutionlog db i'm seeing on our 2014 db is something that used to be a common choice off the shelf for just what its name implies.  And some sort of off the shelf plumbing in sql kept it updated.  i'm getting the sense its not a homegrown thing.

we are upgrading to 2019 enterprise.  i believe the tool that will be used for the core of the upgrade is a restore.  we'll deploy things like ssis and ssrs separately.  probably sign a couple of assemblies separately.

I understand there are alternatives to using this db but wonder if the community can tell me if it (that db and the tables it seems to offer) will be functional day 1 in 2019?  and will the plumbing i'm assuming exists keep it updated?

we have a couple of reports whose source is that db and we may not be interested in the alternatives (at least right now) depending on the community's answer to this question.

Looking for recommendations on resources to learn SQL Server Internals\ “Under the hood” \ “Engine”

$
0
0
I am experienced SSIS\T-SQL Developer who is looking for recommendations on reliable resources about SQL Server Internals\ "Under the hood" \ "Engine" stuff, for instance reading and understanding execution plans, date storage etc. Preferred media would be online courses \ series of video lectures, if not available then a book on the topic. I preference "from scratch" type of resource because i am pretty sure i have at the moment allot of misconception knowledge on the topic. Just to be clear my knowledge of T-SQL itself is high, as said above I am lacking knowledge on the internals part.

Database '' already exists. Choose a different database name. But it doesn't!

$
0
0

When I try create a database I get:

Msg 1801, Level 16, State 3, Line 1
Database 'XXXX' already exists. Choose a different database name.

I then try drop the database but get:

Msg 3701, Level 11, State 11, Line 8
Cannot drop the database 'XXXX', because it does not exist or you do not have permission.

The database did exist previously. It's not currently listed in sys.databases.
Microsoft SQL Server 2017 (RTM-CU16) (KB4508218) - 14.0.3223.3 (X64)

I've had this before and was able to create the database after restarting SQL but I cannot keep restarting the server.

SQL Server 2005 Memory Usage - Windows Task Manager Mem Usage working set > 2 GB

$
0
0
Greetings SQL Gurus,

Has been experiencing performance issue and as of right now myguess is that it is at the SQL Server\Data tier that the issue is occuring at.

System info:

Microsoft Windows Server 2008 R2 Enterprise
Service Pack 1
Intel(R) Xeon(R) CPU E5504 @ 2.00 GHZ
4.00 GB of RAM
64 bit

Microsoft SQL Server 2005 - 9.00.1399.06 (Intel X86) 
Oct 14 2005 00:33:37 
Copyright (c) 1988-2005 Microsoft Corporation
Standard Edition on Windows NT 6.1 (Build 7601: Service Pack 1)


One thing I noticed is, when we look at Task Manager--&gt; Processes tab --&gt; Mem Usage column shows around 2,5Gb.

Is SQL Server is consuming more than it can use and causing poor performance issue?

Any comments\advise\input will greatly be appreciated.

Thank you,

Chevy

Table Name not as a variable or Dynamic SQL

$
0
0

Hi Guys,

I need to select a table from sys.objects something like, I need to create a view therefore, no Dynamic SQL or table variables

select
*
from
(select 
top 1 Name from
sys.all_objects
where
Name like '%F_Trans_%'
and 
type = 'U'
and Name not like '%Trans_Desc%'
order by Name DESC
) t
Viewing all 10269 articles
Browse latest View live


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