Truncate SQL DBs remotely without admin privileges

Truncate SQL DBs remotely without admin privileges

SQL Log: It records recent database transactions and is used to ensure database integrity in the event of a system restore, like database queries, updating/insertion/deletion of the records and all other database action. You can say it is a temporary location for database actions and data. Then it finally commits the changes to the database.

For a busy database it’s necessary to truncate the database log frequently to clear the disk space. The SQL log file can grow very large and consume all existing allowed space.

You can truncate the SQL log file remotely without admin privileges,

  • Login “SQL Management Studio” with your database username/password and select the database.
  • Open the “Query” window and run the below script:

USE your_db_name_here
GO
ALTER DATABASE your_db_name_here SET RECOVERY SIMPLE
DBCC SHRINKFILE(2,0)
ALTER DATABASE your_db_name_here SET RECOVERY FULL
GO

You are done!


    • Related Articles

    • Remotely Connecting to SQL Server

      Description: To connect to SQL server 2014 remotely you have to download “SQL server 2017 management studio express edition” and install it. To install it the prerequisite is .NET framework 4.7 to be installed in the computer then only u can install ...
    • How to List and Download Active IDs from the Delegated Admin Panel

      How to List and Download Active IDs from the Delegated Admin Panel To List and Download Active IDs from the Delegated Admin Panel Step 1: Log In to the Delegated Admin Panel > Click on the 'Search' option Step 2: Click on 'Accounts' > Click on the ...
    • How to change password for MS SQL admin user

      Following tutorial will guide you to reset the MS SQL server sa user password. We assume that you have working sa or windows user password. 1. Login to MSSQL server by using current sa password through MS SQL management studio. 2. In left pane of ...
    • Accessing MySQL Databases as Plesk Admin

      Accessing MySQL Databases as Plesk Admin Step 1: Steps to access database using root 1. Visit the URL https://<your_ip>:8443 or https://:your_domain>:8443 (SSL Support) or http://<your_ip>:8880 or http://:your_domain>:8880 (without SSL Support) and ...
    • How to add MS SQL database in SolidCP

      Steps to follow to add a SQl database in SolidCP Login to SolidCP. Once you are logged into SolidCP, click on All Customers link. In the next screen, you will see the list of all created users. If you have not created any user yet, you'll see the ...