Einträge von AZConAdmin

Azure SQL DB – SQL User verwalten / anlegen

jeweils einzeln ausführen. use master CREATE LOGIN ETLWrite WITH PASSWORD=’lpsigl31!#A!a’; GO use master CREATE  USER ETLWrite FROM LOGIN ETLWrite GO use Datawarehouse CREATE  USER ETLWrite FROM LOGIN ETLWrite GO   use Datawarehouse exec sp_addrolemember ‘db_owner’, ‘ETLWrite’;

Abfrage für Sortierung einer Datenbank nach Tabellengröße

SELECT      t.name AS TableName,     s.name AS SchemaName,     p.rows,     SUM(a.total_pages) * 8 AS TotalSpaceKB,      CAST(ROUND(((SUM(a.total_pages) * 8) / 1024.00), 2) AS NUMERIC(36, 2)) AS TotalSpaceMB,     SUM(a.used_pages) * 8 AS UsedSpaceKB,      CAST(ROUND(((SUM(a.used_pages) * 8) / 1024.00), 2) AS NUMERIC(36, 2)) AS UsedSpaceMB,      (SUM(a.total_pages) – SUM(a.used_pages)) * 8 AS UnusedSpaceKB,     CAST(ROUND(((SUM(a.total_pages) – SUM(a.used_pages)) * 8) / 1024.00, 2) AS NUMERIC(36, 2)) AS UnusedSpaceMB FROM      sys.tables t INNER JOIN           sys.indexes i ON t.object_id = i.object_id INNER JOIN      sys.partitions p ON i.object_id = p.object_id AND i.index_id = p.index_id INNER JOIN      sys.allocation_units a ON p.partition_id = a.container_id LEFT OUTER JOIN      sys.schemas s ON t.schema_id = s.schema_id WHERE      t.name NOT LIKE ‘dt%’      AND t.is_ms_shipped = 0     AND i.object_id > 255  GROUP BY      t.name, s.name, p.rows ORDER BY      TotalSpaceMB DESC, t.name

SQL Abfragen auf Cognos ContentStore

Abfrage nach Berichtseigentümer: SELECT    o.cmid AS Berichtsid,   Names.NAME AS Berichtsname,   n2.REFCMID AS EigentümerID,   Pr33.NAME AS Eigentümername,   Pr33.USERID AS EigentümerKennung   FROM   [Cognos_CS_CMOBJECTS] o   LEFT JOIN [Cognos_CS_CMREFNOORD2] n2 on o.cmid= n2.CMID   LEFT JOIN [Cognos_CS_CMOBJPROPS33] Pr33 on n2.REFCMID=Pr33.CMID   LEFT JOIN [Cognos_CS_CMOBJNAMES] Names on o.CMID = Names.CMID   where […]

Schema.ini Varianten

[DownloadcodesEinloesung.txt] Format=Delimited(;) CharacterSet=ANSI ColNameHeader = true TextDelimiter=none   ——————— [adcellexport.txt] Format=Delimited(,) DecimalSymbol=. CharacterSet=ANSI ColNameHeader = true   Col1 = Datum Text Col2 = Bearbeitungsdatum Text Col3 = Status Text Col4 = “automatische Freigabe” Text Col5 = ProgrammId DOUBLE Col6 = Programm Text Col7 = WerbemittelId DOUBLE Col8 = Referenz DOUBLE Col9 = Referer Text Col10 […]

Datenreihenfolge über Zeilen hinweg prüfen

Anforderung: Prüfen, ob ein Wert (VK) einer geringeren Auflage teurer ist als einer höheren Auflage. [‘X 01 Test’:{‘v3’}]=N:DIMIX (‘D Auflage P010’,!D Auflage P010); [‘X 01 Test’:{‘v4’}]=N:DB (‘x 01 Test’,ATTRS(‘D Auflage P010′,!D Auflage P010 ,’vor’) , !D Format P010, ‘VK’ ); [‘X 01 Test’:{‘v6’}]=N:IF(DB (‘x 01 Test’, !D Auflage P010, !D Format P010, ‘v4’ )<>0, DB […]

SSIS DB Abfrage Laufzeit

SELECT TOP 10 [statistics_id]       ,[execution_id]       ,[executable_id]       ,[execution_path]       ,[start_time]       ,[end_time]       ,[execution_duration]  ,[execution_duration]/60000 As Delta       ,[execution_result]       ,[execution_value]   FROM [SSISDB].[catalog].[executable_statistics]     where year(start_time) = 2023    — and execution_path like ‘%orderitem%’  and […]

TM1 Drillthrough ODBC

Umsetzung nur im Architect:    1. Drillprozess erstellen mit SQL Statement:  z.B. SELECT          [KostenstellenNr]  ,[KostenartenNr]  ,[CCMonat] AS Periode       ,[LinkedKreditorNr] AS KreditorNr       ,[BelegNr]       ,[Belegart]       ,[Belegdatum]       ,[Buchungstext1]        ,[Buchungstext2]          ,[KredString]     […]