Run the following code snippet (tweak the connection string ("...") to point to a ManagedInstance server):
var dbname = "bugDB";
var srvconn = new ServerConnection(new SqlConnection("..."));
var srv3 = new SMO.Server(srvconn);
var db = new SMO.Database(srv3, dbname);
db.Create();
DataFile df = new DataFile(db.FileGroups[0], "MatteoDF");
df.Create();
It won't work.
If you set some properties on the DataFile object before the creation, it'll work.
Run the following code snippet (tweak the connection string ("...") to point to a ManagedInstance server):
It won't work.
If you set some properties on the DataFile object before the creation, it'll work.