With complete data and appropriately chosen parameter priors the problem of finding a Bayesian network with maximal log marginal likelihood (LML) becomes a purely discrete problem: search for a directed acyclic graph (DAG) with maximal LML. We solve this problem of discrete optimisation using integer linear programming (ILP) with the SCIP (Solving Constraint Integer Programming) framework. In many cases this allows us to solve the problem: we find a DAG which we know to have maximal LML. Also using ILP allows prior knowledge, such as known conditional independence relations, to be expressed as constraints on DAG structure The key to efficient solving is to add certain linear constraints ruling out cyclic digraphs during the search. I will report on the successes and limitations of this approach and discuss future directions.