I accidentally created a stored procedure without assigning it to database, where can I see it?
How it's happened? In SQL Server Management Studio, I open file with the code that created the stored procedure and I clicked on execute. :/
I am using SQL Server 2017.
Thanks
I found the answer!!!!
It was in the default database "master".
I found it because i run EXEC sp_stored_procedures; this get me a list of all stored_procedures.
Related
Anyone has the idea how to get this through?
I have a production and a test server. I created a linked server of production on the test server machine. I can do all DML that affects the production server from the test server, but I cannot see the stored procedure object of the production server on the test server.
RPC and RPC Out is already True.
I hope this will help you.
Using sp_HelpText you get entire SP text.
EXEC [ServerName].[DatabaseName].dbo.sp_HelpText 'SPName'
From SQL Server Management Studio I have connected to an SQL Server database engine. This database engine has a lot of databases. From a store procedure defined in a database I am trying to call a store procedure in another database that it is in another SQL Server database engine. So I have done:
exec [MyDatabaseEngine].[MyDatabase].[MyStoreProcedure] param1, param2
But it is not working.
I do not know if I have explained it correctly. If not, please let me know.
You are missing the schema. The format is [LinkServer].[Database].[Schema].[Object]
You need to have linked server created with credentials access to the other database. More info
https://learn.microsoft.com/en-us/sql/relational-databases/linked-servers/create-linked-servers-sql-server-database-engine
Once you have it, you can run queries on another server
SELECT name FROM [SRVR002\ACCTG].master.sys.databases ;
GO
An SSIS package which consists of an Execute SQL task is running fine when executed in the SQL Server 2014 catalog.
When this is a part of a SQL Server agent job, it throws an error
can not find the stored procedure
The package's Execute SQL task contains the statement
exec usp_procedures
The definition of this stored procedure is to execute multiple other stored procedures:
exec usp_strdproc1
exec usp_strdproc2
exec usp_strdproc3
exec usp_strdproc4
All of the sub procedures are accessing files in a particular location. I have ensured that the SQL Server agent job has all the permission to access the file
I would immediately think its a permission issue, but you have checked that.
Next check what schema you should be using and whether thats set up correctly?
Is the SQL Server Job Agent running on the same server?
Have you pointed the job to the correct database?
Hope this points you in the right direction.
I've had this error for months now. On some databases on my Azure SQL Server, when I go to Edit Rows or enter Designer view in SQL Server Management Studio. I get an error
Could not find stored procedure 'sp_linkedservers'.
I don't know where it's looking or what stored procedure to add.
While this isn't a solution for SSMS 2014, working through SSMS 2016 CTP3 seems to be working and the problem has been solved. Thanks to #Cpt. Monac for the suggestion!
I am using SQL Server 2008 R2 and created a set of tables/stored procedures using aspnet_regsql.
I believe that my database is corrupted after an import. I have stored procedures in INFORMATION_SCHEMA and there is only few stored procedures under Programmability > Stored Procedures, those are asp net procedures created using the aspnet_regsql and now I canĀ“t recreate because SQL Server says the the object already exists.
How can I fix that?
Thanks
P.S I have performed a automatically export/import from one remote database to another.
Problem solved.
I had a backup I just had my database imported again.
thanks