Showing posts with label requirement. Show all posts
Showing posts with label requirement. Show all posts

Wednesday, March 28, 2012

Is this SQL requirement possible?

I need a script that enumerates the the databases in a given instance of sql server. Then it needs to output the account with permissions on that server. Finally it then needs to search stored procedured for reference to specific file and account names loaded from a csv file. The results should be output to a text file or displayed in an exportable window format.

Thanks a lot

1. "enumerates the the databases" -yes, possible.

2. "output the account with permissions" -yes, possible.

3. "search stored procedured for reference to specific file and account names loaded from a csv file" -yes, possible.

Any more detailed help requires more detailed information from you.

|||

What I don t understand is this:

"search stored procedured for reference to specific file and account names loaded from a csv file"?

would u be able to guess what that means and if possible give me an example of it, please?

Thanks a lot.

|||

I don't wish to continue playing 'guessing games' with you.

I have previously attempted to 'guess' what you had in mind when you made the original post. If my response doesn't seem 'close to the mark' for you, I suggest that you refine your question and repost.

|||

R.Tutus wrote:

I need a script that enumerates the the databases in a given instance of sql server. Then it needs to output the account with permissions on that server.

The following query will do this..

Create Table #ServerLoginDetails
(
DataBaseName Varchar(1000)
,LoginName Varchar(1000)
,MemberOf Varchar(1000)
)
Go
Exec sp_MSforeachdb 'Insert Into #ServerLoginDetails
Select ''?'',Users.Name Loginname, Isnull(Groups.Name,''NA'') MemberOf From ?..Sysusers Users
Left Outer Join ?..Sysmembers Members On Members.memberuid = Users.Uid
Left Outer Join ?..Sysusers Groups On Groups.Uid = Members.GroupUid And Groups.IsLogin=0
Where Users.IsLogin=1'

Select * from #ServerLoginDetails
Go
Drop Table #ServerLoginDetails

R.Tutus wrote:

Finally it then needs to search stored procedured for reference to specific file and account names loaded from a csv file. The results should be output to a text file or displayed in an exportable window format.

Need more information buddy..

|||

That s perfect. Tell me what does the question mark "?" refer to in T-SQL. I used the script without it and i think ot still works. why do we hgave to use it?

Also you quoted the last question:

R.Tutus wrote:

Finally it then needs to search stored procedured for reference to specific file and account names loaded from a csv file. The results should be output to a text file or displayed in an exportable window format.

Do u have a clue on what does means or how it can be solved.

Thanks a lot, i ll let u know if i have more questions in undersatanding your script.

|||

? will replace the database name when you execute the sp_MSForEachDB.

sp_MSForEachDB is one of the system SP but none of the online document guide you (Undocumented SPs)..

If you remove the ? from the query, you wont get all the database's users information. This SP will automatically enumerate each database and execute the query..

|||Please don't use this system stored procedure. It is not documented nor supported. So we can/will remove it or modify the behavior without notice in any version of SQL Server or service pack. Instead you should write your own SP that uses dynamic SQL to execute the cmd or use sp_executesql itself.|||

Yes I agree this...

So tried to change the logic with following query...

Create Table #ServerLoginDetails
(
DataBaseName Varchar(1000)
,LoginName Varchar(1000)
,MemberOf Varchar(1000)
)
Go
Declare @.DB Table (Query varchar(8000));
Declare @.Query as Varchar(5000);
Declare @.Count as int;

Select @.Query = 'Insert Into #ServerLoginDetails
Select ''?'',Users.Name Loginname, Isnull(Groups.Name,''NA'') MemberOf From ?..Sysusers Users
Left Outer Join ?..Sysmembers Members On Members.memberuid = Users.Uid
Left Outer Join ?..Sysusers Groups On Groups.Uid = Members.GroupUid And Groups.IsLogin=0
Where Users.IsLogin=1';

Insert Into @.DB
Select Replace(@.Query,'?',Name) From Master..Sysdatabases;

Select @.Count = Count(Query) from @.DB
While @.Count <> 0
Begin
Select @.Query=Query From @.DB;
Exec(@.Query);
Delete From @.DB Where Query=@.Query;
Select @.Count = Count(Query) from @.DB;
End

Select * from #ServerLoginDetails
Go
Drop Table #ServerLoginDetails

|||

can u explain a bit Mani pls:

what s the member table used for and how did u join the 2. ( i see the code ) but i need explanantions on what joined columns represent in order to understand.

also cn u explain to me just generally the last script, how different it s from the first. just generally.

Thanks a lot.

|||

How can I change the script above (that looks up the users of all the databases) so that I get the permissions as well.

Thank you.

Is this SQL requirement possible?

I need a script that enumerates the the databases in a given instance of sql server. Then it needs to output the account with permissions on that server. Finally it then needs to search stored procedured for reference to specific file and account names loaded from a csv file. The results should be output to a text file or displayed in an exportable window format.

Thanks a lot

1. "enumerates the the databases" -yes, possible.

2. "output the account with permissions" -yes, possible.

3. "search stored procedured for reference to specific file and account names loaded from a csv file" -yes, possible.

Any more detailed help requires more detailed information from you.

|||

What I don t understand is this:

"search stored procedured for reference to specific file and account names loaded from a csv file"?

would u be able to guess what that means and if possible give me an example of it, please?

Thanks a lot.

|||

I don't wish to continue playing 'guessing games' with you.

I have previously attempted to 'guess' what you had in mind when you made the original post. If my response doesn't seem 'close to the mark' for you, I suggest that you refine your question and repost.

|||

R.Tutus wrote:

I need a script that enumerates the the databases in a given instance of sql server. Then it needs to output the account with permissions on that server.

The following query will do this..

Create Table #ServerLoginDetails
(
DataBaseName Varchar(1000)
,LoginName Varchar(1000)
,MemberOf Varchar(1000)
)
Go
Exec sp_MSforeachdb 'Insert Into #ServerLoginDetails
Select ''?'',Users.Name Loginname, Isnull(Groups.Name,''NA'') MemberOf From ?..Sysusers Users
Left Outer Join ?..Sysmembers Members On Members.memberuid = Users.Uid
Left Outer Join ?..Sysusers Groups On Groups.Uid = Members.GroupUid And Groups.IsLogin=0
Where Users.IsLogin=1'

Select * from #ServerLoginDetails
Go
Drop Table #ServerLoginDetails

R.Tutus wrote:

Finally it then needs to search stored procedured for reference to specific file and account names loaded from a csv file. The results should be output to a text file or displayed in an exportable window format.

Need more information buddy..

|||

That s perfect. Tell me what does the question mark "?" refer to in T-SQL. I used the script without it and i think ot still works. why do we hgave to use it?

Also you quoted the last question:

R.Tutus wrote:

Finally it then needs to search stored procedured for reference to specific file and account names loaded from a csv file. The results should be output to a text file or displayed in an exportable window format.

Do u have a clue on what does means or how it can be solved.

Thanks a lot, i ll let u know if i have more questions in undersatanding your script.

|||

? will replace the database name when you execute the sp_MSForEachDB.

sp_MSForEachDB is one of the system SP but none of the online document guide you (Undocumented SPs)..

If you remove the ? from the query, you wont get all the database's users information. This SP will automatically enumerate each database and execute the query..

|||Please don't use this system stored procedure. It is not documented nor supported. So we can/will remove it or modify the behavior without notice in any version of SQL Server or service pack. Instead you should write your own SP that uses dynamic SQL to execute the cmd or use sp_executesql itself.|||

Yes I agree this...

So tried to change the logic with following query...

Create Table #ServerLoginDetails
(
DataBaseName Varchar(1000)
,LoginName Varchar(1000)
,MemberOf Varchar(1000)
)
Go
Declare @.DB Table (Query varchar(8000));
Declare @.Query as Varchar(5000);
Declare @.Count as int;

Select @.Query = 'Insert Into #ServerLoginDetails
Select ''?'',Users.Name Loginname, Isnull(Groups.Name,''NA'') MemberOf From ?..Sysusers Users
Left Outer Join ?..Sysmembers Members On Members.memberuid = Users.Uid
Left Outer Join ?..Sysusers Groups On Groups.Uid = Members.GroupUid And Groups.IsLogin=0
Where Users.IsLogin=1';

Insert Into @.DB
Select Replace(@.Query,'?',Name) From Master..Sysdatabases;

Select @.Count = Count(Query) from @.DB
While @.Count <> 0
Begin
Select @.Query=Query From @.DB;
Exec(@.Query);
Delete From @.DB Where Query=@.Query;
Select @.Count = Count(Query) from @.DB;
End

Select * from #ServerLoginDetails
Go
Drop Table #ServerLoginDetails

|||

can u explain a bit Mani pls:

what s the member table used for and how did u join the 2. ( i see the code ) but i need explanantions on what joined columns represent in order to understand.

also cn u explain to me just generally the last script, how different it s from the first. just generally.

Thanks a lot.

|||

How can I change the script above (that looks up the users of all the databases) so that I get the permissions as well.

Thank you.

Monday, March 19, 2012

Is this a good scenario for a Service Broker application usage

Hi,

Please excuse me if I get some terms wrong - I am not a developer!!

I am working for a company who has a requirement to interface to a customer to query for work. The customer has an established Web Services that it uses for external interfacing, these services are passive at their end, in that it will be my clients who initiate all the communications using SOAP, receiving responses in XML.

There are, as I see it, seven conversations.

Receiving Datasets

1. Requests All new Jobs - This will be a post to a HTP with a list of job numbers sent back, These jobs will then need to be polled from the same webservice.

2. Job Changes - existing jobs that have changed definitions (costs etc..)- simular to above

3. Job Changes - Appointment Times

Sending Datasets

1. Completed Jobs - one at a time

2. Cancelled Jobs

3. Appointments (I believe this is responses to 1 and 3 above)

4. Subsequent Jobs - new work derived from initial Job.

I believe the sending datasets will be one way only (ie POST).

I have suggested using Service Broker for this application, with a custom App sitting inbetween ServiceBroker and the Web Service to deal with the HTTP POSTS and GETS, and communicating with the Service Broker, posting to queues and reading from them.

Is this viable?

Many Thaks

Lawrenso

We have found customers using Service Broker services to talk to webservices, a common scenario. If you build your apps as internally activated stored procedures (written using CLR), they will always run under the security context of the database engine service account and hence that principle will need access to the web from the machine on which the database engine is running. The other option is to use external applications (running as whatever user you want on whatever machine you choose) that connect to the database to RECEIVE messages from the queue and post requests to the web service. The second pattern does not have a built-in activation mechansim, but you could look at our External Activator sample (on GotDotNet codegallery and www.sqlservicebroker.com).

Rushi

Wednesday, March 7, 2012

Is there any way to Embed Word object using Reporting Services

Dear all,
We have requirement like we need to embed lots of Word Object in the Report.
I would like to know whether it is possible using Reporting Services.
Thanks & Regards,
AnilOn Feb 28, 8:40 am, Anil <A...@.discussions.microsoft.com> wrote:
> Dear all,
> We have requirement like we need to embed lots of Word Object in the Report.
> I would like to know whether it is possible using Reporting Services.
> Thanks & Regards,
> Anil
Could you give some examples of the word objects?
Enrique Martinez
Sr. SQL Server Developer|||Users are going to Attach MS-Word Document from their machine and those
MS-Word documents needs to be included in the Final Report generated by the
Reporting Services.
"EMartinez" wrote:
> On Feb 28, 8:40 am, Anil <A...@.discussions.microsoft.com> wrote:
> > Dear all,
> >
> > We have requirement like we need to embed lots of Word Object in the Report.
> > I would like to know whether it is possible using Reporting Services.
> >
> > Thanks & Regards,
> > Anil
> Could you give some examples of the word objects?
> Enrique Martinez
> Sr. SQL Server Developer
>

Friday, February 24, 2012

Is there any requirement to install the client component of RS?

Hi all,
I only install the client component of reporting service,
at the beginning, when it is install the support file, it
always failed with only an 'error' message. No other
messages.
I check the log file. There is
Internet Information Services 5.0 (IIS) or later is either
not installed, or it is configured in a way that is
incompatible with a Reporting Services installation.
ASP.NET version 1.1 is not installed or is not registered
with your Web server. ASP.Net is required for the Report
Server and the Report Manager components.
and in the stlog file, I notice
<Prerequisite Name="IsIISInstalled" Checked="Metabase"
Item="/" Found="Can not open metabase" Expected="No error"
Result="Fail" />
To only install the client component, should I install IIS
and ASP1.1 and how do I check that every thing is OK to
install it.
Thanks.
Lindayou need Visual studio.Net 2003 and .Net framework 1.1
IIS is not required
"YUKON2005" <anonymous@.discussions.microsoft.com> a écrit dans le message de
news:38d201c471e9$c199d760$a501280a@.phx.gbl...
> Hi all,
> I only install the client component of reporting service,
> at the beginning, when it is install the support file, it
> always failed with only an 'error' message. No other
> messages.
> I check the log file. There is
> Internet Information Services 5.0 (IIS) or later is either
> not installed, or it is configured in a way that is
> incompatible with a Reporting Services installation.
> ASP.NET version 1.1 is not installed or is not registered
> with your Web server. ASP.Net is required for the Report
> Server and the Report Manager components.
> and in the stlog file, I notice
> <Prerequisite Name="IsIISInstalled" Checked="Metabase"
> Item="/" Found="Can not open metabase" Expected="No error"
> Result="Fail" />
> To only install the client component, should I install IIS
> and ASP1.1 and how do I check that every thing is OK to
> install it.
> Thanks.
> Linda
>|||Thank you!
I will check it.
:)