Showing posts with label certain. Show all posts
Showing posts with label certain. Show all posts

Friday, March 23, 2012

Prompt password when calling certain reports only?

Hi,

When I call certain reports from an ASP application, some prompt for password and some are not.

I wonder why is this happen?

Under the Directory Security of Reports under IIS 6, I already enable Anonymous Access for IUSR_XXXX with the correct password.

I also assign IUSR_XXXX as Browser in Report Manager of Reporting Services.

The enviroment is Windows Server 2003 standard edition, IIS 6, SQL Server 2005.

Thanks in advance.

Best regards,

Pop

You can check the data source settings for the reports. There is an option to prompt for password for the datasources of reports.|||

I had try

1)"Use Windows Authentication"

2)"Use a specific user name and password"

3)"No credentials"

in Data source setting and non of it works.

When I try with option 1 and 2, only one of the reports prompt for password(so far that's what I discover, only 1 report prompt for password), the rest no need.

Any clue?

Best regards,

Pop

Friday, March 9, 2012

Programmatically loop over variables in the variable dispenser?

In my custom task, I would like to loop over the variables in the variable dispenser, and only modify those that are of a certain type. Is this possible?

Thanks!

I think you can use Me.variables(x).getType to get the type of each variable. If that is not correct, you can define variables name sXXX for string, iXXX for integer, etc. Then parse the variable name, get the first character and determine the variable type.|||

That would work, but I should clarify my question:

I have the VariableDispenser object passed into my Execute method. I do not know ahead of time what variables will be accessible via this instance of the VariableDispenser object. I would like to loop over each variable that is accessible (again, without knowing its name), then perform an operation on it conditionally based on its type (which I will get from the getType method).

Sorry for not being clearer in my original post!

|||I know that we can say variables(0).xxxx to read the first variable. But I am not sure whether we can get the count of variables. If you can't get the count, what you can do is read variables(0), variables(1), etc like that, and put that code in a try..catch. If you get an exception as 'index out of range', come out of the loop.|||This would be a great way to loop over all the variables assuming I could get access to the entire variables collection to begin with. The problem is that all I have is the VariableDispenser object. The VariableDispenser object methods that interact with the Variables collection (LockForRead, LockOneForRead, etc.) require that I know the name of the variables I would like to access. In my component, I do not know this upfront. Unless I am missing something (and I hope I am), I think I am out of luck?|||

Hi David,

I am not sure whether I understood your problem correctly or not. If I am confusing you, I am sorry. So, what you want is variable name and its type before calling variableDispenser object method. If that is true, it is pretty much simple.

DTS.Variables collection has 'count', 'Name' and 'DataType' properties. Loop thru this collection to get the name of a variable and its datatype. If the datatype is what you are looking for, call the VariableDispenser method using the name that you got.

Hope it will work.

|||

Thiru,

No worries. I am probably not being as clear as I could be - I always find it difficult to describe technical problems on the first 3 or 4 tries. Thanks for the help thus far.

I should have clarified from the beginning that I writing my custom task in C#. All of my code exists within the Execute method of my task. I do not appear to have the equivalent of the DTS.Variables collection available to me. Instead, all I have is the VariableDispenser object. Again, I hope I am missing something simple here.

Thanks again for your help,

David

|||

Can I ask why you want to this? How does the type identify the variables you want to modify? I ask in case there is some better way which we could suggest to acheive your business case.

Donald

|||

The answer is kind of convoluted, but here goes:

I have a package that manages the execution of child packages. Exactly what child packages are to be executed in a given run of the parent package are store in a database table. The child packages stored in the database table are looped over in a ForEach loop, and executed sequentially.

Each child package also requires a set of variables for successful execution. The list of variables required differs for each child package. The value for each of the required variables is not going to be known until run-time, immediately before the child package executes. The easiest way for me to manage this is to have a database table that lists what variables are necessary for each child package, and what expression / database query should be executed at run-time to evaluate each variable.

I have found a number of limitations (perceived or real) within the current SSIS achitecture that makes what I am trying to accomplish difficult. To get around these limitations, I have created my own set of objects to interact with the variables stored in the database, evaluate them at run-time, and put them into a single custom "variable list" object (to which an SSIS variable is assigned) that is available to the child packages.

The problem I have is that my parent package contains the variable(s) assigned to the list object(s). For maximum portability, I do not want my child packages to have to know what the names of those variables are. Instead, I would like to write a custom task that loops over all variables accessible via the variable dispenser, identifies those of my custom type, iterates through all the custom variables in the list, and assigns those values to corresponding ssis child variables (of the same name).

I know - that is quite a mouthful, and likely is not as clear as it could be. I may be going down a path that is unnecessary as I have only been playing around with SSIS for about 3 weeks now. Any help / advice is much appreciated.

Thanks,

David

Monday, February 20, 2012

Program to save the blocking on a table

I need save the blocking or deadlock occurrences on a certain table to a
file.
How to write a program (any kind, SQL, Perl, C, Java, etc) to do it? I don't
want to use SQL profiler. I hope a program can do it for me.
Thanks,
LixinHi Lixin,
Thank you for using MSDN Newsgroup! It's my pleasure to assist you with
your issue.
From your description, I understand that you are handling some blocking or
deadlock issues. For monitoring the blocking issue and save it to a file,
you can refer to the following article to use the stored procedure to
collect the blocking information and use Osql utility to output and save
the information to a file:
271509 INF: How to Monitor SQL Server 2000 Blocking
http://support.microsoft.com/?id=271509
For more information, these articles may be also helpful:
283725 INF: How to View SQL Server 2000 Blocking Data
http://support.microsoft.com/?id=283725
283696 INF: Job to Monitor SQL Server 2000 Performance and Activity
http://support.microsoft.com/?id=283696
Best regards,
Billy Yao
Microsoft Online Support
----
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
Please reply to newsgroups only. Thanks.|||The recommened articles are very helpful. Thanks a lot,
Lixin
""Billy Yao [MSFT]"" <v-binyao@.online.microsoft.com> wrote in message
news:%23aCiUKxuDHA.2520@.cpmsftngxa07.phx.gbl...
> Hi Lixin,
> Thank you for using MSDN Newsgroup! It's my pleasure to assist you with
> your issue.
> From your description, I understand that you are handling some blocking or
> deadlock issues. For monitoring the blocking issue and save it to a file,
> you can refer to the following article to use the stored procedure to
> collect the blocking information and use Osql utility to output and save
> the information to a file:
> 271509 INF: How to Monitor SQL Server 2000 Blocking
> http://support.microsoft.com/?id=271509
> For more information, these articles may be also helpful:
> 283725 INF: How to View SQL Server 2000 Blocking Data
> http://support.microsoft.com/?id=283725
> 283696 INF: Job to Monitor SQL Server 2000 Performance and Activity
> http://support.microsoft.com/?id=283696
>
> Best regards,
> Billy Yao
> Microsoft Online Support
> ----
> Get Secure! - www.microsoft.com/security
> This posting is provided "as is" with no warranties and confers no rights.
> Please reply to newsgroups only. Thanks.
>

program flow question

I am trying to figure out how to make a report stop at a certain value. For example say I have five categories that I can assign an item. I would like to be able to have the report pull just the first category that applies to the item. For instance I have a bike that falls under categories 1 and 3 and a car the falls under 2, 3, and 5. How can I make it so the report will only show the details that apply to the first category the item falls under. Thanks.

So do you have a category field coming in the dataset agianst your items, and user is gonna select one category or may be more than one.

If i got it correct this can be done by using filter the dataset for that parameter may be using where clause or may be using dataset filter or even at table filter.

|||Actually I was able to solve this problem. I changed the view I was pulling from so the categories would be assigned numbers. Then I declare a varable and set it to Min(category) with the same from and where clauses. Then I just add to the where clause to have the catergory equal the varable set to min.