Viewing 15 posts - 1 through 15 (of 22 total)
Thank you - After your direction I re-analysed the query and spotted a CONVERT statement with varchar. Changed from varchar to date and time respectively and this worked for the...
June 19, 2018 at 6:42 am
Hi,
When the code is executed no results appear. Am I on the correct lines or completely wrong ?
March 1, 2016 at 8:49 am
Hi,
I have been working on a similar peice of work. The minimum permissions I had to provide and this did only show part of the report as sys.traces will...
September 15, 2015 at 9:46 am
I tested the $_[0] within the Remove_item and it worked. Can you explain what the [0] does?
Thank you for your time. Much appreciated.
[String] $inventoryinstance="MyInstance"
[String] $inventorydatabase="DBA_DB"
#add-pssnapin sqlserverprovidersnapin100
#add-pssnapin sqlservercmdletsnapin100
$smoAssembly =...
November 21, 2014 at 5:13 am
When I run the $._GetType() the following is returned: System.Data.DataRow
November 21, 2014 at 4:58 am
I am using the code as you suggested but I cant seem to get the Remove-Item code to work.
When I run the second line of code the output is what...
November 21, 2014 at 4:02 am
I am actively trying to work on this function.
I have slightly altered my code but now I am getting an error:
[String] $inventoryinstance="MyInstance"
[String] $inventorydatabase="DBA_DB"
#add-pssnapin sqlserverprovidersnapin100
#add-pssnapin sqlservercmdletsnapin100
$smoAssembly = [reflection.assembly]::LoadWithPartialName("Microsoft.SqlServer.Smo")
if (!($smoVersion))
{ Set-Variable -name...
November 20, 2014 at 7:59 am
This is what I am running which is failing:
DECLARE@CounterINT = 1,
@CommandNVARCHAR (255),
@DatabaseNameNVARCHAR(255)
DECLARE @test-2 TABLE
(
IDINT IDENTITY(1,1)NOT NULL,
DBNameNVARCHAR(255)NOT NULL
);
INSERT INTO @test-2 (DBName)
select DISTINCT substring([name],1,patindex('%2%',[name])-2) [Name] FROM master.sys.databases WHERE...
June 26, 2014 at 4:59 am
Hi,
This is the query I am trying to run:
SELECT
s.[Name],
COUNT(DISTINCT s.[SessionId]) AS [SessionCount],
SUM(DATALENGTH(rd.[TermData])) AS [TotalSessionSize]
FROM [Session] s
INNER JOIN [RawData] rd
ON s.[SessionId] = rd.[SessionId]
GROUP BY s.[Name]
ORDER BY [TotalSessionSize] DESC
June 26, 2014 at 4:45 am
The first reply is exactly what I need but instead of using a simple select which works I am trying the code with a GROUP BY function and its throwing...
June 26, 2014 at 4:27 am
you my friend are a hero!
For some reason I couldn't get my head around it.
Thank you.
January 19, 2014 at 6:51 am
Can anyone help with my previous comment?
I need to be able to loop around each of the directories above to get the folder permissions. (cacls)
July 6, 2012 at 2:44 am
Hello,
Sorry for the (very) late response I have been away. I have gone down a different road and I am currently stuck with this at the moment:
[String] $inventoryinstance="Server\Instance"
[String] $inventorydatabase="Database"
$smoAssembly...
June 27, 2012 at 4:12 am
Thanks for the responses. I am unsure how to loop through each database to get the data file location. Any help on this would be appriciated.
I would like...
May 24, 2012 at 7:04 am
Viewing 15 posts - 1 through 15 (of 22 total)