Home All Groups Group Topic Archive Search About

Using Sql 2005 Management Studio for SPs

Author
10 Mar 2006 6:41 PM
randy1200
In the Management Studio, I'm able to go under Databases, [my database],
Programmability, Stored Procedures, and create a new stored procedure. This
is great.

Next, I want to register my brand new stored procedure in a .NET assembly. 
Under Analysis Server, I right click Assemblies, and click New Assembly.
Under File Name, I can't create a new file.dll here. It's requiring me to
provide an existing dll. Where does this dll comes from?

Please be as precise as possible.

--
Randy

Author
10 Mar 2006 6:48 PM
Aaron Bertrand [SQL Server MVP]
Some people are comfortable with compiling .NET stuff using the command
line.  Most database folks would probably prefer using the Visual Studio
environment for that.




Show quote
"randy1200" <randy1200@newsgroups.nospam> wrote in message
news:9D6FD7D9-EE73-4A36-81B4-E24F8299BB18@microsoft.com...
> In the Management Studio, I'm able to go under Databases, [my database],
> Programmability, Stored Procedures, and create a new stored procedure.
> This
> is great.
>
> Next, I want to register my brand new stored procedure in a .NET assembly.
> Under Analysis Server, I right click Assemblies, and click New Assembly.
> Under File Name, I can't create a new file.dll here. It's requiring me to
> provide an existing dll. Where does this dll comes from?
>
> Please be as precise as possible.
>
> --
> Randy
Author
10 Mar 2006 7:39 PM
randy1200
Here's the answer I'm looking for:

You created a stored procedure in SSMS, and saved it as a sql. Now, you can
go into Visual Studio 2005, and compile ?????????. This will create a .NET
assembly. You can then use SSMS to place the stored procedure in the .NET
assembly.

Help me out with ????? please.
--
Randy


Show quote
"Aaron Bertrand [SQL Server MVP]" wrote:

> Some people are comfortable with compiling .NET stuff using the command
> line.  Most database folks would probably prefer using the Visual Studio
> environment for that.
>
>
>
>
> "randy1200" <randy1200@newsgroups.nospam> wrote in message
> news:9D6FD7D9-EE73-4A36-81B4-E24F8299BB18@microsoft.com...
> > In the Management Studio, I'm able to go under Databases, [my database],
> > Programmability, Stored Procedures, and create a new stored procedure.
> > This
> > is great.
> >
> > Next, I want to register my brand new stored procedure in a .NET assembly.
> > Under Analysis Server, I right click Assemblies, and click New Assembly.
> > Under File Name, I can't create a new file.dll here. It's requiring me to
> > provide an existing dll. Where does this dll comes from?
> >
> > Please be as precise as possible.
> >
> > --
> > Randy
>
>
>
Author
10 Mar 2006 7:58 PM
Aaron Bertrand [SQL Server MVP]
I really don't have any experience with ?????.  You may have better luck in
the microsoft.public.sqlserver.clr group.





Show quote
"randy1200" <randy1200@newsgroups.nospam> wrote in message
news:E1CF97FE-2299-44F8-BE3B-68948E6E777D@microsoft.com...
> Here's the answer I'm looking for:
>
> You created a stored procedure in SSMS, and saved it as a sql. Now, you
> can
> go into Visual Studio 2005, and compile ?????????. This will create a .NET
> assembly. You can then use SSMS to place the stored procedure in the .NET
> assembly.
>
> Help me out with ????? please.
> --
> Randy
>
>
> "Aaron Bertrand [SQL Server MVP]" wrote:
>
>> Some people are comfortable with compiling .NET stuff using the command
>> line.  Most database folks would probably prefer using the Visual Studio
>> environment for that.
>>
>>
>>
>>
>> "randy1200" <randy1200@newsgroups.nospam> wrote in message
>> news:9D6FD7D9-EE73-4A36-81B4-E24F8299BB18@microsoft.com...
>> > In the Management Studio, I'm able to go under Databases, [my
>> > database],
>> > Programmability, Stored Procedures, and create a new stored procedure.
>> > This
>> > is great.
>> >
>> > Next, I want to register my brand new stored procedure in a .NET
>> > assembly.
>> > Under Analysis Server, I right click Assemblies, and click New
>> > Assembly.
>> > Under File Name, I can't create a new file.dll here. It's requiring me
>> > to
>> > provide an existing dll. Where does this dll comes from?
>> >
>> > Please be as precise as possible.
>> >
>> > --
>> > Randy
>>
>>
>>
Author
10 Mar 2006 7:59 PM
Tibor Karaszi
You don't write the procedure using TSQL, the whole point of the .NET integration is that you write
the procedure using VB.NET or C#.NET. You can do this using Notepad and command-line compile into an
assembly. Then you import that assembly into SQL Server using  CREATE ASSEMBLY and create your
procedure from that imported assembly using CREATE PROCEDURE. Or, write the assembly using VS which
can do CREATE ASSEMBLY and CREATE PROCEDURE for you. If you want to use VS, create VB or C#,
Database, SQL Server project.

Show quote
"randy1200" <randy1200@newsgroups.nospam> wrote in message
news:9D6FD7D9-EE73-4A36-81B4-E24F8299BB18@microsoft.com...
> In the Management Studio, I'm able to go under Databases, [my database],
> Programmability, Stored Procedures, and create a new stored procedure. This
> is great.
>
> Next, I want to register my brand new stored procedure in a .NET assembly.
> Under Analysis Server, I right click Assemblies, and click New Assembly.
> Under File Name, I can't create a new file.dll here. It's requiring me to
> provide an existing dll. Where does this dll comes from?
>
> Please be as precise as possible.
>
> --
> Randy
Author
10 Mar 2006 10:30 PM
randy1200
According to Microsoft, writing a CLR Stored Procedure in T-SQL or C# or
VB.NET is just fine.

I don't believe the command line is the only option for creating the
assembly. I strongly suspect the correct sequence starts with creating a
Database project. I don't know what the sequence of steps is after that.

I'm still hoping someone who knows how to create an assembly for a stored
procedure using Visual Studio 2005 will post.
--
Randy


Show quote
"Tibor Karaszi" wrote:

> You don't write the procedure using TSQL, the whole point of the .NET integration is that you write
> the procedure using VB.NET or C#.NET. You can do this using Notepad and command-line compile into an
> assembly. Then you import that assembly into SQL Server using  CREATE ASSEMBLY and create your
> procedure from that imported assembly using CREATE PROCEDURE. Or, write the assembly using VS which
> can do CREATE ASSEMBLY and CREATE PROCEDURE for you. If you want to use VS, create VB or C#,
> Database, SQL Server project.
>
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> Blog: http://solidqualitylearning.com/blogs/tibor/
>
>
> "randy1200" <randy1200@newsgroups.nospam> wrote in message
> news:9D6FD7D9-EE73-4A36-81B4-E24F8299BB18@microsoft.com...
> > In the Management Studio, I'm able to go under Databases, [my database],
> > Programmability, Stored Procedures, and create a new stored procedure. This
> > is great.
> >
> > Next, I want to register my brand new stored procedure in a .NET assembly.
> > Under Analysis Server, I right click Assemblies, and click New Assembly.
> > Under File Name, I can't create a new file.dll here. It's requiring me to
> > provide an existing dll. Where does this dll comes from?
> >
> > Please be as precise as possible.
> >
> > --
> > Randy
>
>
Author
11 Mar 2006 1:10 AM
Roger Wolter[MSFT]
Ahh! so you want to use Visual Studio, not management studio as your title
suggests.  This is too big a topic to cover in a newsgroup post so I suggest
either trying the tutorials or the samples in the SQL or Visual Studio
documentation.  Basically you create a database project, add the methods you
want to expose as stored procedures and then click "Deploy this project" and
Visual Studio will compile your code, load it into SQL Server, create the
stored procedure, and create a test script to run it.

--
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm

Show quote
"randy1200" <randy1200@newsgroups.nospam> wrote in message
news:97B07328-D067-4067-9E21-9FD280586146@microsoft.com...
> According to Microsoft, writing a CLR Stored Procedure in T-SQL or C# or
> VB.NET is just fine.
>
> I don't believe the command line is the only option for creating the
> assembly. I strongly suspect the correct sequence starts with creating a
> Database project. I don't know what the sequence of steps is after that.
>
> I'm still hoping someone who knows how to create an assembly for a stored
> procedure using Visual Studio 2005 will post.
> --
> Randy
>
>
> "Tibor Karaszi" wrote:
>
>> You don't write the procedure using TSQL, the whole point of the .NET
>> integration is that you write
>> the procedure using VB.NET or C#.NET. You can do this using Notepad and
>> command-line compile into an
>> assembly. Then you import that assembly into SQL Server using  CREATE
>> ASSEMBLY and create your
>> procedure from that imported assembly using CREATE PROCEDURE. Or, write
>> the assembly using VS which
>> can do CREATE ASSEMBLY and CREATE PROCEDURE for you. If you want to use
>> VS, create VB or C#,
>> Database, SQL Server project.
>>
>> --
>> Tibor Karaszi, SQL Server MVP
>> http://www.karaszi.com/sqlserver/default.asp
>> http://www.solidqualitylearning.com/
>> Blog: http://solidqualitylearning.com/blogs/tibor/
>>
>>
>> "randy1200" <randy1200@newsgroups.nospam> wrote in message
>> news:9D6FD7D9-EE73-4A36-81B4-E24F8299BB18@microsoft.com...
>> > In the Management Studio, I'm able to go under Databases, [my
>> > database],
>> > Programmability, Stored Procedures, and create a new stored procedure.
>> > This
>> > is great.
>> >
>> > Next, I want to register my brand new stored procedure in a .NET
>> > assembly.
>> > Under Analysis Server, I right click Assemblies, and click New
>> > Assembly.
>> > Under File Name, I can't create a new file.dll here. It's requiring me
>> > to
>> > provide an existing dll. Where does this dll comes from?
>> >
>> > Please be as precise as possible.
>> >
>> > --
>> > Randy
>>
>>
Author
11 Mar 2006 6:28 AM
Tibor Karaszi
> According to Microsoft, writing a CLR Stored Procedure in T-SQL or C# or
> VB.NET is just fine.

Can you point me to where MS say this? You don't write a CLR procedure in TSQL. You write a TSQL
procedure in TSQL. And, you write a CRL procedure in C# or VB.NET (and you can of course execute
TSQL commands from that code using ADO.NET, but the host language is either C# or VB.NET).


> I don't believe the command line is the only option for creating the
> assembly.

I didn't say that. I also pointed you to how you create such a Visual Studio project, and that VS
will compile the assembly, import it and create the proc for you. Se my former post, and check out
Rogers reply as well.
Show quote
"randy1200" <randy1200@newsgroups.nospam> wrote in message
news:97B07328-D067-4067-9E21-9FD280586146@microsoft.com...
> According to Microsoft, writing a CLR Stored Procedure in T-SQL or C# or
> VB.NET is just fine.
>
> I don't believe the command line is the only option for creating the
> assembly. I strongly suspect the correct sequence starts with creating a
> Database project. I don't know what the sequence of steps is after that.
>
> I'm still hoping someone who knows how to create an assembly for a stored
> procedure using Visual Studio 2005 will post.
> --
> Randy
>
>
> "Tibor Karaszi" wrote:
>
>> You don't write the procedure using TSQL, the whole point of the .NET integration is that you
>> write
>> the procedure using VB.NET or C#.NET. You can do this using Notepad and command-line compile into
>> an
>> assembly. Then you import that assembly into SQL Server using  CREATE ASSEMBLY and create your
>> procedure from that imported assembly using CREATE PROCEDURE. Or, write the assembly using VS
>> which
>> can do CREATE ASSEMBLY and CREATE PROCEDURE for you. If you want to use VS, create VB or C#,
>> Database, SQL Server project.
>>
>> --
>> Tibor Karaszi, SQL Server MVP
>> http://www.karaszi.com/sqlserver/default.asp
>> http://www.solidqualitylearning.com/
>> Blog: http://solidqualitylearning.com/blogs/tibor/
>>
>>
>> "randy1200" <randy1200@newsgroups.nospam> wrote in message
>> news:9D6FD7D9-EE73-4A36-81B4-E24F8299BB18@microsoft.com...
>> > In the Management Studio, I'm able to go under Databases, [my database],
>> > Programmability, Stored Procedures, and create a new stored procedure. This
>> > is great.
>> >
>> > Next, I want to register my brand new stored procedure in a .NET assembly.
>> > Under Analysis Server, I right click Assemblies, and click New Assembly.
>> > Under File Name, I can't create a new file.dll here. It's requiring me to
>> > provide an existing dll. Where does this dll comes from?
>> >
>> > Please be as precise as possible.
>> >
>> > --
>> > Randy
>>
>>

AddThis Social Bookmark Button