Sin conexión a tablas, sprocs, etc. [cerrado]

I have been working on a database for a couple of weeks now, and suddenly nothing works and I just can't figure out how to solve it.

I can login to SQL server and list all the tables and sprocs. The problem is that when I try to run a sproc I get a message telling me that there are no such table, even though it exists.

When I try to alter or create a sproc I get the following message:

Msg 262, Level 14, State 1, Procedure usp_GetUser, Line 14
CREATE PROCEDURE permission denied in database 'master'.

¿Qué puede estar mal?

preguntado el 09 de marzo de 12 a las 16:03

2 Respuestas

... in database 'master'.

Wrong database context: I assume it should be "MyDatabase" not "master"

respondido 09 mar '12, 16:03

You're currently running against the master database rather than whichever user database you have been working on.

O corre

use MyDatabaseName

Or at the top of SSMS there is a drop down that currently says ''master". Change it to your database name

respondido 09 mar '12, 16:03

Great, that solved my problem. Thanks! - Holyredbeard

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.