Vpišite se z Microsoftovim
Vpišite se ali ustvarite račun.
Pozdravljeni,
Izberite drug račun.
Imate več računov
Izberite račun, s katerim se želite vpisati.
angleščina
Ta članek žal ni na voljo v vašem jeziku.

Symptoms

When you run a query that inserts the output of sys.database_scoped_configurations to a table variable or temporary table in Microsoft SQL Server 2016, and then select from that table variable or temporary table as seen in the example below, you may notice that there is only one entry for each database.

DROP TABLE IF EXISTS #h

CREATE TABLE #h(configuration_id INT, name sysname, value SQL_VARIANT, value_for_secondary SQL_VARIANT)

INSERT INTO #h(configuration_id, name, value,value_for_secondary)

SELECT * FROM sys.database_scoped_configurations D'

SELECT * FROM #h H

or

DECLARE @database_scoped_configurations TABLE(x INT);

INSERT INTO @database_scoped_configurations

SELECT configuration_id

FROM sys.database_scoped_configurations;

SELECT * FROM @database_scoped_configurations

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

To work around this issue, you can add a TOP clause on the SELECT part of your insert to get the correct result. Here is an example:

DECLARE @database_scoped_configurations TABLE(x INT);

INSERT INTO @database_scoped_configurations

SELECT TOP 100 configuration_id

FROM sys.database_scoped_configurations

References

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

Ali potrebujete dodatno pomoč?

Ali želite več možnosti?

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.

Vam je bila informacija v pomoč?

Kaj je vplivalo na vašo izkušnjo?
Če pritisnete »Pošlji«, bomo vaše povratne informacije uporabili za izboljšanje Microsoftovih izdelkov in storitev. Vaš skrbnik za IT bo lahko zbiral te podatke. Izjavi o zasebnosti.

Zahvaljujemo se vam za povratne informacije.

×