This code is should be written in powershell console, right click on the database and open powershell console.
This function helps to search for Store Proc Name inside certain database.
function find-StoredProcedureinDatabase($sprocName){
# $ps = "FetchAndProcessLoginData"
$ps = $sprocName
$dbs = dir
foreach($db in $dbs){
$sps = $db.storedprocedures
foreach($sp in $sps){
if($sp.name -ieq $ps){
$db.name
}
}
}
}
This function helps to search for Store Proc Name inside certain database.
function find-StoredProcedureinDatabase($sprocName){
# $ps = "FetchAndProcessLoginData"
$ps = $sprocName
$dbs = dir
foreach($db in $dbs){
$sps = $db.storedprocedures
foreach($sp in $sps){
if($sp.name -ieq $ps){
$db.name
}
}
}
}