RMO equivalent to sp_ShowPendingChanges
How to get pending changes in Merge replication using RMO, that is equivalent to sp_ShowPendingChanges
View ArticlePowershell SMO - LastBackupDate without Copy_only Backup
I am trying to automate restore process of a database (Backup is taken through different process). I need to pick the last full backup and latest differential backup and restore the...
View Articleproblem with EnumObjects in powershell/SMO script
I have a code like this$objectTypeFlags = [long][Microsoft.SqlServer.Management.Smo.DatabaseObjectTypes]::All -bxor ( [long][Microsoft.SqlServer.Management.Smo.DatabaseObjectTypes]::Certificate +...
View ArticleConnect Any Database equivalent for Pre-SQL2014. EnumMembers() failure.
Hi guys,Thought this could lie in the Connecting, Powershell and SMO sections among others and decided to post here in case anyone had encountered the same problem.I'm relatively new to SQL, and...
View ArticleSQL Server Agent Alerts and C# or .NET
Morning All,SQL Server Agent can generate alerts. Does anyone know if they can be consumed by a .NET application rather than relying on an Operator to forward them?IF so, how so?CheersAlex
View ArticleDoes SMO require any special privileges, in order to run?
I've been looking into learning SMO so that I can determine the database roles a user is a member of. Today I got an email from our chief security officer, referencing the app I wrote on my machine,
View ArticleWhat happens if a user tries to execute some SMO object when they have low...
We've got some roles defined in a database that's associated with an app we're working on. They are defined under the Database Roles, rather than Application Roles. Our intent is to define whether o
View ArticleDatabase Replication - generating initial snapshot programmatically fails
Greetings, trying to generate an initial snapshot in VB.Net (VS2012, .Net FW 4.6.1) following the steps given in http://www.yaldex.com/sql_server/progsqlsvr-CHP-19-SECT-1.htm
View ArticleSMO Missing properties
I have a server that seems to be missing some properties when accessing via SMO in powershell, specifically the default data and log file locations. These can be viewed through ssms and tsql. Has...
View ArticleGot a newbie SMO powershell question/issue.
Hello everyone, I'm quite new to PowerShell, but getting along OK with a PS cookbook, but I have run into an issue and I cant get around it, and looking for some help. I just wanted to list the service...
View ArticleCan I use SMO to script out schema objects from a database ?
Hello all,we have a couple of databases that have constant data change capture on them,without going in much detail it is allmost impossible storage wise to keep a consisten databackup on these &...
View ArticleA SQL Sever Script Generator Utility
SQL server generates scripts task does not have the option to filter by object name. It is impossible to manually select hundreds of SQL objects manually especially you need choose a subset of objects...
View ArticleSMO Transfering specific rows from specific tables?
In many situations, I just want to grab one or two rows from a table and script out the inserts. It would be nice if SMO did this for me automatically, including handling whether to generate "set...
View ArticleSMO compatibility error
Is anyone aware of any forward compatibility bug in the SMO library? We are having an issue with a .NET client using SMO to check for create database permission. It seems to have trouble reading the...
View ArticleSMO.Scripter: Help Walking a DependencyCollection
Hi there I am working on automating the process of scripting creates for our SQL Views and object dependencies of the views (namely functions in this case). I don't care about table dependencies. I was...
View ArticleUsing SMO to move tempdb
I'm trying to improve my SQL Server Instance configuration scripts using SMO. This includes moving TempDB to a new location, ie. the equivalent of: [quote]ALTER DATABASE tempdb MODIFY FILE (NAME =...
View ArticleCheck file list inside a backup file
I'm trying to get the list of database names / files from a backup file. Here's the code: [code="vb"] ''' <summary> ''' Prepare a RESTORE2 object. ''' </summary> Private Shared Function...
View ArticleIdea to simply inform Admin when values are found in SQL-Table by mail, maybe...
Hello, I have found some situations, where values appear in Column NDF_STATUS in database table NDF_AUFTRAG. This can be normal. It is only critical, when these values exceed a limit I_MAXERRORS. I...
View ArticlePowershell SMO works in cmd, not from script
Hope this is a correct forum. My code (Server 2003 Enterprise, SQL Server 10.0.5512.0, Powershell v1.0 ISE) is as follows: function Script-Database_01 { # Created: 09/06/2013 # Edited: 09/06/2013...
View ArticleProblems connecting to SQL Server 2012 using 2005 SMO
Should 2005 SMO be able to access SQL 2012 please? We are currently performing a large migration to SQL Server 2012. It's been going well, but we have hit a problem testing an app. An app server is...
View Article