This is probably the best way, especially if the script is too large and you have it stored as an SQL file. In DBeaver, click the SQL button, right-click on the newly opened subwindow, and Go to Execute -> Execute SQL Script Natively. Choose your file and run it.