I am looking for a script that will write out all the sprocs in a SQL Server 2000 database to a textfile, preferably as a series of "CREATE PROCEDURE" statements.
Enterprise manager provides the ability to script any and all objects in the database. I'm using Sql 05, but I seem to remember the method being:
In the details/summary view, select all of the procedures that you want to script.
Right-click.
Select tasks-script... or whatever is similar.
Unfortunately I don't have SQL 2000 Enterprise Manager available in front of me, but there is an option in the context menu to script any objects you desire.
Related
I don't know why but I can not see the stored procedures appear when I connect the database to Tableau (I use MariaDB). I can only see the data tables.
Anyone has the same problems with me? I am a newbie so I am not sure if my description is clear or not.
Use the stored procedures.
I found that Tableau does not connect to stored processes and that one way around this is that when you connect to your server, you should use the initial query function. Once you log in, grab Custom SQL and for that script simply use
select * from #nameoftemptable
and Execute.
I've been asked to take a bunch of saved TFS Work Items > Shared Queries and reverse engineer them as SSRS reports for more elegant dashboarding.
For all of these I can right-click > Query Editor and it will take me to the Query Editing GUI, which has drop-down list for fields, but I'm not seeing any functionality that allows one to view the underlying WIQL query against the TFS_Warehouse (I'm assuming) database.
Question: Is there a way to get the underlying WIQL for a given TFS Shared Query?
I've done some searching on my own, and am finding multiple pages related to writing your own, but none where you can get the pre-existing for a shared query.
To get the underlying WIQL you can use File-Save as
Pick "file" as target option:
To create a warehouse query use the new report option in the Team tab in Excel. That will allow you to select a work item query which will be turned into a report.
See:
https://jessehouwing.net/vsts-tfs-generate-work-item-query-for-tfs-api/
So far, my own research shows two options:
CREATE PROCEDURE statement: Close, but limited to a single SQL statement in execution.
Create a Data Macro: Which is more similar to "Triggers" in MS SQL Server.
Is there another way other than the ones listed above?
Based on phadaphunk's answer here in another SO question:
Simulate a stored procedure using a function. I found a tutorial here. But I haven't tried this approach.
How to use SQL Server Stored Procedures with Microsoft Access using Pass Through Queries.
If you are using MS Access 2010 or above, stored procedures will be listed in the tables tab under Named Macros.
Hope this helps.
I'm completely new with SharePoint. How can I create a new page where the user can essentially click a button that will call a stored procedure on the same server? Am I going to need to create an ASP.NET application?
SharePoint 2007 and SQL Server 2008
SharePoint Designer will allow you to put a DataViewWebPart on a page and let you tweak it endlessly. The DataViewWebPart can be populated from all sorts of data sources including SQL databases so it might be able to meet your needs.
You could create this as a webpart. There's a built-in project type for a SharePoint Visual WebPart. Would this be just a single button that always executes the same stored procedure? Does there need to be a list of procedures to choose from? Would the list always be the same, or would it need to be populated dynamically?
Is is possible to restrict a stored proc to only SELECT from a database.
I want a stored proc which only selects data to execute correctly and a stored proc with UPDATE, CREATE, DELETE operations to return an error indicating insufficient permissions.
I am using Sybase 12.5
I think you're looking at the problem the wrong way. Essentially, once you give a user execute permission to a store procedure, they can execute that store procedure no matter what it does.
I think what you want to do is assign a "read-only" client role to your database and grant SELECT permissions as well as the execute permission on only the stored procedures that read data from the database. Add users to that role instead of granting them SELECT access on the database.
Separate writing and selecting actions to different procedures. And then allow selecting user to execute selecting procedures and writing user to execute selecting and writing procedures. This trick works pretty well with PostgreSQL.