I have a script that needs to create a temp table and in that temp table I create an index.
I noticed in some of my servers, the script would go on forever, and when checking from a different session what is currently running there was no clear message available.
after cancelling the query I get this message:
Message:
Cannot enable compression for object '#RADHE_sp_getsubscriptions__________________________________________________________________________________________0000000A923A'.
Only SQL Server Enterprise Edition supports compression.
Error: 7738
Severity: 16
this is the part of the script that is generating this error message:
IF object_id('TEMPDB..#RADHE_sp_getsubscriptions') IS NOT NULL
DROP TABLE #RADHE_sp_getsubscriptions
create table #RADHE_sp_getsubscriptions (
publisher sysname NOT NULL,
publisher_db sysname NOT NULL,
publication sysname NOT NULL,
replication_type int,
subscription_type int,
last_updated datetime,
subscriberd_db sysname,
update_mode int,
last_sync_status int,
last_sync_summary nvarchar(4000),
last_sync_time datetime)
CREATE CLUSTERED INDEX I_RADHE_sp_getsubscriptions
ON #RADHE_sp_getsubscriptions (publisher,Publisher_db,publication)
WITH ( PAD_INDEX = OFF
, FILLFACTOR = 100
, SORT_IN_TEMPDB = ON
, IGNORE_DUP_KEY = OFF
, STATISTICS_NORECOMPUTE = OFF
, ONLINE = OFF
, DATA_COMPRESSION=PAGE
, ALLOW_ROW_LOCKS = ON
, ALLOW_PAGE_LOCKS = ON ) ON [PRIMARY]
Later on this is what I store in this table:
SET NOCOUNT ON
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED
TRUNCATE TABLE #RADHE_sp_getsubscriptions
insert into #RADHE_sp_getsubscriptions
exec sp_MSenumsubscriptions
select * from #RADHE_sp_getsubscriptions
which gives this valuable info:
RAISERROR ('Some error message', 16,1);WAITFOR DELAY '23:59:00'