Mongo Won’t Restart

MongoDB does not start after a reboot, sudo tail -10 /var/log/mongodb/mongod.log indicates 1Failed to unlink socket file /tmp/mongodb-27017.sock Operation not permitted To resolve the issue, run commands 123sudo rm -f …

Error Installing Oracle 11.2.0.1

During the install, the error “OS error in starting service oraclemtsrecoveryservice” To resolve, edit registry key: [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\ORACLE\Ora cleMTSRecoveryService\Protid_0] Edit the Host key and set to the machine name.

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 …

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,     …

MS SQL Server Determine Tables without Rows

123456789101112131415161718192021222324252627SELECT     t.NAME AS TableName,     i.name as indexName,     p.[Rows],     sum(a.total_pages) as TotalPages,     sum(a.used_pages) as UsedPages,     sum(a.data_pages) as DataPages,   …

Datetime variables TSQL

Syntax for a TSQL date time variable 1234567DECLARE @START_DATE DATETIME DECLARE @END_DATE DATETIME SET @START_DATE = ’09/21/2012 00:00:00′ SET @END_DATE = ’09/21/2012 23:59:59′ SELECT * FROM TABLE WHERE POSTINGDATE >= …

Select Tables with Row Count

TSQL 123456–all tables and rowcount (in descending order by count) select ‘[‘+SCHEMA_NAME(t.[SCHEMA_ID])+’].[‘+t.NAME+’]’ AS [fulltable_name], SCHEMA_NAME(t.[SCHEMA_ID]) as [schema_name],t.NAME as [table_name] ,i.rows from sys.tables t INNER JOIN sysindexes i ON (t.object_id = …

Create a mysql database

12345$> mysql -u ‘root’ -p mysql> create database atestdatabase; mysql> create user ‘myuser’@’localhost’ identified by ‘secret’; mysql> grant all on atestdatabase.* to ‘myuser’@’localhost’;