T-SQL: Creation date/time of tables
When you are looking for the creation date/time of certain tables, you can easily find that in the sys.tables.You can use the code below in order to list all tables, and the creation date of those tables.
I.T. minded
When you are looking for the creation date/time of certain tables, you can easily find that in the sys.tables.You can use the code below in order to list all tables, and the creation date of those tables.
Sometimes you need to know when a SQL login was created. The SQL code below will list the SQL logins, when this was created, and if this is enabled or disabled.
The t-sql code below will give you the top 10 most CPU consuming SQL statements in your database, sorted by CPU time.
Disk I/O is most of the time the bottleneck of your SQL database, even when using SSD. The SQL statement below will show you the most heavy disk I/O statements, which you should improve.
The code below will give you the top 10 most executed stored procedures in your database, sorted by execution count.
Interested to see how long your SQL server agent is up and running, or you want to see if that agent is operational? You can use the t-sql code below to find out:
The SQL statement below will give you the top 100 longest running SQL statements in your database, sorted by duration.
Looking for a table, but you don’t remember in which database it’s located? The code below will create a stored procedure, which you can use in order to find a table in multiple databases.
You can use the t-sql code below in order display the size of each table in a specific database.
Sometimes you need to do maintenance on a database, and you don’t really want to use single user mode or disable accounts. In that situation you could kill all connections to a specific database.In order to achieve that, you can use the t-sql code below.
You can use the following shell commands in order to redirect a port to another port.
Using the “stress” application, you can simulate high memory usage of your system.You may use the following command line:
You can create a temporary lock in T-SQL for -for example- testing:
With ffmpeg you can also decrease the size (aka: quality) of a mp4 file on linux command line.You can use the following example, which will generate a +/- 5Mb file :
You can optimize Jpeg images on linux command line (= reduce the size to load images faster).In order to achieve that, you can make use of the ‘jpegoptim’ application.On ubuntu/debian systems: To optimize the jpeg file:
Create a file ‘allowed-hosts’ in the ‘work_dir’ (can be found in the denyhosts.conf file), which is /var/lib/denyhosts on Ubuntu, containing the ip.See the example below: