AumTechHub.Com http://aumtechhub.com Just share it!!! Wed, 06 Jul 2022 23:41:17 +0000 en-US hourly 1 https://wordpress.org/?v=6.7 179596041 Deploy Custom assembly in reporting services http://aumtechhub.com/deploy-custom-assembly-in-reporting-services/?utm_source=rss&utm_medium=rss&utm_campaign=deploy-custom-assembly-in-reporting-services Thu, 28 Apr 2022 13:48:35 +0000 https://aumtechhub.com/?p=379 Recently I had to do a report that generates barcodes using an assembly (dll). In order to use the dll, you can do few different things. One is to use GAC and register it. If that doesnt work then second option is you can copy the dll into folder “%ProgramFiles%\Microsoft SQL Server\MSRS13.MSSQLSERVER\Reporting Services\ReportServer\bin” and that works perfectly.

]]>
379
UTC Time For North America – EST http://aumtechhub.com/utc-time/?utm_source=rss&utm_medium=rss&utm_campaign=utc-time Sat, 09 Apr 2022 00:54:25 +0000 https://aumtechhub.com/?p=366 EST 12H-Time: 2024-11-17 03:24:09 EST

EST 24H-Time: 2024-11-17 15:24:09 EST

UTC Time: 2024-11-17 20:24:09 UTC

This is the UTC for Eastern time zone for North America based on current eastern time.

]]>
366
How to connect Sharepoint documents as a UNC path? http://aumtechhub.com/how-to-connect-sharepoint-documents-as-a-unc-path/?utm_source=rss&utm_medium=rss&utm_campaign=how-to-connect-sharepoint-documents-as-a-unc-path Wed, 12 Jan 2022 01:17:21 +0000 http://aumtechhub.com/?p=334 If you have sharepoint documents that require you to connect to it as a unc path then you must have the following service setup on the client machine trying to make attempt to access the sharepoint path. You must enable the webclient service on the client machine or install it from windows component. Once that is setup then you can access the sharepoint files as an UNC path. Example: \\sharepointsite.com\foldername\subfolder\

This will work.

]]>
334
How to split large video files? http://aumtechhub.com/how-to-split-large-video-files/?utm_source=rss&utm_medium=rss&utm_campaign=how-to-split-large-video-files Wed, 15 Dec 2021 17:05:14 +0000 https://aumtechhub.com/?p=328 There is a great tool I recently found online that allows you to open small or large videos and split them into multiple parts without having render the entire video. The tool is called LosslessCut-win.exe

You can watch a tutorial on youtube using this playlist

]]>
328
How to map a network drive with NET USE? http://aumtechhub.com/how-to-map-a-network-drive-with-net-use/?utm_source=rss&utm_medium=rss&utm_campaign=how-to-map-a-network-drive-with-net-use Thu, 09 Dec 2021 07:13:29 +0000 https://aumtechhub.com/?p=324 The following command will allow any account to map to a network unc path. The command must include credential.

C:\Users\AumTechHub>net use q: "\\Share.DomainName.com\SQL\queries" /user:DomainName.com\username Password

The above command will map drive Q: to point to the path \\Share\SQL\queries over the network. The Domain name sometimes has to be specified with the machine name or servername.

]]>
324
How to get table size in a database? http://aumtechhub.com/how-to-get-table-size-in-a-database/?utm_source=rss&utm_medium=rss&utm_campaign=how-to-get-table-size-in-a-database Thu, 11 Nov 2021 04:54:04 +0000 https://aumtechhub.com/?p=280 This query will return size of each table in a sql database. This is a great way to monitor growth of a database and decide what restrictions might be needed to keep the database size from growing out of control. You may want to put a limit on file upload size on a table that might storing documents for example.

SELECT
t.NAME AS TableName,
p.rows AS TableRowCounts,
CONVERT(DECIMAL,SUM(a.total_pages)) * 8 / 1024 AS TotalSpaceMB,
CONVERT(DECIMAL,SUM(a.total_pages)) * 8 / 1024 /1024 AS TotalSpaceGB,
SUM(a.used_pages) * 8 / 1024 AS UsedSpaceMB ,
SUM(a.used_pages) * 8 / 1024 / 1024 AS UsedSpaceGB
FROM
DatabaseName.sys.tables t
INNER JOIN
DatabaseName.sys.indexes i ON t.OBJECT_ID = i.object_id
INNER JOIN
DatabaseName.sys.partitions p ON i.object_id = p.OBJECT_ID AND i.index_id = p.index_id
INNER JOIN
DatabaseName.sys.allocation_units a ON p.partition_id = a.container_id
LEFT OUTER JOIN
DatabaseName.sys.schemas s ON t.schema_id = s.schema_id
WHERE
t.is_ms_shipped = 0
AND i.OBJECT_ID > 255
GROUP BY
t.Name, s.Name, p.Rows
ORDER BY
UsedSpaceGB DESC, t.Name

]]>
280
Youtube-dl commands http://aumtechhub.com/youtube-dl-commands/?utm_source=rss&utm_medium=rss&utm_campaign=youtube-dl-commands Mon, 20 Sep 2021 18:05:33 +0000 https://aumtechhub.com/?p=257 This is a great free software online that you can use to download youtube videos. Here are some examples:

Example:

youtube-dl -h

This will show you a list of all the options for running the commands

youtube-dl -U

Update to the latest version of the youtube-dl software.

youtube-dl -F https://www.youtube.com/watch?v=JvEP8PapMzo

This will show all the potential quality available for download for the video.

youtube-dl -f 160+140 https://www.youtube.com/watch?v=JvEP8PapMzo

This will copy the video with low quality. So 160 is 144p video and 140 is m4a at 129K for the audio

youtube-dl -f 160+140 PLqnnqjN9VI8DxJ7h0LEw28lxttHth6QsN

This will download the entire playlist low quality. So 160 is 144p video and 140 is m4a at 129K for the audio.

youtube-dl -f 136+140 --playlist-start 21 PLy_BU-vwATIx752jAkZYztMNs7bHpbsqE

This will download a playlist from position number 21 in the playlist. So starting from video 21 in the playlist the download will start.

youtube-dl --write-sub https://www.youtube.com/watch?v=gKG9p81jY4g

This will download video from with subtitles file if there is one.

youtube-dl -f 136+140 --write-sub PLzufeTFnhupygZG_sczSJ_j7efFT1Kst_

This will download the videos 720P from the playlist with subtitle file.

youtube-dl PL9zrHzoEwKpunssKCflLbAu8CunKRTkkP --write-sub --skip-download

This will download all the subtitle files without downloading the videos.

]]>
257
Database Mail Error Failed to initialize sqlcmd library with error number -2147467259 http://aumtechhub.com/database-mail-error-failed-to-initialize-sqlcmd-library-with-error-number-2147467259/?utm_source=rss&utm_medium=rss&utm_campaign=database-mail-error-failed-to-initialize-sqlcmd-library-with-error-number-2147467259 Wed, 11 Aug 2021 03:29:26 +0000 https://aumtechhub.com/?p=249 In this example below the error will occur because the context of the query is running under MSDB when the query is specified without the database name in the query.

The correct query for the above example is:

EXEC msdb.dbo.sp_send_dbmail
@profile_name ='dbMail',
@recipients = 'dharmyog.com@gmail.com',
@subject ='Test Email',
@body ='Test Email',
@query=' select * from [dbo].[vwEmployees] Where EmployeeAge = 25',
@attach_query_result_as_file = 1;

EXEC msdb.dbo.sp_send_dbmail
@profile_name ='dbMail',
@recipients = 'dharmyog.com@gmail.com',
@subject ='Test Email',
@body ='Test Email',
@query=' select * from EmployeeDB.dbo.vwEmployees Where EmployeeAge = 25',
@attach_query_result_as_file = 1;

This way the stored procedure will execute under the msdb context and the query will execute because the database hierarchy is referenced. So the database name has to be entered in the query.

]]>
249
How to get timezone information? http://aumtechhub.com/how-to-get-timezone-information/?utm_source=rss&utm_medium=rss&utm_campaign=how-to-get-timezone-information Thu, 04 Mar 2021 12:58:56 +0000 http://aumtechhub.com/?p=219 Using UTC time and using offset values can be one of the best ways to make sure you capture the correct local time based on region. In order to get the time information directly from SQL you can run the following query.

select * from sys.time_zone_info
order by name

]]>
219
How to rerun SQL query after delay? http://aumtechhub.com/how-to-rerun-sql-query-after-delay/?utm_source=rss&utm_medium=rss&utm_campaign=how-to-rerun-sql-query-after-delay Thu, 21 Jan 2021 15:27:28 +0000 http://aumtechhub.com/?p=203 This sample show how to run the same query with delay. It will keep running the same query with 10 second delay and keep re-executing at least 5 times. Good example to when to use this is when you want to check the status on an on going backup.

Select L.NAME DBName,R.percent_complete as [Progress%]
FROM Master.dbo.sysdatabases L Left join sys.dm_exec_requests R on L.DBID=R.Database_ID
WHERE percent_complete > 0
raiserror('',0,1) with nowait
waitfor delay '00:00:10'
GO 15

]]>
203