Editing Stored Procedures (SQL Server?)
This may seem like a dumb question but I just finished my project for our Oracle data warehouse and now I need to move on to SQL Server to upgrade those procedures... does SQL Developer not support the editing of SPs for SQL Server? Are the SPs for SQL Server read-only?
Using SQL Developer Version 1.5.0.53.58
on Win XP box...
Thanks!
Tim
Hello,
Please try the following ones:
http://msdn.microsoft.com/en-us/library/ms190669.aspx
http://www.sql-server-performance.com/2003/stored-procedures-basics/
Hope this helps.
Regards,
Alberto Morillo
SQLCoffee.com
Similar Messages
-
Hello,
I am trying to execute a SSIS package from SQL Server 2008 R2 stored procedure but getting error code 1 (as per my knowledge, error code description is as below:
0 The package executed successfully.
1 The package failed.
3 The package was canceled by the user.
4 The utility was unable to locate the requested package. The package could not be found.
5 The utility was unable to load the requested package. The package could not be loaded.
6 The utility encountered an internal error of syntactic or semantic errors in the command line.
Details:
I have a stored procedure named "Execute_SSIS_Package" (see below sp) which executes 'Import_EMS_Response' SSIS package (when I execute this package directly from SQL Server BID it works fine it means package itself is correct) and calling
it from SQL as:- EXEC Execute_SSIS_Package 'Import_EMS_Response'.
Here I receives error code 1.
Can anyone help me to resolve this issue please?
Thanks in advance!
CREATE PROCEDURE [dbo].[Execute_SSIS_Package]
@strPackage nvarchar(100)
AS
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON;
DECLARE @cmd VARCHAR(8000)
DECLARE @Result int
DECLARE @Environment VARCHAR(100)
SELECT @Environment = Waarde
FROM Sys_Settings
WHERE Optie = 'Omgeving'
--print @Environment
SET @strPackage = '"\W2250_NGSQLSERVER\BVT\' + @Environment + '\' + @strPackage + '"'
SET @cmd = 'dtexec /SQL ' + @strPackage + ' /SERVER "w2250\NGSQLSERVER" /Decrypt "BVT_SSIS" /CHECKPOINTING OFF /REPORTING E'
--print @cmd
EXECUTE @Result = master..xp_cmdshell @cmd, NO_OUTPUT
--print @Result
ENDIt has something to do with the security.
E.g. cmdshell is not enabled or the caller has not rights over the package.
There could be a syntax error, too.
I suggest you make the package runnable off a SQL Agent job then trigger the job from the stored proc with
sp_start_job <job name>
Arthur
MyBlog
Twitter -
ODBC Error connecting to a stored procedure SQL Server 2008 - Crystal 8.5
I am running a local copy of SQL server 2008 and get an ODBC error when connecting to any stored procedure with or without parameter. The database are running in SQL Server 2000 compatibility mode on the local server.
Do not get the error when connecting to one or more databse tables or when connecting to a stored procedure on a remote database.
The error reported is "ODBC error:[Microsoft][ODBC SQL Server driver] Syntax error or access violation"
I am running Vista OS.
Any help would be appreciated..Hello,
Interesting combination. All but CR 8.5 is supported on that OS.
When you created your DSN did you using the 2008 Client or MDAC?
I suggest you go back to supported platforms for CR 8.5
If not then start debugging Vista permissions to start with...
good luck
Don -
How to edit stored procedure from sqlplus ?
Hi,
Can anyone advise how to edit stored procedure from sqlplus ?
Many thanks.You can get the source for an object from SQL*Plus by querying the user_source table, i.e.
SQL> create procedure foo
2 as
3 begin
4 dbms_output.put_line( 'foo' );
5 end;
6 /
Procedure created.
SQL> select text
2 from user_source
3 where name = 'FOO'
4 order by line;
TEXT
procedure foo
as
begin
dbms_output.put_line( 'foo' );
end;Most commonly, though, if you are using SQL*Plus and a text editor to develop stored procedures, you will have all your stored procedures in .sql files that you edit and just use SQL*Plus to create (or recreate) the stored procedures.
Justin
Distributed Database Consulting, Inc.
http://www.ddbcinc.com/askDDBC -
Problems displaying images stored in SQL Server as Datatype "image"
I am trying to display an Image stored in SQL Server as
datatype
'image' and it only shows a portion of the image.
It seems to be tied to the size (kb) of the image since the
larger the
image the less of it is shown before it cuts off(sometimes it
cuts off
mid line so it's about the file size and not fitting the
image on the
screen).
Here is the code I am using that deals with the image.
[Bindable]
public var theImage:ByteArray = new ByteArray;
private function getScans_result(event:ResultEvent):void{
var imageByteArray:ByteArray = event.result[0].Image;
theImage = imageByteArray
<mx:Image id="theIMG" width="160" height="220"
source="{theImage}"/>
Any Thoughts??I do that sort of thing using PHP and mySQL the binary part
of the image is stored in a BLOB field (Binary Large OBject) along
the rest of the information necessary for the http headers (e.g.
mime type, file name, file size) being staored in their own fields.
That info is then used to build the file using PHP. The PHP
file contains a mySQL query whos result is echoed with the
appropriate headers. The URL points at the PHP file rather than at
any saved image.
Here's the php:
<?
# display_imagebank_file.php
# Note: the ID is passed through the url e.g.
# this_files_name.php?id=1
# connect to mysql database
mysql_connect('HOST', 'USERNAME', 'PASSWORD');
mysql_select_db('DATABASE');
# run a query to get the file information
$query = mysql_query("SELECT FileName, MimeType, FileSize,
FileContents FROM blobTable WHERE ID='$id'");
# perform an error check
if(mysql_num_rows($query)==1){
$fileName = mysql_result($query,0,0);
$fileType = mysql_result($query,0,1);
$fileSize = mysql_result($query,0,2);
$fileContents = mysql_result($query,0,3);
header("Content-type: $fileType");
header("Content-length: $fileSize");
header("Content-Disposition: inline; filename=$fileName");
header("Content-Description: from imagebank");
header("Connection: close");
echo $fileContents;
}else{
$numRows = mysql_num_rows($query);
echo "File not found <br>";
echo $numRows;
echo " is the number of rows returned for id = ";
echo $ID;
?>
Hope that helps
Phil -
Displaying images stored in SQL Server
Is there someway of displaying images stored within SQL
Server. Is FDS required? Prefer a method to display images without
using FDS; Web Service would be okay if that can workI do that sort of thing using PHP and mySQL the binary part
of the image is stored in a BLOB field (Binary Large OBject) along
the rest of the information necessary for the http headers (e.g.
mime type, file name, file size) being staored in their own fields.
That info is then used to build the file using PHP. The PHP
file contains a mySQL query whos result is echoed with the
appropriate headers. The URL points at the PHP file rather than at
any saved image.
Here's the php:
<?
# display_imagebank_file.php
# Note: the ID is passed through the url e.g.
# this_files_name.php?id=1
# connect to mysql database
mysql_connect('HOST', 'USERNAME', 'PASSWORD');
mysql_select_db('DATABASE');
# run a query to get the file information
$query = mysql_query("SELECT FileName, MimeType, FileSize,
FileContents FROM blobTable WHERE ID='$id'");
# perform an error check
if(mysql_num_rows($query)==1){
$fileName = mysql_result($query,0,0);
$fileType = mysql_result($query,0,1);
$fileSize = mysql_result($query,0,2);
$fileContents = mysql_result($query,0,3);
header("Content-type: $fileType");
header("Content-length: $fileSize");
header("Content-Disposition: inline; filename=$fileName");
header("Content-Description: from imagebank");
header("Connection: close");
echo $fileContents;
}else{
$numRows = mysql_num_rows($query);
echo "File not found <br>";
echo $numRows;
echo " is the number of rows returned for id = ";
echo $ID;
?>
Hope that helps
Phil -
Stored procedures (SQL 7 to Oracle 8i)
Using latest OMWB, all our stored procedures are coverted to Oracle as procedures. Some should convert as functions because we retuen an integer value in SQL 7. The migration options are set to automatic generation of procedure or function.
What is it that triggers OMWB to decide to generate a procedure or a function? I have a boatload of procedures to convert, and do not want to have to manually set the conversion option for each table or manually edit the procedures or functions. I can generate stored procedures programmatically on the SQL server side if I know what to change to make OMWB generate a function.A bug has been logged bug1700579. By default the workbench should produce a function if there is a return <VALUE> and a procedure if there is no return <VALUE> .
The default option does not seem to work and procedures are always created in the default mode.
Turloch
Oracle Migration Workbench Team -
We have processes that call numerous stored procedures. We are trying to create a SSRS report for our IT department to use so they can easily lookup the stored procedure definition. Some end users do not have access to SQL Server Management Studio.
The dataset query uses a System View... INFORMATION_SCHEMA.ROUTINES. We are joining on the
ROUTINE_NAME. When running the SQL, it works perfect. We are able to get all the columns we need. The primary column in the INFORMATION_SCHEMA.ROUTINES we need is ROUTINE_DEFINITION (the sql/text of the stored procedure).
In SSRS, we copy/paste the same SQL into the DataSet query. When I test the query in the DataSet window (using red
! button), it pulls back the data just fine.
I then drop all the queried columns on the report (see query below). When I run the report all data is display except the ROUTINE_DEFINITION column. Why is this? Is it because it's SQL and SSRS won't display SQL content? How
can I get the ROUTINE_DEFINITION column data on the report?
Here is example query I'm using in the SSRS dataset:
SELECT SPECIFIC_CATALOG, SPECIFIC_SCHEMA, SPECIFIC_NAME,
ROUTINE_TYPE, CREATED, LAST_ALTERED,
ROUTINE_DEFINITION
FROM INFORMATION_SCHEMA.ROUTINES
WHERE ROUTINE_NAME = @StoredProcedureName
Andy Kreider | Principal Financial Group | Des Moines, IA, USAI have created a new report with the query. When I run the query, you can see I get results for all columns (as expected).
I'm using a tablix report and just dropping the columns on the report. No other editing or customization of the report. I confirmed (twice) that the Field Name and Field Source are present within the
Dataset Properties > Fields page.
ROUTINE_DEFINITION is list as the Field Name AND Field Source.
When I run the report through Report Builder, this is what I see...
As you can see, the ROUTINE_DEFINITION column has no data. I also ran this same report outside of Report Builder editor by just clicking on the report to open it in a browser window. Same results... data for all columns except ROUTINE_DEFINITION.
Seems like this would be something between Report Builder and SQL Server when being displayed. Or could it be a permissions issue?
Andy Kreider | Principal Financial Group | Des Moines, IA, USA
Just out of curiosity did you try using same query on a reporting services report and see if there's any change?
Please Mark This As Answer if it solved your issue
Please Vote This As Helpful if it helps to solve your issue
Visakh
My Wiki User Page
My MSDN Page
My Personal Blog
My Facebook Page -
Unable to edit maintenance plan Sql Server 2008R2
Hi All,
I am unable to edit sql server maintenance plan and it is failing continuously from job as well.When I try to open the same the throws an error:
Microsoft SQL Server Management Studio is unable to load this document.:
Error loading from XML. No further detailed error information can be supplied for this problem because no Event objects was passed where detailed error information can be stored. It used to work pretty well in the past.Throws same error when I try to connect
remotely.
Regards
RahulHas the MP been developed in SQL Server 2008r2 as well?
Best Regards,Uri Dimant SQL Server MVP,
http://sqlblog.com/blogs/uri_dimant/
MS SQL optimization: MS SQL Development and Optimization
MS SQL Consulting:
Large scale of database and data cleansing
Remote DBA Services:
Improves MS SQL Database Performance
SQL Server Integration Services:
Business Intelligence -
Need suggestion on image storing in SQL Server
Hi All,
I want to store image into a column. I would like to know which datatype is the best to store image and which file format(bmp,jpg,png,...) is the best to store and to retrieve.We are using SQL Server 2005 Enterprise Edition.
Waiting for valuable replies.
Thanks and Regards
Sridhar.RThat is right but the OP mentioned that he uses SQL Server 2005.... BTW IMAGE data type is still presented in SQL Server 2012 :-)
Best Regards,Uri Dimant SQL Server MVP,
http://sqlblog.com/blogs/uri_dimant/
MS SQL optimization: MS SQL Development and Optimization
MS SQL Consulting:
Large scale of database and data cleansing
Remote DBA Services:
Improves MS SQL Database Performance
SQL Server Integration Services:
Business Intelligence -
For the captioned issue, is it possible? We have successfully created linked server between 2 MS SQL server 2008 standard edition, but failed for the standard and express edition. Is there any trick to setup? Thanks.
Hello,
SQL Server Management Studio Express Edition may not allow to create a linked server, but the workaround is to use the T-SQL. You can use sp_addlinkedserver and sp_addlinkedsrvlogin.
Hope this helps.
Regards,
Alberto Morillo
SQLCoffee.com -
Introduction
Integration Services gives you the ability to import and export packages, and by doing this change the storage format and location of packages. But after import packages into package store, how can we get the package XML definition?
Solution
As we know, SSIS packages are stored in msdb using existing SSIS storage table([msdb].[dbo].[sysssispackages]). The “packagedata” column store the actual SSIS package with Image data type. In order to get the package XML definition, we need to convert “packagedata”
column through Varbinary to XML. You can refer to the following steps:
Using the following query to get package GUID:
SELECT [name],
[id]
FROM [msdb].[dbo].[sysssispackages]
Using the following query to convert packagedata column to XML: SELECT id, CAST(CAST(packagedata AS VARBINARY(MAX)) AS XML) PackageDataXML
FROM [msdb].[dbo].[sysssispackages]
WHERE id= 'ABB264CC-A082-40D6-AEC4-DBF17FA057B2'
More Information
sysssispackages (Transact-SQL):
http://msdn.microsoft.com/en-us/library/ms181582.aspx
Applies to
SQL Server 2005
SQL Server 2008
SQL Server 2008R2
SQL Server 2012
SQL Server 2014
Please click to vote if the post helps you. This can be beneficial to other community members reading the thread.Hi Ketak. Thank you for replying. I already followed your instructions - specifically -
You do not see the SQL Server Reporting Services service in SharePoint Central Administration after installing SQL Server 2012 SSRS in SharePoint mode
I get the following error when I run rssharepoint.msi on the APP sever (where Central Admin is installed). I have to run this other wise
Install-SPRSService and Install-SPRSServiceProxy
are not recognized as commands on that server.
Failed to call GetTypes on assembly Microsoft.AnalysisServices.SPAddin, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91. Could not load file or assembly Microsoft.AnalysisServices.SPClient, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91'
or one of its dependencies. The system cannot find the file specified.
macrel -
MySQL/j Stored procedure on Server Failure? is it a bug? workaround?
Hi all, with the release of SE 6 pending, I thought that this issue should be addressed. As I'm not sure if it's a bug or not, I decided to post in this forum to see if anybody has haad experience with it, has a workaround or any other information that could be usefull.
The issue:
MySQL v5.x offers stored procedures. the MySQL/j connector has the ability to call these procedures.
If you run the stored procedure localy through Java, the stored procedure executes perfectly.
Once deployed onto a server, and the stored procedures on the same server in a mysql database and "ALL PRIVILAGES" including "EXECUTE ROUTINE" are granted. The stored procedure fails to run.
The error returned by the mysql/j connector is this :
"Driver requires declaration of procedure to either contain a 'nbegin' or 'n' to follow argument declaration, or SELECT privilege on mysql.proc to parse column types."
Here is a link to a MySQL forum about the issue:
http://forums.mysql.com/read.php?98,67532,67532#msg-67532
So it appears that it is a java issue.
Is there a workaround?
Has anybody successfully been able to use Java with MySQL stored Procedures?? (Pretty sad if we havn't)
Any help on this topic would be greatly appreciated.
cheers!Yes, I read through the threads, that is Why I cam here after posting back with MySQL trying all the suggeestions, I still can't find the thread from the MySQL/J developer, I did find the one from a MySQL developer though.
We can't actually change permissions oursevles with our currecnt Servlet host.
So they changed permissions for us:
We checked to see if we had permissions, All permissions are granted for the localhost.
currently not sure how to check them for the '%' assignment
Our host also tried to drop the procedurees and create them again with the invoker command, but this was also to no avail.
I was also sure that it was a MySQL issue, but was hoping someobody had another method of a workaround.
It seems to be something to do with Java wanting the metadata for registering output variables. -
I have downloaded the MS Security Compliance Manager, which is in two parts: MS SQL Server 2008 Express Edition & the SCM. The install instructions state the the server needs to be install before the SCM. So as the install continues I get
an error message, which cancels the installation. So, I am trying to install SQL 2008 EE separate from SCM. My question is:
Can I upgrade from my current SQL Server 2005 Compact Edition [ENU]
directly to SQL Server 2008 Express Edition (or higher)?So as the install continues I get an error message, which cancels the installation.
And which error message did you got?
SQL Server Compact Edition is something different then SQL Server Express (or Standard) Edition, you can't upgrade it as you asked for,.
Olaf Helper
[ Blog] [ Xing] [ MVP] -
Any way to edit stored procedures by default instead of viewing?
When I click on a stored procedure, 99% of the time I want to edit it rather than see the default "view" screen. I know you can right click to go straight to edit, but is there a way to just go to edit by default when you click on a stored procedure?
Thanks!Ivan ,
I think you misunderstood my reply. I was confirming that K was correct in his response. Often we have said features are scheduled for a new release, but they don't always make it. So some features are then pushed out to a future release. In this case, the feature request has been frequent on this forum and I'm confirming that this is indeed now part of the release that is due to come out next.
Sue Harper
Product Manager
Maybe you are looking for
-
iPhoto has detected faces of people I dont know, in my 'iPhoto faces' whenever I click the cross in the corner of the face (when sorting faces) the face temporarily disappears, but once I have uploaded a fresh batch of photos (and want to identify ne
-
How can I upgrade to Adobe Acrobat 9 Pro Extended?
Hello, I bought the upgrade for this version, but when I installed it and entered my new licence number, a message said that I have to have the previous version installed on the PC as proof I have an older version. Acrobat 6 would not install if 9 wa
-
What Program Should I use to create motion vector intro?
Hello, I am creating an intro to a series I am making for a client. I will be animating vector images that I have created in Illustrator by saving them as ".ai" files. In the past I have created a similar project using Premiere Pro CS6 using ".png" f
-
Handling Unprocessed items- G/L account and not A/R account
Good Morning SAP Guru's, I have a problem. When using FLB1, if I have an item that does not belong in the subledger but needs to be booked to a general ledger, I double click on the unprocessed item, change the account type from D for customers to S
-
Exporting to fixed length text using Crystal Enterprise 10
Post Author: adamsueryan CA Forum: Deployment I would like to know if it is possible to export from Crystal Enterprise 10 to a fixed length text file similar to the text exporting option using Crystal Reports 8.5. From Enterprise 10 I see you can ex