Showing posts with label inside. Show all posts
Showing posts with label inside. Show all posts

Wednesday, March 28, 2012

Running Value (Chart in a Table)

Hello

I have a report with a Table, in the table I have SubReport1, in Subreport1 I have a Table1, inside table1 I have another table2 and Subreport2.

Subreport2 has 4 different type of charts, depending on the passing parameters from the second subreport 1 of the 4 charts is displayed.

In one of the chart I'm using the Running Value function, works fine ONLY the first time the chart is displayed, after that the charts shows no values. I'm using a series group, which changes for every row, for what I understood the value should be reset everytime the series changes (100,101,102), but that is not the case.

Group level values are 1/10, 2/10, 3/10 etc up to 10/10.

Series level values 100,101,102 etc.

Thank you

Hi

I guess I was not clear,

seems like that the Series group ID never reset the running value even when the value changes from 100 to 101, when the chart is invoked by a subreport.

welcome any suggestion.

Wednesday, March 21, 2012

Running Stored Proc inside of Access and getting error

Running Stored Proc inside of Access and getting "The stored procedure
executed successfully but did not return records". When I run in Query
Analyzer it runs just fine. The Stored Proc is as follows:
CREATE PROCEDURE MAINT_EditorActivitybyTime (@.Enter_Start_Date_
smalldatetime, @.Enter_End_Date_ smalldatetime)
AS
DROP TABLE TEMP_MA_Node
--stored proc to create one table from MA_Node and MA_Node_Status10
DECLARE @.Temp_Node_Status10 table(NodeID bigint, NodeName nvarchar(100),
TypeID int, Status tinyint, OwnerID int, Url nvarchar(2048), Path
nvarchar(1000))
INSERT INTO @.Temp_Node_Status10
SELECT NodeID, NodeName, TypeID, Status, OwnerID, Url, Path
FROM MA_Node_Status10
SELECT *
INTO TEMP_MA_Node
FROM @.Temp_Node_Status10
INSERT INTO TEMP_MA_Node
SELECT NodeID, NodeName, TypeID, Status, OwnerID, Url, 'Live'
FROM MA_Node
SELECT dbo.MA_Change.CreateTime, dbo.MA_User.Email,
dbo.MA_Change.ChangeNodeID, dbo.MA_Change.DraftAction, TEMP_MA_Node.NodeName
,
TEMP_MA_Node.TypeID, TEMP_MA_Node.Status
FROM dbo.MA_Change INNER JOIN
dbo.MA_User ON dbo.MA_Change.ModifyUser =
dbo.MA_User.UserID LEFT OUTER JOIN
TEMP_MA_Node ON dbo.MA_Change.ChangeNodeID =
TEMP_MA_Node.NodeID
WHERE (dbo.MA_Change.CreateTime BETWEEN @.Enter_Start_Date_ AND
@.Enter_End_Date_)
ORDER BY dbo.MA_User.Email, dbo.MA_Change.CreateTime
GO
It also returns data in Query Analyzer like this:
2006-01-10 11:40:00.927 andy1221 198643 2 asdfasdf 4 0
2006-01-10 11:41:35.553 andy1221 198644 2 Lycos
Directory>Reference>Education>Distance Learning 4 0
2006-01-10 11:44:39.963 andy1221 198644 4 Lycos
Directory>Reference>Education>Distance Learning 4 0
2006-01-10 11:45:02.637 andy1221 30064 4 Reference Education Distance
Learning 4 0Hi Andy,
use
SET NOCOUNT ON
at the beginning of the SP
and
SET NOCOUNT OFF
as the last statetement of your proc.
If you use the sp like yours you will recieve multiple recordsets in Access.
HTH ;-)
Gru, Uwe Ricken
MCP for SQL Server 2000 Database Implementation
GNS GmbH, Frankfurt am Main
http://www.gns-online.de
http://www.memberadmin.de
http://www.conferenceadmin.de
________________________________________
____________
dbdev: http://www.dbdev.org
APP: http://www.AccessProfiPool.de
FAQ: http://www.donkarl.com/AccessFAQ.htm

Running SSIS package from SQL Job

I'm trying to run a SSIS package (dtsx) from inside an sql job (SQL Server agent). This works fine if the user running (run as) the step is a local admin on the server. If it's not, I get the error message "The package could not be loaded. The step failed". This happens even if the user has all possible serverroles such as "sysadmin" etc in SQL.

So, my question is, is there any way to load an SSIS package without being local admin on the machine? In case it is, what is needed?

regards Andreas

I'm not sure that this will solve the problem, but have a look at PROXY

and CREDENTIALS - I was able to invoke a sample package using them,

using a user that was only a member of the USERS local group.|||

GethWho wrote:

I'm not sure that this will solve the problem, but have a look at PROXY

and CREDENTIALS - I was able to invoke a sample package using them,

using a user that was only a member of the USERS local group.

here's a sample of what I did:

--code

--###################################################### describe

script

############################################################################

PRINT '>>> This script creates the LOGIN,

USER , CREDENTIALS and PROXY for INTEGRATION SERVICES SSIS PACKAGES

<<<'

PRINT '>>> This execution on server:

['+@.@.SERVERNAME+'] started at:

['+CONVERT(VARCHAR,CURRENT_TIMESTAMP,113)+'] <<<'

PRINT ''

PRINT '>>> Create Objects <<<'

PRINT ''

--################################################## Check and Drop

Existing

########################################################################

--################################################## CREATE Login

###################################################################################

SET NOCOUNT ON

USE [master]

IF NOT EXISTS (select 1 from sys.syslogins WHERE [Name] = 'LocalMachine\TestSSISUser')

CREATE LOGIN [LocalMachine\TESTSSISUser] FROM WINDOWS WITH DEFAULT_DATABASE = [MyDatabase]

--################################################## CREATE User and

Grant Rights on DBS

############################################################

USE [MyDatabase]

IF NOT EXISTS (select 1 from sys.sysusers WHERE [Name] = 'LocalMachine\TestSSISUser')

CREATE USER [LocalMachine\TESTSSISUser] FROM LOGIN [LocalMachine\TESTSSISUser]

EXEC SP_ADDROLEMEMBER [DB_DataReader], [LocalMachine\TESTSSISUser]

EXEC SP_ADDROLEMEMBER [DB_DataWriter], [LocalMachine\TESTSSISUser]

EXEC SP_ADDROLEMEMBER [DB_DDLAdmin], [LocalMachine\TESTSSISUser]

GRANT EXECUTE ON [sp_dts_addlogentry] to [LocalMachine\TESTSSISUser]

USE [msdb]

IF NOT EXISTS (select 1 from sys.sysusers WHERE [Name] = 'LocalMachine\TestSSISUser')

CREATE USER [LocalMachine\TESTSSISUser] FROM LOGIN [LocalMachine\TESTSSISUser]

EXEC SP_ADDROLEMEMBER [db_dtsadmin], [LocalMachine\TESTSSISUser]

EXEC SP_ADDROLEMEMBER [db_dtsltduser], [LocalMachine\TESTSSISUser]

EXEC SP_ADDROLEMEMBER [db_dtsoperator], [LocalMachine\TESTSSISUser]

EXEC SP_ADDROLEMEMBER [SQLAgentOperatorRole], [LocalMachine\TESTSSISUser]

EXEC SP_ADDROLEMEMBER [SQLAgentReaderRole], [LocalMachine\TESTSSISUser]

EXEC SP_ADDROLEMEMBER [SQLAgentUserRole], [LocalMachine\TESTSSISUser]

--################################################## CREATE Credential

##############################################################################

USE [master]

IF NOT EXISTS (select 1 from sys.credentials WHERE [Name] = 'TestProxy')

CREATE CREDENTIAL [TestProxy] WITH IDENTITY = 'LocalMachine\TestSSISUser', secret = 't3st'

--################################################## CREATE Proxy

###################################################################################

USE [msdb]

DECLARE

@.proxy_name SYSNAME,

@.subsystem_name SYSNAME,

@.UserName SYSNAME

SET @.proxy_name = 'TestSSISUser'

SET @.subsystem_name = 'CmdExec'

SET @.UserName = 'LocalMachine\TestSSISUser'

EXEC sp_enum_proxy_for_subsystem @.proxy_name=@.proxy_name, @.subsystem_name=@.subsystem_name

IF @.@.ROWCOUNT = 0

EXEC SP_ADD_PROXY


@.proxy_name=@.proxy_name, @.credential_name='TestProxy'

EXEC sp_enum_login_for_proxy @.proxy_name=@.proxy_name, @.name=@.UserName

IF @.@.ROWCOUNT = 0

EXEC SP_GRANT_LOGIN_TO_PROXY

@.login_name=@.UserName,

@.proxy_name=@.proxy_name

EXEC SP_REVOKE_PROXY_FROM_SUBSYSTEM @.proxy_name=@.proxy_name, @.subsystem_name=@.subsystem_name

EXEC SP_GRANT_PROXY_TO_SUBSYSTEM @.proxy_name=@.proxy_name, @.subsystem_name=@.subsystem_name

--###################################################### end script

##################################################################################

PRINT '>>> This execution on server:

['+@.@.SERVERNAME+'] ended at:

['+CONVERT(VARCHAR,CURRENT_TIMESTAMP,113)+'] <<<'

--code

.. it isn't perfect - I couldn't find a way to do an existance check

for the PROXY to run the SP_REVOKE_PROXY_FROM_SUBSYSTEM only if it

PROXY had been gtranted.|||

There will be a reason for the package failing to load, and this is what you need to find out. Use the CmdExec step type.

Scheduled Packages
(http://wiki.sqlis.com/default.aspx/SQLISWiki/ScheduledPackages.html)

Tuesday, February 21, 2012

Running SMO inside a SCRIPT TASK

Dear folks,

I'm trying to call SMO classes from SSIS package but I don't know which reference to use..

Mighn't be Imports Microsoft.SqlServer.Management? But Intellisense don't give me such info.

Let me know where I'm failing.

TIA

http://www.google.co.uk/search?hl=en&q=smo+namespace&meta=

-Jamie

|||

thanks Jamie,

It seems that must be moved some assemblies to \Microsoft.NET\Framework\v2.0.xxxxx in order to acquire its full features from a package.

|||

Correct. But only at design-time

http://blogs.conchango.com/jamiethomson/archive/2005/11/02/2341.aspx

-Jamie

|||

thanks for the response but I don't get the point colleague.

What do you mean in design-time? I want to instantiate SMO classes from Script Task. I know that I can do smo stuff by mean Foreach Loop Container and using as enumerator SMO but my goal is run (as I did before with sql2k and DMO throught Visual Basic Script) SMO fully from scripting

|||

You only need the DLLs in \Microsoft.NET\Framework\v2.0.xxxxx when you are desinging the package. When you run it they don't need to be there.

This is an important consideration when you deploy your packages because it means you don't have to deploy DLLs to \Microsoft.NET\Framework\v2.0.xxxxx on the server on which you run your packages.

-Jamie

|||

ok, thanks again.

But anyway no namespaces appears in my Script Task about SMO after that.

|||

Did you add a reference and add the Imports statement?

-Jamie

|||thanks a lot!!!!!!!! you must be tons of patience|||

enric vives wrote:

thanks a lot!!!!!!!! you must be tons of patience

I'm sure my girlfriend wouldn't say that !!!

-Jamie

|||Well then I hope she is not a programmer/dba or something like that..|||

Definately definately not!

|||!!