public void DropSchema( string schemaName, Exec e ) { // Drop all the tables, views and routines in the schema. Schema schema = GetSchema( schemaName, true, e ); Sql( "EXEC sys.DropSchema(" + Util.Quote(schemaName) + ")" ); SchemaDict.Remove( schemaName ); ResetCache(); // Because there may be loaded views, functions or procedures that reference the dropped schema. }
public void CloseAndDeleteIndex(long indexId) { IndexFile ixf; IxDict.TryGetValue(indexId, out ixf); if (ixf != null) { ixf.F.Close(); IxDict.Remove(indexId); Database.DeleteFile(FileType.Index, indexId); } }