Open harshacheemakurt opened 4 years ago
Getting the same error, wondering if you've had any luck resolving this issue?
Getting the same error, wondering if you've had any luck resolving this issue? Pccch
same
same
have anyone get the solution
Open pgAdmin
Windows software, then navigate to the server you created, open databases, and then go to Login/Group Roles
, select your login role, like myuser
which you have created, open properties, and then go to Privileges
, make superuser
, and then apply the python manage.py migrate
command.
1.Connected to the Legacy Microsoft SQL server DB(hosted in Azure Cloud) in settings.py, connecting successful
3.when I do python manage.py migrate, throws below error
Note: all permissions provided for the User which I am connecting to Microsoft SQL server database( hosted in Azure)
django.db.utils.ProgrammingError: ('42000', '[42000] [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]The specified schema name "dbo" either does not exist or you do not have permission to use it. (2760) (SQLExecDirectW)'
complete error in my local windows machine
D:>python manage.py migrate Operations to perform: Apply all migrations: admin, auth, contenttypes, sessions Running migrations: Traceback (most recent call last): File "C:\Users\975418\AppData\Local\Programs\Python\Python37\lib\site-packages\django\db\backends\utils.py", line 83, in _execute return self.cursor.execute(sql) File "C:\Users\975418\AppData\Local\Programs\Python\Python37\lib\site-packages\sql_server\pyodbc\base.py", line 546, in execute return self.cursor.execute(sql, params) **pyodbc.ProgrammingError: ('42000', '[42000] [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]The specified schema name "dbo" either does not exist or you do not have permission to use it. (2760) (SQLExecDirectW)')
The above exception was the direct cause of the following exception:**
Traceback (most recent call last): File "C:\Users\975418\AppData\Local\Programs\Python\Python37\lib\site-packages\django\db\migrations\recorder.py", line 55, in ensure_schema editor.create_model(self.Migration) File "C:\Users\975418\AppData\Local\Programs\Python\Python37\lib\site-packages\sql_server\pyodbc\schema.py", line 591, in create_model self.execute(sql, params or None) File "C:\Users\975418\AppData\Local\Programs\Python\Python37\lib\site-packages\sql_server\pyodbc\schema.py", line 653, in execute cursor.execute(sql, params) File "C:\Users\975418\AppData\Local\Programs\Python\Python37\lib\site-packages\django\db\backends\utils.py", line 100, in execute return super().execute(sql, params) File "C:\Users\975418\AppData\Local\Programs\Python\Python37\lib\site-packages\django\db\backends\utils.py", line 68, in execute return self._execute_with_wrappers(sql, params, many=False, executor=self._execute) File "C:\Users\975418\AppData\Local\Programs\Python\Python37\lib\site-packages\django\db\backends\utils.py", line 77, in _execute_with_wrappers return executor(sql, params, many, context) File "C:\Users\975418\AppData\Local\Programs\Python\Python37\lib\site-packages\django\db\backends\utils.py", line 85, in _execute return self.cursor.execute(sql, params) File "C:\Users\975418\AppData\Local\Programs\Python\Python37\lib\site-packages\django\db\utils.py", line 89, in exit raise dj_exc_value.with_traceback(traceback) from exc_value File "C:\Users\975418\AppData\Local\Programs\Python\Python37\lib\site-packages\django\db\backends\utils.py", line 83, in _execute return self.cursor.execute(sql) File "C:\Users\975418\AppData\Local\Programs\Python\Python37\lib\site-packages\sql_server\pyodbc\base.py", line 546, in execute return self.cursor.execute(sql, params) **django.db.utils.ProgrammingError: ('42000', '[42000] [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]The specified schema name "dbo" either does not exist or you do not have permissio n to use it. (2760) (SQLExecDirectW)')
During handling of the above exception, another exception occurred:**
Traceback (most recent call last): File "manage.py", line 15, in
execute_from_command_line(sys.argv)
File "C:\Users\975418\AppData\Local\Programs\Python\Python37\lib\site-packages\django\core\management__init__.py", line 381, in execute_from_command_line
utility.execute()
File "C:\Users\975418\AppData\Local\Programs\Python\Python37\lib\site-packages\django\core\management__init__.py", line 375, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "C:\Users\975418\AppData\Local\Programs\Python\Python37\lib\site-packages\django\core\management\base.py", line 316, in run_from_argv
self.execute(*args, cmd_options)
File "C:\Users\975418\AppData\Local\Programs\Python\Python37\lib\site-packages\django\core\management\base.py", line 353, in execute
output = self.handle(*args, *options)
File "C:\Users\975418\AppData\Local\Programs\Python\Python37\lib\site-packages\django\core\management\base.py", line 83, in wrapped
res = handle_func(args, kwargs)
File "C:\Users\975418\AppData\Local\Programs\Python\Python37\lib\site-packages\django\core\management\commands\migrate.py", line 203, in handle
fake_initial=fake_initial,
File "C:\Users\975418\AppData\Local\Programs\Python\Python37\lib\site-packages\django\db\migrations\executor.py", line 91, in migrate
self.recorder.ensure_schema()
File "C:\Users\975418\AppData\Local\Programs\Python\Python37\lib\site-packages\django\db\migrations\recorder.py", line 57, in ensure_schema
raise MigrationSchemaMissing("Unable to create the django_migrations table (%s)" % exc)
django.db.migrations.exceptions.MigrationSchemaMissing: Unable to create the django_migrations table (('42000', '[42000] [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]The specified
schema name "dbo" either does not exist or you do not have permission to use it. (2760) (SQLExecDirectW)'))