Blog

sql server disk space usage by database

sql server disk space used by database.
You need to run following query on each database to get information by tables and its size on disk with number of rows.

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 
    SCHEMANAME,TotalSpaceMB DESC, t.Name

Cognos error QE-DEF-0285 The logon failed.

QE-DEF-0285 The logon failed.

Microsoft SQL Server (Native Client) / Compatible

when you get above error while you are testing cognos service – Mostly this could be because you didnt install SQL server native client on your machine.

to check if it is installed or not: Type for odbc. Open odbc (32 bit) ad odbc(64 bit). go to drivers tab. Check if ‘SQl server Native client’ is available. If not then install SQL server native client.

file name – sqlncli

sql server table name by number of rows

following code will give you schema name.table name and number of rows in that table at sql server.

SELECT
      QUOTENAME(SCHEMA_NAME(sOBJ.schema_id)) + '.' + QUOTENAME(sOBJ.name) AS [TableName]
      , SUM(sPTN.Rows) AS [RowCount]
FROM 
      sys.objects AS sOBJ
      INNER JOIN sys.partitions AS sPTN
            ON sOBJ.object_id = sPTN.object_id
WHERE
      sOBJ.type = 'U'
      AND sOBJ.is_ms_shipped = 0x0
      AND index_id < 2 -- 0:Heap, 1:Clustered

GROUP BY 
      sOBJ.schema_id
      , sOBJ.name
ORDER BY 2 --[TableName]
GO

ibm i2 documentation and learning

 

ibm i2 ibase

few referral documents:

Click to access ibm_i2_ibase_white_paper.pdf

i2 ibm documentation:
https://www.ibm.com/support/knowledgecenter/SSXVXZ_2.3.0/com.ibm.i2.landing.doc/eia_welcome.html
https://www.ibm.com/support/knowledgecenter/SSXVXZ_2.3.0/com.ibm.i2.landing.doc/enterprise_insight_analysis.html

i2 ibase learning
https://www.ibm.com/services/learning/ites.wss/zz-en?pageType=search#(cc%3A”%2Cfilters%3A()%2CnumberOfResults%3A’20’%2CpageNumber%3A1%2CpubEntIdentifier%3A”%2Cquery%3Aibase%2Csorting%3Arelevance%2F%2Fasc%2Ctype%3Aall%2CviewMode%3A0)

ibm i2 ibase
https://www.securitylearningacademy.com/local/navigator/index.php?level=spaa04&courseTypes=Video%20Course

IBM i2 EIA Lab enviroment:
https://www.securitylearningacademy.com/mod/hvp/view.php?id=6513#
https://labs.edu.ihost.com/sec9769.a1ba8c1383f7@1f80433ec391a3e43.b2b.foo/0eed

ibm i2 videos

https://www.ibm.com/support/pages/i2-youtube-video-index
https://www.youtube.com/user/IBMSecuritySupport/playlists?sort=dd&shelf_id=13&view=50

 

 

Cognos Visualization error

error:

The web request failed.

Details:

404 – Not Found
URL: http://cognosserver/ibmcognos/bi/common/palettes.json

Solution:

On your webserver pallettes.json needs to be copied from install location analytics\webcontent\bi\common  to the analytics\webcontent\bi\common folder

Key words for search:

Source:

404 – Not Found – palettes.json