Search
 
SCRIPT & CODE EXAMPLE
 

SQL

oracle uptime

SQL> select
   'Hostname : ' || host_name
   ,'Instance Name : ' || instance_name
   ,'Started At : ' || to_char(startup_time,'DD-MON-YYYY HH24:MI:SS') stime
   ,'Uptime : ' || floor(sysdate - startup_time) || ' days(s) ' ||
   trunc( 24*((sysdate-startup_time) -
   trunc(sysdate-startup_time))) || ' hour(s) ' ||
   mod(trunc(1440*((sysdate-startup_time) -
   trunc(sysdate-startup_time))), 60) ||' minute(s) ' ||
   mod(trunc(86400*((sysdate-startup_time) -
   trunc(sysdate-startup_time))), 60) ||' seconds' uptime
from v$instance;
Comment

PREVIOUS NEXT
Code Example
Sql :: SQL division of an integer by another integer get float CAST 
Sql :: date datatype in livesql 
Sql :: calculer pourcentage mysql 
Sql :: case construct in where clause 
Sql :: windows aggregate functions in postgresql 
Sql :: reset counter postgres 
Sql :: remove decimal in sql server 
Sql :: sql server size of every table in a db 
Sql :: extract postgresql 
Sql :: getting customers with no orders sql 
Sql :: Inserting data into different tables at once in oracle sql 
Sql :: how to login to mysql as normal user in ubuntu 
Sql :: Inser Dataframe into mysql 
Sql :: pl sql if boolean 
Sql :: .env pgsql 
Sql :: postrgesql concat 2 columns divided by ; 
Sql :: sql asc 
Sql :: window function sql 
Sql :: SQL Comments Within Statements 
Sql :: Oracle cx_Oracle example 
Sql :: mysql undo delete 
Sql :: how to save postgresql query 
Sql :: mysql begin statement 
Sql :: tables in sql 
Sql :: laravel subquery in from clause 
Sql :: install mssql on ubuntu 
Sql :: joining tables in sql 
Sql :: import database from sql file 
Sql :: update view sql 
Sql :: how do you insert boolean to postgresql 
ADD CONTENT
Topic
Content
Source link
Name
4+9 =