Oracle Managed Driver

1). Launch Visual Studio and install OMD – Click Tools > NuGet Package Manager > Package Manager Console – Type: Install-Package Oracle.ManagedDataAccess – Locate the dll Oracle.ManagedDataAccess.dll and copy it …

TSQL Determine Table Size

Determine the size of database tables in a MSSQL Server Database. 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647SELECT     DB_NAME() AS DatabaseNase ,     GETDATE() AS DateCreated ,     TableName,     Rows …

PL/SQL Determine Table Size

Original Source Link 1234567891011121314151617181920212223242526272829303132COLUMN TABLE_NAME FORMAT A32 COLUMN OBJECT_NAME FORMAT A32 COLUMN OWNER FORMAT A10 SELECT    owner, table_name, TRUNC(sum(bytes)/1024/1024) Meg FROM (SELECT segment_name table_name, owner, bytes  FROM dba_segments  WHERE …

TSQL is decimal an INT

Determine if a decimal number can be converted to an INT without any loss of precision. Check if either of the rightmost two digits are non-zero 123substring(convert(varchar(10), a.DebitAmount), len(convert(varchar(10), a.DebitAmount)) …

TSQL List all Columns in a Database

1234567891011121314151617Declare @Table_Name VarChar(100) ,@Column_Name VarChar(100) Set @Table_Name = ” Set @Column_Name = ” Select RowNumber = Row_Number() Over( PARTITION BY T.[Name] Order By T.[Name],C.column_id  ), SCHEMA_NAME( T.schema_id ) As SchemaName …

Get System Downtime

Determine your Powershell exectuion policy 1Get-ExecutionPolicy Change your Powershell exectuion policy if restricted 1Set-ExecutionPolicy RemoteSigned Script to get system downtime 1234567891011121314151617181920212223242526272829303132333435363738[timespan]$downTime = New-TimeSpan -start 0 -end 0 [timespan]$totalDownTime = New-TimeSpan …

Determine Disk Size of Tables

To see the disk size of database tables in MSSQL: 12345678910111213141516171819202122SELECT     t.NAME AS TableName,     p.rows AS RowCounts,     SUM(a.total_pages) * 8 AS TotalSpaceKB,     …