Showing posts with label tool. Show all posts
Showing posts with label tool. Show all posts

Tuesday, March 27, 2012

Creating XML Document from SQL Server

Would anyone please help me , how to create XML document
for a specific record from the SQL Server database.
Is there any builtin tool available. If so, how to access
it.
Would I need to create a program to generate XML
document. If so, could you suggest the development
package/code examples...
Appreciate the info.
Would something along the line of
select * from T for xml auto
or
select * from T for xml raw
help?
Best regards
Michael
"Sat" <anonymous@.discussions.microsoft.com> wrote in message
news:442c01c42b8b$f0669640$a001280a@.phx.gbl...
> Would anyone please help me , how to create XML document
> for a specific record from the SQL Server database.
> Is there any builtin tool available. If so, how to access
> it.
> Would I need to create a program to generate XML
> document. If so, could you suggest the development
> package/code examples...
> Appreciate the info.

Monday, March 19, 2012

Creating SQL Script with code

Hello there
I have huge databse that i need to generate it to script sometimes
The Sql Generate SQL Script tool is not smart: it build the tables, views,
store procedures and function on the end. But if the view or store procedure
is based on one of the functions the script won't work
Therefore i need to develop my own tool for scripting databse.
Is the a way to get script that create each object in the system, including
all its items?
..
roy@.atidsm.co.il
: 03-5611606
' 050-7709399> The Sql Generate SQL Script tool is not smart: it build the tables, views,
> store procedures and function on the end. But if the view or store
procedure
> is based on one of the functions the script won't work
If you are using EM, you can find on the Formatting tab an otion to include
all dependet objects.

> Therefore i need to develop my own tool for scripting databse.
> Is the a way to get script that create each object in the system,
including
> all its items?
As EM and QA, you can use SQL DMO to script objects. heck
http://www.karaszi.com/sqlserver/in...ate_script.asp.
Dejan Sarka, SQL Server MVP
Associate Mentor
www.SolidQualityLearning.com|||Hi,
I would suggest you to use sp_helptext or retrieve info from syscomments
table.
Ed
"Roy Goldhammer" wrote:

> Hello there
> I have huge databse that i need to generate it to script sometimes
> The Sql Generate SQL Script tool is not smart: it build the tables, views,
> store procedures and function on the end. But if the view or store procedu
re
> is based on one of the functions the script won't work
> Therefore i need to develop my own tool for scripting databse.
> Is the a way to get script that create each object in the system, includin
g
> all its items?
> --
> ??òé a?ì????
> ù.?. òúé? ?e??ú ú??e?
> roy@.atidsm.co.il
> èì: 03-5611606
> ?ì_' 050-7709399
>
>|||Perhaps you messe dsomething up, there is a way to script all object
depending the one you want to have via UI. SO the follwing code, will
procuding the script for creating the Function and the view if you only
select the view to create and check the checkbox saying to script also
depending objects.
Try it out,
HTH, Jens Smeyer.
http://www.sqlserver2005.de
--
CREATE FUNCTION [dbo].FCT_YadaYada()
RETURNS INT AS
BEGIN
return 1
END
Create View VI_YadaYada
AS
Select dbo.FCT_YadaYada() as YadaYada
"Roy Goldhammer" <roygoldh@.hotmail.com> schrieb im Newsbeitrag
news:%23%23pvEFYQFHA.3076@.tk2msftngp13.phx.gbl...
> Hello there
> I have huge databse that i need to generate it to script sometimes
> The Sql Generate SQL Script tool is not smart: it build the tables, views,
> store procedures and function on the end. But if the view or store
> procedure
> is based on one of the functions the script won't work
> Therefore i need to develop my own tool for scripting databse.
> Is the a way to get script that create each object in the system,
> including
> all its items?
> --
>
> ..
> roy@.atidsm.co.il
> : 03-5611606
> ' 050-7709399
>

Creating SQL database "Users" pulled from Active directory OU

Is there a tool, or does anyone have a script format that might automaticall
y
pull in AD accounts from an OU and put them in the Users group of a specific
database.
If there is an article or existing document on this I have not been able to
find it.
I would appreciate any help anyone can give whereas if I can't find this, I
will have to type in about 2000 users into my database from a hard copy.
There has to be a way. Even if someone can tell me what table and field the
users are listed in, I can probably script it from that.
Thanks in advance
gordonJust so I understand, when you create a database, you want SQL to
automatically pull in users AD and grant them access to the database?
"gordon" wrote:

> Is there a tool, or does anyone have a script format that might automatica
lly
> pull in AD accounts from an OU and put them in the Users group of a specif
ic
> database.
> If there is an article or existing document on this I have not been able t
o
> find it.
> I would appreciate any help anyone can give whereas if I can't find this,
I
> will have to type in about 2000 users into my database from a hard copy.
> There has to be a way. Even if someone can tell me what table and field t
he
> users are listed in, I can probably script it from that.
> Thanks in advance
> gordon|||Yes. Actually the database is already created. Right now, I have to
manually add every user in an AD OU to the "Users" group in SQL 2000. Then
I
have to assign them either Public or another role, manually. As you might
imagine, this is very time consuming. I have seen ADSI scripts pull
information from OU's in AD to tables in SQL, but not to the USERS group (yo
u
know, where you have diagrams, views, tables, users, roles etc. ) I want to
add the AD user to the USers in SQL.
Thanks for the response!!!!
"John Barr" wrote:
> Just so I understand, when you create a database, you want SQL to
> automatically pull in users AD and grant them access to the database?
> "gordon" wrote:
>|||I understand, and yes, it is possible, but it will taking some coding.You
will have to create a VBScript to read AD based on an OU name that you pass
and access SQL Server to execute a stored procedure to do dynamic SQL to add
the user if it is not existing, and grant it the rights you will need. It
will be time consuming to create, but it will eliminate the manual addtions.
You can get the VBScript to access AD in the Script Center on Microsofts
Site, and write those users into a table using ADO, then execute a Stored
Procedure. Seems a little hectic, but it would work.
"gordon" wrote:
> Yes. Actually the database is already created. Right now, I have to
> manually add every user in an AD OU to the "Users" group in SQL 2000. The
n I
> have to assign them either Public or another role, manually. As you might
> imagine, this is very time consuming. I have seen ADSI scripts pull
> information from OU's in AD to tables in SQL, but not to the USERS group (
you
> know, where you have diagrams, views, tables, users, roles etc. ) I want t
o
> add the AD user to the USers in SQL.
> Thanks for the response!!!!
>
> "John Barr" wrote:
>|||I appreciate it. I knew it would be that much work, was wondering ifanyone
had done it and I could use their code and modify it for my OU's. Or if
there were any Microsoft Technical articles showing how.
Thanks for the responses.
"John Barr" wrote:
> I understand, and yes, it is possible, but it will taking some coding.You
> will have to create a VBScript to read AD based on an OU name that you pas
s
> and access SQL Server to execute a stored procedure to do dynamic SQL to a
dd
> the user if it is not existing, and grant it the rights you will need. It
> will be time consuming to create, but it will eliminate the manual addtion
s.
> You can get the VBScript to access AD in the Script Center on Microsofts
> Site, and write those users into a table using ADO, then execute a Stored
> Procedure. Seems a little hectic, but it would work.
> "gordon" wrote:
>|||Hi
What are you not using roles and permissioning via AD group membership? It
is the recommenced way to manage users in SQL Server.
Add the users in AD to a group, then add the group the SQL Server. Then when
a new user arrives, you just add the person to the AD group and then the
user has the permission in the DB. When the user leaves, there is no
maintenance to be done at SQL Server level, only at AD level.
Books online has a lot of information DB roles and AD group membership.
Regards
--
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"gordon" <gordon@.discussions.microsoft.com> wrote in message
news:03540F8D-A377-4207-8093-4DA0F6225D81@.microsoft.com...
> Yes. Actually the database is already created. Right now, I have to
> manually add every user in an AD OU to the "Users" group in SQL 2000.
> Then I
> have to assign them either Public or another role, manually. As you might
> imagine, this is very time consuming. I have seen ADSI scripts pull
> information from OU's in AD to tables in SQL, but not to the USERS group
> (you
> know, where you have diagrams, views, tables, users, roles etc. ) I want
> to
> add the AD user to the USers in SQL.
> Thanks for the response!!!!
>
> "John Barr" wrote:
>

Friday, February 17, 2012

Creating dynamic reports

Hello.

I wanted to know a way to create dynamic reports using reporting / analysis services in SQL Server 2005 / SSIS tool.

I want user to give inputs and generate reports based on those inputs.

Please guide me on this issue.

Thank you.

Regards,

Prathamesh

Hello Domnick....

In Report Services, you have basically two ways to do this....

1- The Input Paremeter can stay in the Report Services

2- The Input Parameter can stay in application and can be sent to Report Services by the Url ( Named Url Access )

1--> If in Query of your DataSet, you have a parameter (Ex: @.ID), Automatically it will be detected by Report Services, and it can be edited by the Report Parematers -->In Layout View / Right Click at the Fund Plane of Your Report / Report Parameters

Or the input parameter can be added manually in this same location (I don′t recomended)

2--> Sample :

http://server/reportserver?/Sales/Northwest/Employee Sales Report&rs:Command=Render&ID=1234

Is this your problem?