How to view the SQL Server stored procedure from linked server? - sql-server

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'

Related

SQL Server - stored procedure can't see in database

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.

Where to get documentation on and/or source of SQL Server Migration Assistant extended procedures?

I am running into login timeout errors while calling a procedure that uses xp_ora2ms_exec2_ex through JDBC. There's nothing in the SQL Server Profiler trace log. The DB was restored from a back-up. I'm wondering if some setting did not get restored. I need to know what it is that xp_ora2ms_exec2_ex does exactly to check the settings. The error isn't encountered when calling the same procedure through sqlcmd.

Calling a stored procedure from another SQL Server Database Engine

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

Can not find the stored procedure error in SQL Server Agent job with ssis package

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.

Is it possible to execute an SSIS package remotely?

I want to execute an SSIS package stored on an SQL server (2008 R2) from another computer. However, everything I've found online involves loading the package from the server and then running it locally.
Is it possible to run the package on the server? Any resources are appreciated.
To execute a package, you normally create a new job and use a job step to start the desired package.
If you got the sql server management studio(ssms) installed on your remote computer, you simply connect to the database engine and start the job. Alternativly, you can connect to the integration services with ssms and start the package directly.
If there is no ssms available, you can start the job using the stored procedure sp_start_job. You could use something like this to execute.
You could execute the stored procedure sp_start_job in the remote server. I've used it (creating a stored procedure to control a bit the parameterisation) succesfully.
http://msdn.microsoft.com/en-us/library/ms186757.aspx

Resources