Question : Consider this code sample: var sourceDatabaseConnectionString = “Data Source=MyServer;Initial Catalog=MyDatabase;User Id=MyLogin;Password=MyPassword”; var serverConnection = new ServerConnection { ConnectionString […]
Tag: smo
Shrinking log files with SMO
Question : I know I can use the following t-SQL to shrink a log file: BACKUP LOG db1 TO DISK […]
Are cursors/While loops the only way to make administrative changes to multiple databases?
Question : I specifically want a programmable way to change the recovery model of all the databases on a server, […]
Why am I missing some output?
Question : Archiving to avoid ID Exhaustion We are about to run out of IDs in one of the tables […]
Is command BACKUP asynchronous operation
Question : I got strange delays when backed up a group of databases (20 more) in one scope (TSQL) to […]
SMO, Powershell, & Failed Logins
Question : Background At my current organization, we’ve got a SQL Agent Job running a Powershell script, originally based on […]
SQL Server SMO Method “Discover()”
Question : I think I just found the coolest thing every with SQL Server SMO and PowerShell. I was asked […]
How to check Query Store settings on model database?
Question : Query Store can be enabled on the model database and ensures that every new database has the same […]
Script Contents of SQL Server Database From a Batch File
Question : I want to be able to script the schema of a given database into a .sql file from […]
SMO : The login already has an account under a different user name, when calling TransferData()
Question : I need to implement the following requirement. I have setup a remote sql server express, certain users shall […]
- 1
- 2