0

After i run php artisan migrate , this is the error I got.

 [Illuminate\Database\QueryException]
      SQLSTATE[HY000]: General error: 262 General SQL Server error: Check message
      s from the SQL Server [262] (severity 14) [(null)] (SQL: create table "migr
      ations" ("migration" nvarchar(255) not null, "batch" int not null))



  [PDOException]
  SQLSTATE[HY000]: General error: 262 General SQL Server error: Check message
  s from the SQL Server [262] (severity 14) [(null)]

This has been my long road to connect my Laravel to MS SQL Server using Ubuntu.

  • Have you installed freeTDS and the appropriate drivers? eg. - sudo apt-get install php5-sybase php5-odbc freetds-common – omatica Oct 08 '16 at 18:29
  • @8bitreboot yea. I have 2 threads already about this activity, [thread #1](http://stackoverflow.com/questions/39860273/laravel-to-sql-server-sqlsrv-pdoexception-could-not-find-driver) and [thread #2](http://stackoverflow.com/questions/39902768/pdoexception-sqlstate-01002-adaptive-server-connection-failed-severity-9) . So this thread is my current situation. – Vahn Marty Cagalawan Oct 08 '16 at 20:09
  • Try changing TDS version: 5.0 to 7.0 or 8.0 in the tds config file – omatica Oct 08 '16 at 20:15
  • @8bitreboot that is also my problem. Check this http://stackoverflow.com/questions/39902768/pdoexception-sqlstate-01002-adaptive-server-connection-failed-severity-9 – Vahn Marty Cagalawan Oct 10 '16 at 13:45

1 Answers1

0

I have solved it. The problem was not the connectivity. The DB Administrator just provided me a limited user in Database. I just found out that MS SQL Server has different users with different accessibility. I requested the DBA to give me full access, then it's all good.