Re: question on sql

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



1) I have no idea what you're talking about. "File location"?
2) SQL Server Management Studio (the 2005 version) does not support this. I
have asked for this feature but to no avail. It would be nice to be able to
organize SPs into categories.SSMS does support a "filter" setting that can
be used to show stored procedures that qualify for the filter. Another
technique is to use namespaces for the procedures. For example,
business_accounting_yearendprocessing. No, you can't use the "." separator.
You can/should organize your procedures by schema as well.
3) Yes crdate will tell you when the stored procedure was created, but each
object in SQL Server supports Extended Properties. These can be anything you
like. This means you could create a custom object management system to set
create date, date modified, person to blame or anything else as a property.
These can be read programmatically as well. See my articles on extended
stored procedures.

--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
INETA Speaker
www.betav.com/blog/billva
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________

"W.G. Ryan - MVP" <WilliamRyan@xxxxxxxxxxxxxxxx> wrote in message
news:uKOWe8oIGHA.3936@xxxxxxxxxxxxxxxxxxxxxxx
>
> "ken" <ken@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
> news:DD1922C8-2915-41B1-834D-DB17BC8020CD@xxxxxxxxxxxxxxxx
>> Dear all
>> 1.)How can i save the stored procedure in sql 2005 server, into server
>> and
>> NOT in file location
> --Do you want to just create a Stored Procedure via Code and not have to
> read it in from a file, and then be able to retrieve it? If so, you can
> just set your commandtext property of your command object to the stored
> proc code, and you can use sp_helptext '[ @objname = ] 'name' [ , [
> @columnname = ] computed_column_name ] to retrieve the text afterward. If
> you use a datareader for instance, you'd just set the CommandType to to
> CommandType.StoredProcedure. Then you'd add the @objname parameter which
> would be the name of the proc you just wrote. You can use a dataReader
> and then use SqlDataReader dr = MyCommandName.ExecuteReader(and a
> commandbehavior here as you normally would).
>
> Then while(dr.Read()){
> Debug.WriteLine(dr[0].ToString());
> }//Or however you want the text, I'm just using WriteLine for illustrative
> purposes
>>
>> 2.)How can create folder in stored procedure to separate categories?
> --I'm not sure I follow you here. Are you looking for some sort of folder
> structure with Management Studio? If so, I don't know of a way to
> accomplish that (note though that I'm not saying it can't be done, I'm
> just personally unaware of such a feature - but would like to know the
> answer as well).
>>
>> 3.)How can view the created date and modify date of stored pro
> --I believe you can check the system catalog and look at Sysobjects for
> instance - looking at the crdate field. There is probably a new
> management view as well that has this, I don't happen to know of one off
> the top of my head. You may want to run this by the Sql Server NG group
> as well in that there is probably a newer more elegant way to get at this
> data, I'm not sure.
>
> HTH,
>
> Bill
>>
>>
>>
>>
>
>


.



Relevant Pages

  • Re: How to get list of EventClasses in MSSQLServer2000
    ... statement inside a stored procedure has completed.') ... SQL Server statement or stored procedure.') ... Plan','Displays the plan tree of the Transact-SQL statement executed.') ... Login','Occurs when a SQL Server login is added or removed; ...
    (microsoft.public.sqlserver.security)
  • Re: Accessing FoxPro Free Table
    ... which the SQL Server service is running. ... account, ... > If you are creating a stored procedure and you want> to make sure that the procedure definition cannot be> viewed by other users, you can use the WITH ENCRYPTION> clause. ... The procedure definition is then stored in an> unreadable form. ...
    (microsoft.public.data.odbc)
  • Re: Adding date to parameter
    ... SqlClient provider which is specifically written for SQL Server. ... Hitchhiker's Guide to Visual Studio and SQL Server ... and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook) ... I made the assumption that the stored procedure went by the ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Problem with the Legacy ASP files and the Sql Server Express
    ... table, if another inserting occurs at the nearly exactly the same moment, ... SQL Server will pass it a default value. ... assume that you do have a connection that can reach SQL Server Express. ... unless your stored procedure has some thing that only works ...
    (microsoft.public.dotnet.framework.aspnet)
  • Stored procedure does not complete until result set is retrieved from ODBC
    ... I have a SQL Server Stored procedure that I am executing via ODBC. ... -- Start Code without cursor ...
    (microsoft.public.sqlserver.odbc)