title: SQLSTATE[08001]: [Microsoft][ODBC Driver 13 for SQL Server]TCP Provider: No connection could be made because the target machine actively refused it
body: <p>My doctrine repository code doesn't work, while I <strong>am</strong> able to access the database and read table data normally.</p>
  
  <p>I get this stacktrace:</p>
  
  <pre><code>EntityManager-&gt;getRepository('AppBundle:Person') in src\AppBundle\Controller\PersonViewController.php (line 18) 
  
    public function indexAction(Request $request) {
           $em = $this-&gt;getDoctrine()-&gt;getManager();
           $repo = $em-&gt;getRepository('AppBundle:Person');
           $persons = $repo-&gt;findAll();
           dump($persons);
  </code></pre>
  
  <p>The person entity model:</p>
  
  <p><code>Person.php</code>
      
  
  <pre><code>namespace AppBundle\Entity;
  
  use Doctrine\ORM\Mapping as ORM;
  
  /**
   * Class Person
   * @Package AppBundle/Entity
   *
   * @ORM\Entity(repositoryClass="AppBundle\Repository\PersonRepository")
   * @ORM\Table(name="[Person]")
   */
  class Person {
      /**
       * @ORM\Column(type="integer")
       * @ORM\Id
       * @ORM\GeneratedValue(strategy="AUTO")
       */
      protected $id;
  
      /**
       * @ORM\Column(type="string", length=4)
       */
      protected $type;
  }
  </code></pre>
  
  <p>In case this is necessary as well, the repo code:</p>
  
  <p><code>PersonRepository.php</code></p>
  
  <pre><code>&lt;?php
  
  namespace AppBundle\Repository;
  
  use /** @noinspection PhpUndefinedClassInspection */
      Doctrine\ORM\EntityRepository;
  
  class PersonRepository extends EntityRepository {
  
      public function create() {
          $entity = new Person();
          $entity-&gt;type('WM_B');
          $this-&gt;_em-&gt;persist($entity);
          $this-&gt;_em-&gt;flush();
      }
  }
  </code></pre>