You can easily run Transact-SQL (T-SQL) script files (with extension .sql) via the commandline utility sqlcmd:
sqlcmd -S Server\Instance -i C:\path\to\SomeScript.sql
By default, the output is written to the command prompt. You can also save the output to a file:
sqlcmd -S Server\Instance -i C:\path\to\SomeScript.sql -o C:\path\to\TheOutput.txt
Note that when using this, no output is written in the command prompt window.
A bit hard to find through the search on Microsoft website, so here's the direct link:
You can easily move the table to another filegroup by recreate the clustered index on the table:
CREATE CLUSTERED INDEX CIX_YourTable ON dbo.YourTable(YourClusteringKeyFields) WITH DROP_EXISTING ON [filegroup_name]
If the clustered index is unique:
CREATE UNIQUE CLUSTERED INDEX CIX_YourTable ON dbo.YourTable(YourClusteringKeyFields) WITH DROP_EXISTING ON [filegroup_name]
This creates a new clustered index and drops the old one. Because the new index is created in the other filegroup, the table will have been moved to that filegroup.
When restoring a database, you usually start with restoring a full backup, then any differentials, and finally the transaction logs. You set the database restore mode to WITH NORECOVERY, which allows you to perform these additional restores.
But what if you find out that there's nothing more to restore, leaving you with a database stuck in Restoring mode? Then you only need to run a single T-SQL statement:
RESTORE DATABASE [db_name] WITH RECOVERY
Replace db_name with the name of your database.
Follow the chart below to successfully perform a rolling upgrade of your HA SQL Server cluster.