Lost User Stored Procedures

Jun 2, 2007

Hi,



I presume the two problems I have are actually one. (hopefully)



I copied my database from my client machine, to a small business server when I deployed the application.

When I ran the program, where it called up a stored procedure, I got an error message

The EXECUTE permission was denied on the object 'Empty Temp Tables' database datbasename, schema 'dbo'



The procedures are there and visible in the Visual Studio IDE and they were there in the Sql Data directory, from where I copied the database files. I checked this from Management Studio on the client machine.



I decided to check my stored procedures in Management Studio on the server, and it seems the whole folder is missing.



Help would be appreciated













View 3 Replies


ADVERTISEMENT

Lost With Stored Procedures -- Help Please

Aug 22, 2007

Hi,

Looking to create a stored procedure that will take a value from a webpage and display the information from another table. I think i need a variable fed to the SP but am not sure how to do it.

Here is a little background:

I have a database that tracks customer requirements and there are 2 tables that I am concerned with. tbl3215 and tbllog. The common theme between them is a field called ittnumber. Basically what happens is this:

a web application user selects a workcenter that they want to see what requirements are against their office. They select the one they want to view and via a hyperlink the information is given to them in a new window.

That part works great; the part that does not work at all is the part that i want to pull a few columns from the tbllog table. I want it to show all log entries for that particular requirement and only that requirement. This is where i am completely stuck.

How do i get both gridviews to work? I think it is in the stored procedure but like i said i dont know how to take the value selected and return those fields.

here is my stored procedure:

USE [SCX_3215]
GO
/****** Object: StoredProcedure [dbo].[ResultsQuery] Script Date: 08/22/2007 14:37:33 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [dbo].[ResultsQuery]
(
@ittNumber varchar(50),
@ittLog varchar(max),
@LogDate nvarchar(50),
@LogUserID varchar(1),
@LogID nvarchar(50)
)
AS
SET NOCOUNT OFF;
SELECT distinct tbllog.IttNumber, tbllog.IttLog, tbllog.LogDate, tbl3215.IttNumber AS Expr1
FROM tbllog CROSS JOIN tbl3215
WHERE (tbllog.IttNumber = tbl3215.ittnumber)
ORDER BY ittnumber

The stored procedure that works is the one that pulls all the columns from tbl3215 and is diplayed here as well:

USE [SCX_3215]

SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [dbo].[Hyperlink]
{

@ittnumber varchar(max)
}

AS

SET NOCOUNT OFF;
SELECT DISTINCT ittnumber, itttitle, ittdescription, ittjustification, techsolution, datereceived, daterequired, customer, orgid, priority, funded, completed, CompletionDate,Disapproved, DisReason FROM tbl3215 WHERE (ittnumber = @ittnumber) ORDER BY ittnumber


Can anyone help me? I appreciate the assistance. Please let me know if you need more information

Joe





View 5 Replies View Related

Lost SQL 2005 Tables And Stored Procedures

Apr 21, 2006

I converted a program from SQL 2000 to SQL 2005 all went well. I created a number of tables and stored procedures after the conversion. I backed up my .mdf and .idf files. I was having problems with SQL so I uninstalled and re-installed it. Once I re-installed it I could no longer display some tables and files. Since I am the dbo, I think I should be able to access them. There obviously is something I am missing, hopefully not the tables and sps.

I would appreciate any suggestions.

Thank you.

LitePipe

View 4 Replies View Related

User Stored Procedures

Nov 30, 2006

is there a sql query i can type in to list all the user stored procedures for the tables within my database?

or do i have to find them manually and how?

View 16 Replies View Related

User Stored Procedures

Jul 10, 2007

Dear all,
How to find out how many user stored procedures are there in a single Database in sql server.


Thanks,
msrs

View 6 Replies View Related

Using User Functions In Stored Procedures

Feb 1, 2005

Hi There,
I've written an inline table-valued function in SQL such as the following:

ALTER FUNCTION dbo.GetCityByID( @CityID int)
RETURNS TABLE
AS
RETURN(
SELECT
Name,
Url
FROM Cities
WHERE (CityID = @CityID) )

suppose that Cities table includes three fields (CityID, Name, Url).

By the way I wrote a store procedure as follow:

ALTER PROCEDURE MyProcedure ( @MyID int)
AS
SELECT
CountryID,
OriginCityID,
DestCityID
FROM
MyTable
WHERE (MyID = @MyID)

The OriginCityID and DestCityID are related to CityID in Cities table. I wanna get the name
and url of each city by its ID through this stored procedue by making relation to Cities table.
so I call GetCityByID function in my stored procedure like this:

ALTER PROCEDURE MyProcedure ( @MyID int)
AS
SELECT
CountryID,
dbo.GetCityByID(OriginCityID),
dbo.GetCityByID(DestCityID)
FROM
MyTable
WHERE (MyID = @MyID)

this procedure dosn't work an returns error.

What's your solution for getting information from Cities table for OriginCityID and DestCityID?
Thank you in advance.

View 1 Replies View Related

SQL 2012 :: User Is Not Able To See Stored Procedures

Jun 12, 2015

user have db_datareader role in in a database.But user is not able to see the stored procedures.

View 5 Replies View Related

User Who Can Connect/run Stored Procedures Only?

Nov 6, 2007

I'm new to 2005 (new to sql server in general). Up until now it's only been writing easy stored procedures. Read that it's a good idea to have a user who can only run stroed procedures (so aren't connceting with 'sa' privileges and such). How would I go about doing this?

The server I am working on has about 15 different databases on it. My database (named "myDBForTest") is the only one I want my end user to be able to connect on. I'm writing a .NET application that will have several users using it at same time. They will all be connecting with same information (limited to only running stored procedures and connecting/disconnecting). I basically want them to be able to run any stroed procedures that are part of my database. If I go back in 4 months and add 100 stored procedures, the next time the log on they should be able to use those new ones also.

Is there some kind of command I run to add a user (maybe with username of sprocUser?) who can do this? I'm interfacing with database using SQL Server Management Studio Express (from MS).

Thanks for any help you can give.

View 2 Replies View Related

User Defined Functions To Stored Procedures

Jun 1, 2004

Hello all:

Running into a brain problem here. I remeber reading an article a while back (2002?) on either Visual Studio Magazine or MSDN Magazine where there was a way to generate Stored Procedures from User Defined Functions. I need this information in order to do my job as it is also a way to cut down on time for this project I am trying to finish. Does anyone have the code or remeber what I am talking about. I just finished Kathleen Dollards article again on using XSLT to generate code but would really like to use the User Defined Functions.

I searched for the article on line but came up dry. Searched through all my magazines but could not find the article. Any help would be greatly appreciated. Bit of topic I guess but still relevant to the board.

Thanks

View 1 Replies View Related

SQL 2012 :: How To Hide Stored Procedures From User

Sep 25, 2015

How can I allow a user to run a stored procedure but deny them the ability to see it in SSMS?

I don't mean 'view def' permissions, I mean the actual proc.

I read about encryption which mask the contents but they can still see the proc, any other ways I can accomplish this?

View 9 Replies View Related

How Use Stored Procedures In Multi-user Environment?

Apr 19, 2007

Hi!



In my database I have all business logic in stored procedures. For example there are procedures: ReadBike and UpdateBike. Bike is business object stored in 4 tables.



On my system work 100 employees and we have one problem with this. The stroy is;

1. User A reads data about Bike1

2. User B reads data about Bike1

3. User A updates data about Bike1 (user B have old data)

4. User B updates data about Bike1



So user B don't know about chnages made by user A. How to solve that ptroblem?



It's probably solved in ADO, but I want use business login in procedures.



Regards,

Walter

View 1 Replies View Related

Stored Procedures And User Defined Functions

Feb 4, 2006

What are the pros and cons of each?

One advantage that I can see withh UDFs is that they are a bit a Views with parameters. You can perform joins on UDF columns (which you cannot do with a Stored Proc). You can do the same with Views but UDFs have the advantage that you restrict the number of rows with a parameterised WHERE (or HAVING) clause.

View 4 Replies View Related

Diff Between User Defined Functions And Stored Procedures

Jun 19, 2008

Hi to all,            Can any body tell me what is the difference between Stored procedures and User Defined Functions ?             In my assumption Function return a value or table, but SP doesn't return value instead of that SP use select statement or assign value to output statement. This is right?           

View 3 Replies View Related

User Defined Data Types And Stored Procedures

Mar 13, 2001

I have defined a user defined data type. When I try to create a stored procedure specifying the column and user define data tpye I receive message

Server: Msg 2715, Level 16, State 3, Procedure spStoredproc, Line 0
Column or parameter #1: Cannot find data type udtcol1.
Server: Msg 2715, Level 16, State 1, Procedure spStoredproc, Line 0
Column or parameter #2: Cannot find data type udtcol2.
Server: Msg 2715, Level 16, State 1, Procedure spStoredproc, Line 0
Column or parameter #3: Cannot find data type udtcol3

Can you have user defined data types in stored procedures.

Store Procedure creation text

CREATE PROCEDURE spStoredproc
@col1 udtcol1,
@col2 udtcol2,
@col3 udtcol3
AS
INSERT INTO tblTempEmployee
(col1 , col2 , Col3)
VALUES (@col1 , @col2, @col3)
GO
SET QUOTED_IDENTIFIER OFF SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER OFF SET ANSI_NULLS OFF
GO

Dave

View 3 Replies View Related

Can A User Be Granted Read Only Privileges For Stored Procedures

Apr 26, 2004

Can a user be granted the ability to create stored procedures with read only capabilities? I wouldn't mind be able to UPDATE but simply need to read only.

ddave

View 13 Replies View Related

SQL 2012 :: Login / User Cannot Execute Or See Stored Procedures

May 6, 2014

We are using a third party tool that does not store passwords in an encrypted format therefore we created a user with minimal rights. Isn't there a way to grant "execute any stored procedure" to a user/Login? Do we really have to grant execute on each procedure to the user? And then do the same for each new store procedure? The only other option we have found to be able to "see" and execute the stored procedures is by granting "db_owner". I would think that would negate the user being minimal rights.

View 5 Replies View Related

How Can I Execute Stored Procedures With Correct User Rights?

Sep 3, 2007

Hi,

I have a problem with sp execution.:







objects of [dbo]

Tables of [nuran]

Grants of [nuran]


[dbo].tabloA

[nuran].tmptabloA

Select,insert, update on [dbo].tabloA


[dbo].tmptabloA



Deny for [dbo].tmptabloA


[dbo].sp_yordam



Grant for executing [dbo].sp_yordam









(1)
create PROCEDURE [dbo].[SP_yordam]
AS
BEGIN

BEGIN TRANSACTION @Tran1
€¦€¦€¦€¦€¦. €¦€¦€¦€¦€¦€¦ €¦€¦€¦€¦.

INSERT INTO [tabloA]
(, ,)
SELECT ,,
FROM [tmptabloA] WHERE ......

€¦€¦€¦ €¦€¦€¦ €¦€¦€¦.

DELETE FROM [tmptabloA]

COMMIT TRANSACTION @Tran1


When user [nuran] execute the procedure sp_yordam by a VB program, the procedure use [dbo].tmptabloA not [nuran].[tmptaboA]. If there are data in the [dbo].tmptabloA, the procedure insert data to [dbo].tabloA from [dbo].tmptabloA. But when I checked user name in the procedure during execution, the user was [nuran].

If I write the procedure like that:

(2)
create PROCEDURE [dbo].[SP_tmpSil]
AS

declare @tablo1 as varchar(50),
DECLARE @sil as nvarchar(max)
select @tablo1='[tmptabloA]'

SELECT @sil = ' DELETE FROM ' + @tablo1 + ';'
EXEC (@sil)

END

And it executed by user [nuran],then it used the correct table [nuran].tmptabloA

Is there any way to use user€™s table in an stored procedure without using the user name :
(3)
create PROCEDURE [dbo].[SP_yordam]
AS
BEGIN

BEGIN TRANSACTION @Tran1
€¦€¦€¦€¦€¦. €¦€¦€¦€¦€¦€¦ €¦€¦€¦€¦.

INSERT INTO [tabloA]
(, ,)
SELECT ,,
FROM [nuran].[tmptabloA] WHERE ......

€¦€¦€¦ €¦€¦€¦ €¦€¦€¦.

DELETE FROM [nuran].[tmptabloA]

COMMIT TRANSACTION @Tran1


I don't want to use (2) and (3) code methods, I prefer to use (1) script. Is there any compilation method, or any aditional way for using script (1) with correct user rights?

Thanks a lot

Nuran

View 4 Replies View Related

Do You Replicate Views, Stored Procedures, And User Functions?

Jul 22, 2007

Greetings,



We have recently begun using transactional replication to keep the data in our SQL Servers synchronized in a geographically dispersed environment. We replicate our tables but we have never replicated views, stored procedures, or user functions in our production systems. We are thinking of doing so but wonder if the overhead of running the replication agents doesn't outweigh the benefits of having replication assist with the occassional change to these design elements.



Is anyone on this forum replicating views, sprocs, and user functions? What has your experience been?



Thanks for any ideas that you share.



BCB

View 4 Replies View Related

List Of Stored Procedures With Permission For Executing For User

Jul 26, 2007

I have user XY in SQL 05. I would like to find all stored procedures, where user XY has permission for executing. Is there any way to find it than look in every stored procedure?

Thanks for tips

View 4 Replies View Related

Lost In Procedures

Sep 18, 2007

This procedure is missing one importent piece is I need to have a customerID added to the invoice table.  The CustomerID comes from another table called Customer_Invoice_cart.  I don't know how to convert Customer_Invoice_Cart.CustomerID to a @CustomerID to add to the table. If there is anyone out there who is good at stored procedures (unlike me who is learning) could help me out.  FYI I realy cannot get the CustomerID for the .aspx page, it is not called any where.

procedure [dbo].[InvoiceAdd](    @EmployeeID int,    @CartID     nvarchar(50),    @OrderDate  datetime,            @OrderID    int OUTPUT)AS
BEGIN TRAN AddInvoice
/* Create the Order header */
INSERT INTO invoice(    employee_number,    invoice_date)VALUES(       @EmployeeID,        @OrderDate)
SELECT
    @OrderID = @@Identity          /* Copy items from given shopping cart to OrdersDetail table for given OrderID*/
INSERT INTO invoice_books(    invoiceID,     ProductID,    TaxID,    Quanatity,    UnitCost,    UnitPrice   )
SELECT     @OrderID,     Inventory_Invoice_Cart.InventoryID,     Inventory_Invoice_Cart.TaxID,    Inventory_Invoice_Cart.Quanity,    products.UnitCost,    products.UnitPrice    FROM     Inventory_Invoice_Cart   INNER JOIN products ON Inventory_Invoice_Cart.InventoryID = products.ProductID   
WHERE     Invoice_CartID = @CartID
INSERT INTO invoice_books(    invoiceID,    ServiceID,    Service_TaxID,    Service_Quanatity,    ServiceCost)
SELECT    @OrderID,    Service_Invoice_Cart.ServiceID,    Service_Invoice_Cart.TaxID,    Service_Invoice_Cart.Quanity,    services.price_leval1FROM     Service_Invoice_Cart   INNER JOIN services ON Service_Invoice_Cart.ServiceID = services.serviceID   
WHERE     Invoice_CartID = @CartID
/* Removal of  items from user's shopping cart will happen on the business layer*/EXEC Customer_Invoice_Cart_Empty @CartIDEXEC Inventory_Invoice_Cart_Empty @CartIDEXEC Service_Invoice_Cart_Empty @CartID
COMMIT TRAN AddInvoice

View 15 Replies View Related

SQL Security :: How To Disable User Access To The Critical And System Stored Procedures

Sep 22, 2015

disable the following system stored procedure (xp_grantlogin and xp_revokelogin)?

View 5 Replies View Related

Cannot Debug Stored Procedures Because The SQL Server Database Is Not Setup Correctly Or User Does Not Have Permission To Execute Master.sp_sdidebug.

Aug 7, 2007

Hello All,I tried to set the access permissions for debugging stored procedure by reading the articlehttp://msdn2.microsoft.com/en-us/library/w1bhybwz(VS.80).aspxandhttp://technet.microsoft.com/en-us/library/ms164014.aspxI have tried to add the role to sysaminas follows1)SELECT * FROM INFORMATION_SCHEMA.ROUTINES WHERE ROUTINE_NAME = 'sp_sdidebug'(to find the sp)Error:--The stored procedure not found2)sp_addsrvrolemember 'Developmentswati.jain', 'sysadmin' though this is executed successfuly . Error is still persisting 
Cannot debug stored procedures because the SQL Server database is not setup correctly or user does not have permission to execute master.sp_sdidebug.

View 3 Replies View Related

User Credentials Are Getting Lost When Using Shared Datasource

Jun 6, 2007

Hello All,



I have a situation and no idea what is going wrong.



We have many reports stored and view from the report manager. many of these reports internally use a datasource which is shared among others.



Many a times we have realised that the report stops working with the error.
Reporting Services Error




The current action cannot be completed because the user data source credentials that are required to execute this report are not stored in the report server database. (rsInvalidDataSourceCredentialSetting) Get Online Help



SQL Server Reporting Services




All i have to again do is update the user credentials and it starts working again. but nobody explicitly remove the credentials also. i dont know if it a tools bug or some where i am making a mistake in deploying. i deploy the reports through visual Studio.



Any idea?

/Soni

View 1 Replies View Related

User-defined Stored Procedures InsertCustomerin Northwind Database That Is Cached In Database Explorer:No New Values Inserted?

Jan 14, 2008

Hi all,

I put "Northwind" Database in the Database Explorer of my VB 2005 Express and I have created the following stored procedure in the Database Exploror:

--User-defined stored procedure 'InsertCustomer'--

ALTER PROCEDURE dbo.InsertCustomer

(

@CustomerID nchar(5),

@CompanyName nvarchar(40),

@ContactName nvarchar(30),

@ContactTitle nvarchar(30),

@Address nvarchar(60),

@City nvarchar(15),

@Region nvarchar(15),

@PostalCode nvarchar(10),

@Country nvarchar(15),

@Phone nvarchar(24),

@Fax nvarchar(24)

)

AS

INSERT INTO Customers

(

CustomerID,

CompanyName,

ContactName,

ContactTitle,

Address,

City,

Region,

PostalCode,

Country,

Phone,

Fax

)

VALUES

(

@CustomerID,

@CompanyName,

@ContactName,

@ContactTitle,

@Address,

@City,

@Region,

@PostalCode,

@Country,

@Phone,

@Fax

)
=================================================
In my VB 2005 Express, I created a project "KimmelCallNWspWithAdoNet" that had the following code:
--Form_Kimmel.vb--
Imports System.Data

Imports System.Data.SqlClient

Imports System.Data.SqlTypes

Public Class Form_Kimmel


Public Sub InsertCustomer()

Dim connectionString As String = "Integrated Security-SSPI;Persist Security Info=False;" + _

"Initial Catalog=northwind;Data Source=NAB-WK-EN12345"

Dim connection As SqlConnection = New SqlConnection(connectionString)

connection.Open()

Try

Dim command As SqlCommand = New SqlCommand("InsertCustomer", connection)

command.CommandType = CommandType.StoredProcedure

command.Parameters.Add("@CustomerID", "PAULK")

command.Parameters.Add("@CompanyName", "Pauly's Bar")

command.Parameters.Add("@ContactName", "Paul Kimmel")

command.Parameters.Add("@ContactTitle", "The Fat Man")

command.Parameters.Add("@Address", "31025 La Jolla")

command.Parameters.Add("@City", "Inglewoog")

command.Parameters.Add("@Region", "CA")

command.Parameters.Add("@Counrty", "USA")

command.Parameters.Add("@PostalCode", "90425")

command.Parameters.Add("@Phone", "(415) 555-1234")

command.Parameters.Add("@Fax", "(415 555-1235")

Console.WriteLine("Row inserted: " + _

command.ExecuteNonQuery().ToString)

Catch ex As Exception

Console.WriteLine(ex.Message)

Throw

Finally

connection.Close()

End Try



End Sub

End Class
==============================================


I executed the Form_Kimmel.vb and I got no errors. But I did not get the new values insterted in the table "Custermers" of Northwind database. Please help and tell me what I did wrong and how to correct this problem.

Thanks in advance,
Scott Chang

View 10 Replies View Related

Oracle Stored Procedures VERSUS SQL Server Stored Procedures

Jul 23, 2005

I want to know the differences between SQL Server 2000 storedprocedures and oracle stored procedures? Do they have differentsyntax? The concept should be the same that the stored proceduresexecute in the database server with better performance?Please advise good references for Oracle stored procedures also.thanks!!

View 11 Replies View Related

Hard Drive Crashed. Master && User Db Mdf && Ldf Files Lost

Jan 31, 2006

Hello.

One of our hard drives has crashed and as a result we have lost our master mdf/ldf & user db mdf/ldf files. It's not that a critical system by any means, but if the hard drive crashes and the master mdf/ldf files & user db mdf/ldf are lost, is there any way of restoring the system?

I'm thinking we probably need to re-install Enterprise Manager completely, and re-install the user db from a backup.

Any advice/suggestions would be much appreciated.

Thanks in advance,

View 1 Replies View Related

DB Engine :: Single User Mode Session Lost After Background Processes Jump In

Nov 28, 2012

We have an application running on SQL server. This application restores DB very frequently using Single user mode. Following are the SQLs that are executed to restore the database in single user mode and to get the database back in multi user mode.

alter database [test-db] set single_user with rollback immediate; --This sql is run using test-db
use master;restore database [test-db] from database_snapshot = 'snapshot_test-db';
alter database [test-db] set multi_user;

After switching the test-db to single user mode some 4-5 background processes of Taskmanager jump in for the test-db kicking off the session that application has taken over in single user mode . These background process are deadlocked between them selves.

Please refer to the output of sp_who2 below at link [URL] .... and following is the deadlock XML.

NOTE: SPIDs in deadlock XML may differ from the output of sp_who2 as spids keeps on changing for these processes.
<deadlock-list>
<deadlock victim="process4bbfc78">
<process-list>
<process id="process4bbfc78" taskpriority="0" logused="10000" waitresource="DATABASE: 5 " waittime="705"

[Code] ....

On searching for this problem I found out that people have faced similar problem but I was unable to find out the root cause and debug steps for this problem. Stopping the SQL server is provided as a solution to kick out these background processes but this is not a feasible in our case as code to restore DB runs very frequently resulting in this problem at a good frequency.

I also made sure that SQL Server Agent is not running. The SQL services running on server are SQL server, SQL Server Browser and SQL Server VSS Writer.

View 9 Replies View Related

Stored Procedures 2005 Vs Stored Procedures 2000

Sep 30, 2006

Hi,



This Might be a really simple thing, however we have just installed SQL server 2005 on a new server, and are having difficulties with the set up of the Store Procedures. Every time we try to modify an existing stored procedure it attempts to save it as an SQL file, unlike in 2000 where it saved it as part of the database itself.



Thank you in advance for any help on this matter



View 1 Replies View Related

Really Dumb Stored Proc Question. But I Need Help And I'm Lost.

Jul 9, 2006

Right now, I'm working on the database of a new project.  The project is basically a keyword tracking and referral tracking website directory.  My plan is to give the website some java code that will allow me to grab the http_referer and request_uri per page load.  (everytime they get traffic)Right now, I've got some tables I think will work fine.  One is the storage table, where I'll store what the javascript grabs.table.http_ref (columns will be)uid (Unique ID)http_refererrequest_uriThen I got the results page I want to parse the http_ref table into.  For example.Here we have a google results page which is a search for  baby shoes. This would be the http_refererhttp://www.google.com/search?sourceid=navclient-ff&ie=UTF-8&rlz=1B2GGGL_enUS177US177&q=baby+shoesAnd if someone clicks on a link get this page, which let's say I'm tracking in my project.http://www.thebabymarketplace.com/securestore/c54581.2.htmlin my http_ref table I will haveuid (whatever)http_referer http://www.google.com/search?sourceid=navclient-ff&ie=UTF-8&rlz=1B2GGGL_enUS177US177&q=baby+shoesrequest_uri http://www.thebabymarketplace.com/securestore/c54581.2.htmlso I want a stored proc to grab the http_referer column and parse it for the refering search enginehttp://www.google.comand the key wordssearch?sourceid=navclient-ff&ie=UTF-8&rlz=1B2GGGL_enUS177US177&q=baby+shoesThen grab the uri_request, which should be the web page visited,and INSERT into another table where I will holdkeywordsrefererrefered pageAny suggestions? I've been going nuts over this.

View 3 Replies View Related

All My Stored Procedures Are Getting Created As System Procedures!

Nov 6, 2007



Using SQL 2005, SP2. All of a sudden, whenever I create any stored procedures in the master database, they get created as system stored procedures. Doesn't matter what I name them, and what they do.

For example, even this simple little guy:

CREATE PROCEDURE BOB

AS

PRINT 'BOB'

GO

Gets created as a system stored procedure.

Any ideas what would cause that and/or how to fix it?

Thanks,
Jason

View 16 Replies View Related

Lost Ability To Debug CLR Stored Procs After SQL 2005 Upgrade To SP1

May 4, 2006

OS: Windows XP Pro, SP2
SQL: SQL Server 2005 (Server 9.0.2047) SP1
VS: Visual Studio 2005 RTM.050727-4200
--------

After upgrading our SQL Servers to SP1 we have lost the ability to debug .net CLR stored procedures. The debugging process worked fine until we installed the Service Pack. All other features we use test out fine after the upgrade. The only and very important feature that does not work is debugging CLR procs. In fact this problem is happening in every environment we have. Be it SQL2005 running on Windows XP SP2, Windows Server 2003 SP1, Window Server 2000 SP4. SQL Server remote or local on the machine doing the debugging. All 5 developer workstations with Visual Studio in virtual machines or installed on in base OS are behaving exactly the same. Every developer on our team has the exact same problem regardless of their configuration after the upgrade to the service pack 1. All developers and environments were working correctly before the upgrade.

Even building a new SQL box from scratch and installing all tools and creating a new clean database we fail with same error.

We have verified CLR Debugging is enabled for the database connection. We have dropped the connection and recreated it.

Here is an example of the output from the output window:

This is the output up to the CLR call

The thread 'sql_test2 [62]' (0x68c) has exited with code 0 (0x0).
The thread 'sql_test2 [62]' (0x68c) has exited with code 0 (0x0).
Auto-attach to process '[1072] [SQL] sql_test2' on machine 'sql_test2' succeeded.

Output AFTER the CLR Call

Auto-attach to process '[1072] sqlservr.exe' on machine 'sql_test2' succeeded.

'sqlservr.exe' (Managed): Loaded 'C:WINNTassemblyGAC_32mscorlib2.0.0.0__b77a5c561934e089mscorlib.dll', No symbols loaded.

'sqlservr.exe' (Managed): Loaded 'C:Program FilesMicrosoft SQL ServerMSSQL.1MSSQLBinnSqlAccess.dll', No symbols loaded.

'sqlservr.exe' (Managed): Loaded 'C:WINNTassemblyGAC_32System.Data2.0.0.0__b77a5c561934e089System.Data.dll', No symbols loaded.

'sqlservr.exe' (Managed): Loaded 'C:WINNTassemblyGAC_MSILSystem2.0.0.0__b77a5c561934e089System.dll', No symbols loaded.

'sqlservr.exe' (Managed): Loaded 'C:WINNTassemblyGAC_32System.Transactions2.0.0.0__b77a5c561934e089System.Transactions.dll', No symbols loaded.

'sqlservr.exe' (Managed): Loaded 'C:WINNTassemblyGAC_MSILSystem.Security2.0.0.0__b03f5f7f11d50a3aSystem.Security.dll', No symbols loaded.

'sqlservr.exe' (Managed): Loaded 'C:WINNTassemblyGAC_MSILSystem.Xml2.0.0.0__b77a5c561934e089System.Xml.dll', No symbols loaded.

'sqlservr.exe' (Managed): Loaded 'CIS_Release6a', No symbols loaded.

'sqlservr.exe' (Managed): Loaded 'C:WINNTassemblyGAC_MSILMicrosoft.VisualBasic8.0.0.0__b03f5f7f11d50a3aMicrosoft.VisualBasic.dll', No symbols loaded.

'sqlservr.exe' (Managed): Loaded 'C:WINNTassemblyGAC_MSILSystem.Configuration2.0.0.0__b03f5f7f11d50a3aSystem.Configuration.dll', No symbols loaded.

Program Locks up with blank screen and hangs. If we stop the Debugging then the correct results will appear in the output window.

Column1

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

<CIS><Header><MessageType>FosterParent</MessageType><Status>-1</Status><ErrorMsg><Code>-100</Code><Description>Requested Record Not Available</Description></ErrorMsg></Header></CIS>

No rows affected.

(1 row(s) returned)

@RETURN_VALUE =

Finished running [dbo].[qsp_FF_FD_FP_FosterParent].


Any ideas? TIA




View 1 Replies View Related

User 'Unknown User' Could Not Execute Stored Procedure - Debugging Stored Procedure Using Visual Studio .net

Sep 13, 2007

Hi all,



I am trying to debug stored procedure using visual studio. I right click on connection and checked 'Allow SQL/CLR debugging' .. the store procedure is not local and is on sql server.



Whenever I tried to right click stored procedure and select step into store procedure> i get following error



"User 'Unknown user' could not execute stored procedure 'master.dbo.sp_enable_sql_debug' on SQL server XXXXX. Click Help for more information"



I am not sure what needs to be done on sql server side



We tried to search for sp_enable_sql_debug but I could not find this stored procedure under master.

Some web page I came accross says that "I must have an administratorial rights to debug" but I am not sure what does that mean?



Please advise..

Thank You

View 3 Replies View Related

How To Search And List All Stored Procs In My Database. I Can Do This For Tables, But Need To Figure Out How To Do It For Stored Procedures

Apr 29, 2008

How do I search for and print all stored procedure names in a particular database? I can use the following query to search and print out all table names in a database. I just need to figure out how to modify the code below to search for stored procedure names. Can anyone help me out?
 SELECT TABLE_SCHEMA + '.' + TABLE_NAME
FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_TYPE = 'BASE TABLE'

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved