SMO detailed errors

I was starting to regret using SMO, because  of the vague error messages.

Here is an example:
Exception calling “SqlRestore” with “1” argument(s): “Restore failed for Server ‘SM001’. ”

But this was fairly easy to resolve with an extra piece of code in my catch block:

Here is the new error message:

There is insufficient free space on disk volume ‘E:\’ to create the database. The database requires 6346801152 additional free bytes, while only 5079326720 bytes are available.
Problems were identified while planning for the RESTORE statement. Previous messages provide details.

This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s