Microsoft로 로그인
로그인하거나 계정을 만듭니다.
안녕하세요.
다른 계정을 선택합니다.
계정이 여러 개 있음
로그인할 계정을 선택합니다.
영어
죄송합니다. 이 문서는 귀하의 언어로 사용할 수 없습니다.

Symptoms

When you run a third-party external language extension that is dependent on another shared library, you may receive an error message.

Library not found error

Status

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

Resolution

This issue is fixed in the following cumulative update for SQL Server:

About cumulative updates for SQL Server:

Each new cumulative update for SQL Server contains all the hotfixes and all the security fixes that were included with the previous cumulative update. Check out the latest cumulative updates for SQL Server:

Workaround

For Windows:

To work around this issue, you should explicitly add either:

  • the path to the dependency libraries if the language extension zip does not contain the dependency library OR

  • the language and extension directories If the language extension zip contains the dependency library in addition to the extension itself

to the system PATH environment variable, so that the dependency libraries can be found.


For example:

Scenario 1:

  1. You have a language extension with a dependency library at location: C:\\Users\\admin\\Documents\\dependency.dll.

  2. The language-extension.zip contains only the languageExtension.dll.

  3. Then, make sure the path to the dependency is added to the system PATH environment variable. For example, C:\\Users\\admin\\Documents.

CREATE EXTERNAL LANGUAGE [mylanguage]

FROM (CONTENT = N'C:\\Users\\admin\\Documents\\language-extension.zip', FILE_NAME = 'languageExtension.dll')

GO

Scenario 2: 

  1. If the language-extension.zip contains both the extension languageExtension.dll and its dependency library - dependency.dll, first find the next language ID starting from 65536 by running the following catalog view in the respective database and adding 1 to the highest installed language ID greater than 65536. For example, for master database, "SELECT * FROM master.sys.external_languages".

  2. Generate the path to the language directory by replacing your instance name, database_id and next_language_id in the following path: C:\\Program Files\\Microsoft SQL Server\\MSSQL15.MSSQLSERVER\\MSSQL\\ExternalLanguages\\<database_id>\\<next language id>.

  3. Then, create the external language as follows:

CREATE EXTERNAL LANGUAGE [mylanguage]

FROM (CONTENT = N'C:\\Users\\admin\\Documents\\language-extension.zip', FILE_NAME = 'languageExtension.dll',

ENVIRONMENT_VARIABLES = N'{"PATH":"C:\\ProgramFiles\\Microsoft SQLServer\\MSSQL15.MSSQLSERVER\\MSSQL\\ExternalLanguages\\1\\65536"}');

GO

For Linux:

There is no fix, and you should always add ${ORIGIN} to the linker rpath option when you compile the extensions.

For example: set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-rpath,'${ORIGIN}'")

References

Learn about the terminology that Microsoft uses to describe software updates.

도움이 더 필요하세요?

더 많은 옵션을 원하세요?

Explore subscription benefits, browse training courses, learn how to secure your device, and more.

Communities help you ask and answer questions, give feedback, and hear from experts with rich knowledge.

이 정보가 유용한가요?

사용 경험에 어떠한 영향을 주었나요?
제출을 누르면 피드백이 Microsoft 제품과 서비스를 개선하는 데 사용됩니다. IT 관리자는 이 데이터를 수집할 수 있습니다. 개인정보처리방침

의견 주셔서 감사합니다!

×