Viewing 15 posts - 91 through 105 (of 486 total)
Well that seems weird...
However, I experimented with a move and a copy and, in both cases, the permissions were as expected, and identical.
I had the...
May 10, 2017 at 8:29 am
Thanks Chris, that did it when I changed the ORDER BY to use the date in the ROW_NUMBER()
Much appreciated!
April 20, 2017 at 12:28 pm
All:
I goofed on the expected results in the OP: here's how they should appear.
The PK (nrev_Id) can be out of calendar sequence (because users), so that...
April 20, 2017 at 12:22 pm
It takes a while, longer depending on the number of servers you have. About 10 seconds for my ~20 instances.
March 2, 2017 at 10:01 am
Does your server show up in the list when you
sqlcmd -L
March 2, 2017 at 5:41 am
And, Presto! Copying Poshtools_Profile.ps1 files to there did the trick.
Thanks Sue!
Edit: The $Home threw me off since it points to somewhere else entirely.
December 21, 2016 at 5:07 am
Doesn't appear to be working:
I've copied my profile.ps1 to
$Home\Documents\WindowsPowerShell\Poshtools_profile.ps1
and
$Home\Documents\WindowsPowerShell\profile.ps1
but in neither case is it being loaded when I start Visual Studio.
Also tried
$Home\My Documents\... to no avail.
December 20, 2016 at 9:48 am
Figured it out.
$DescCols = @()
$MultiCols = $objTable.Columns | %{$_.Name.Substring(3)} | group | ?{$_.Count -eq 2}
if ($MultiCols)
{
foreach ($Row in $MultiCols)
{
$DescCols += $objTable.Columns | ?{$_.Name -like "*$($Row.Name)"} | select name
}
}
November 8, 2016 at 11:28 am
...and note that $_.IsSystemObject -eq $False still returns the Northwind DB???
August 26, 2016 at 6:06 am
Bit of a kludge, but I've found a way. In short,
- create a trace to capture User Error Message events
- script out the trace definition
- start the trace
- run sp_refreshsqlmodule...
August 10, 2016 at 6:32 am
Here's the code for anyone interested:
clear
$strSrv = "MyServerName"
$objSrv = New-object Microsoft.SqlServer.Management.Smo.Server $strSrv
$objdb = $objSrv.Databases["MyDBName"]
$ObjectsToCheck = $objdb.StoredProcedures | ?{($_.textbody -like '*MyModifiedObject*')}
$ObjectsToCheck += $objdb.UserDefinedFunctions | ?{($_.textbody -like '*MyModifiedObject*')}
$ObjectsToCheck += $objdb.Views | ?{($_.textbody...
August 4, 2016 at 12:29 pm
I agree the search is simpler in T-SQL; it's the compiling of the affected code before runtime that I want automated.
Maybe I'm using the wrong word here: I want the...
August 4, 2016 at 11:02 am
As I mentioned, I was able to generate my list -- albeit with a few false positives.
Thanks all for taking the time to respond.
PS: Am I missing some obvious reason...
August 4, 2016 at 9:57 am
Got my list:
selectdistinct OBJECT_NAME(object_id)
fromsys.all_sql_modules
whereCHARINDEX('dbo.v_enqobj_descriptions', definition) > 0
andCHARINDEX('nNodeType_Id', definition) > 0
andCHARINDEX('.nNodeType_Id', definition) = 0
EDIT: Found sproc that does what I want:
sys.sp_refreshsqlmodule
August 4, 2016 at 9:40 am
Yes, using Powershell. I don't have access to SQL Search or VS.
Getting the dependencies is easy. It's finding out which ones will throw an error the next time they're executed...
August 4, 2016 at 9:30 am
Viewing 15 posts - 91 through 105 (of 486 total)