Showing posts with label retrieve. Show all posts
Showing posts with label retrieve. Show all posts

Friday, March 9, 2012

Methods within an assembly

Is there a way to retrieve the methods within an assembly that are attributed with SqlTrigger or SqlProcedure using T-SQL?

There is not a built-in way to do this, but it is not overly difficult to write a SQLCLR procedure that would do this for you. Miles has an example of a trigger than contains essentially all the code you need to do what you want here: http://blogs.msdn.com/sqlclr/articles/495428.aspx

(Note, the assembly does already have to be loaded into the database in order for you to use Reflection to examine its methods).

Steven

methods of storing the Connection String in package configuration

hi!

I want to store the value of the Connection String in an Common table exisiting for the whole project and retrieve it for the whole package to Run. I want to know if there is a way of doing this.

I do not want to have a config file which is created trhough the package configuration.

In case of Parent package variable the Value of the variable needs to exist which again needs to execute the SQL Task which requires a connection string.

In case of Environment variabIe.I have very less knowledge about the environment variable . Even if we store it? how can we access it and change it in client place.

In case of SQL server . Can we store in an existing table. what is the configuration filter? what is the vlaue for it.

I do not want to execute any command line.............................

Thanks,

jazz

Well, I have not done this but I think you could simply have a parent package variable that uses a SQL Task to load the connection string for the child packages (obviously you need an initial connection string to load the config in the first place so I am assuming you are looking for a connection string to a second database.).

Once you do that you can use a script task in each of the child packages to explicitly set the Dts.Connections("ConnectionName").ConnectionString property manually based on the parent variable. You can use parent package configurations to map a parent variable to the child package so the designer can see the variable used.

Hope this helps...

|||

Can i execute a stored preocedure to get the connection string from the database while installing the pacakge which can set the value of the parent package variables.

Where i can use the Parent Package Varaible in Package Configuration to be accessed by the Child Packages.

is this ok......

Thanks

Wednesday, March 7, 2012

Metadata info retrieval

I am working on a project that needs to retrieve the metadata details of a s
chema (in MS SQL Server).
Could anyone help me out..
TIA,
ArrunHi
Check out the INFORMATION_SCHEMA views. More information can be found in
books online.
John
"Arrun S" <projdqe@.yahoo.co.in> wrote in message
news:CD63C343-75B4-4B6A-AE65-D9C552B25FAB@.microsoft.com...
quote:

> I am working on a project that needs to retrieve the metadata details of a

schema (in MS SQL Server).
quote:

> Could anyone help me out..
> TIA,
> Arrun

Meta Data retrieval

Greetings -
I need to know how I can retrieve the Meta Data Information about a procedur
e.
I know I can use SET FMTONLY ON to retrieve it but I need to retrieve this
dynamically - I need a call that will return a resultset containing the
information
instead of just a header info.
TIA,
KOYI'm not clear on what exactly you're asking for... perhaps a look at
the INFORMATION_SCHEMAs in BOL will be of help?
"Kayode Yusuf" <Kayode Yusuf@.discussions.microsoft.com> wrote in message
news:3C1FD323-4CE5-4313-ACCE-A4D8EEE6B599@.microsoft.com...
> Greetings -
> I need to know how I can retrieve the Meta Data Information about a
procedure.
> I know I can use SET FMTONLY ON to retrieve it but I need to retrieve
this
> dynamically - I need a call that will return a resultset containing the
> information
> instead of just a header info.
> TIA,
> KOY|||This is what I want - I want to get the META data for a procedure - it is no
t
contained anywhere - you can get it through SET FMTONLY ON and then execute
the procedure - essentially, it returns a Zero Length resultset. The questio
n
is this :
I want to dynamically process the result set - I need to know dynamically,
the column names returned by the execution through TSQL.
TIA,
KOU
"Armando Prato" wrote:

> I'm not clear on what exactly you're asking for... perhaps a look at
> the INFORMATION_SCHEMAs in BOL will be of help?
> "Kayode Yusuf" <Kayode Yusuf@.discussions.microsoft.com> wrote in message
> news:3C1FD323-4CE5-4313-ACCE-A4D8EEE6B599@.microsoft.com...
> procedure.
> this
>
>|||How about something like this? Change <your server>, <your username>, and
<your password>
to the values appropriate for your server.
select *
into #temp
from OPENROWSET('SQLOLEDB','<your server>';'<your username>';'<your
password>',
'set fmtonly off; exec sp_helpuser;')
where 1=2
select name
from tempdb..syscolumns
where id = object_id('tempdb..#temp')
drop table #temp
"Kayode Yusuf" <KayodeYusuf@.discussions.microsoft.com> wrote in message
news:334CE4E5-BC9F-41C7-BE14-DB39EAEAC0FA@.microsoft.com...
> This is what I want - I want to get the META data for a procedure - it is
not
> contained anywhere - you can get it through SET FMTONLY ON and then
execute
> the procedure - essentially, it returns a Zero Length resultset. The
question
> is this :
> I want to dynamically process the result set - I need to know dynamically,
> the column names returned by the execution through TSQL.
> TIA,
> KOU
> "Armando Prato" wrote:
>
retrieve
the

Meta Data

Greetings -
Can somebody please help me out with retrieving Meta Data dynamically for a
Stored Procedure.
I know I can use SET FRMONLY ON to retrieve it - but this return a Header
info. What I want is a resultset containing that META Data that can be
inserted or used in a SELECT statement fo further manipulations.
TIA.
KOY
See my response in microsoft.public.sqlserver.programming
"Kayode Yusuf" <KayodeYusuf@.discussions.microsoft.com> wrote in message
news:92EF08FB-0675-4B90-9563-E29482987018@.microsoft.com...
> Greetings -
> Can somebody please help me out with retrieving Meta Data dynamically for
a
> Stored Procedure.
> I know I can use SET FRMONLY ON to retrieve it - but this return a Header
> info. What I want is a resultset containing that META Data that can be
> inserted or used in a SELECT statement fo further manipulations.
> TIA.
> KOY
|||For starters, Tanx for the post. WHat needs to be done is process the
ResultSet in TSQL as done through an API.
If you make call a Call to SQLServer throughan API with SET FMTON - it
executes
the procedure and returns a zero lenght resultselt - the META Data - you can
then through the API - iterate through th ResultSet Column names to find out
the META data for the procedure.
Essentially, I want to achive the Same in TSQL mode - I need to get the META
data of a Stored procedure and be able to identify the Columns returned by
the call using SET FMTONL directive.
TIA,
KOY
"Armando Prato" wrote:

> See my response in microsoft.public.sqlserver.programming
>
> "Kayode Yusuf" <KayodeYusuf@.discussions.microsoft.com> wrote in message
> news:92EF08FB-0675-4B90-9563-E29482987018@.microsoft.com...
> a
>
>

Meta Data

Greetings -
Can somebody please help me out with retrieving Meta Data dynamically for a
Stored Procedure.
I know I can use SET FRMONLY ON to retrieve it - but this return a Header
info. What I want is a resultset containing that META Data that can be
inserted or used in a SELECT statement fo further manipulations.
TIA.
KOYSee my response in microsoft.public.sqlserver.programming
"Kayode Yusuf" <KayodeYusuf@.discussions.microsoft.com> wrote in message
news:92EF08FB-0675-4B90-9563-E29482987018@.microsoft.com...
> Greetings -
> Can somebody please help me out with retrieving Meta Data dynamically for
a
> Stored Procedure.
> I know I can use SET FRMONLY ON to retrieve it - but this return a Header
> info. What I want is a resultset containing that META Data that can be
> inserted or used in a SELECT statement fo further manipulations.
> TIA.
> KOY|||For starters, Tanx for the post. WHat needs to be done is process the
ResultSet in TSQL as done through an API.
If you make call a Call to SQLServer throughan API with SET FMTON - it
executes
the procedure and returns a zero lenght resultselt - the META Data - you can
then through the API - iterate through th ResultSet Column names to find out
the META data for the procedure.
Essentially, I want to achive the Same in TSQL mode - I need to get the META
data of a Stored procedure and be able to identify the Columns returned by
the call using SET FMTONL directive.
TIA,
KOY
"Armando Prato" wrote:

> See my response in microsoft.public.sqlserver.programming
>
> "Kayode Yusuf" <KayodeYusuf@.discussions.microsoft.com> wrote in message
> news:92EF08FB-0675-4B90-9563-E29482987018@.microsoft.com...
> a
>
>

Meta Data

Greetings -
Can somebody please help me out with retrieving Meta Data dynamically for a
Stored Procedure.
I know I can use SET FRMONLY ON to retrieve it - but this return a Header
info. What I want is a resultset containing that META Data that can be
inserted or used in a SELECT statement fo further manipulations.
TIA.
KOYSee my response in microsoft.public.sqlserver.programming
"Kayode Yusuf" <KayodeYusuf@.discussions.microsoft.com> wrote in message
news:92EF08FB-0675-4B90-9563-E29482987018@.microsoft.com...
> Greetings -
> Can somebody please help me out with retrieving Meta Data dynamically for
a
> Stored Procedure.
> I know I can use SET FRMONLY ON to retrieve it - but this return a Header
> info. What I want is a resultset containing that META Data that can be
> inserted or used in a SELECT statement fo further manipulations.
> TIA.
> KOY|||For starters, Tanx for the post. WHat needs to be done is process the
ResultSet in TSQL as done through an API.
If you make call a Call to SQLServer throughan API with SET FMTON - it
executes
the procedure and returns a zero lenght resultselt - the META Data - you can
then through the API - iterate through th ResultSet Column names to find out
the META data for the procedure.
Essentially, I want to achive the Same in TSQL mode - I need to get the META
data of a Stored procedure and be able to identify the Columns returned by
the call using SET FMTONL directive.
TIA,
KOY
"Armando Prato" wrote:
> See my response in microsoft.public.sqlserver.programming
>
> "Kayode Yusuf" <KayodeYusuf@.discussions.microsoft.com> wrote in message
> news:92EF08FB-0675-4B90-9563-E29482987018@.microsoft.com...
> > Greetings -
> >
> > Can somebody please help me out with retrieving Meta Data dynamically for
> a
> > Stored Procedure.
> >
> > I know I can use SET FRMONLY ON to retrieve it - but this return a Header
> > info. What I want is a resultset containing that META Data that can be
> > inserted or used in a SELECT statement fo further manipulations.
> >
> > TIA.
> >
> > KOY
>
>