The tag has no wiki summary.

learn more… | top users | synonyms

9
votes
1answer
377 views

Poor query performance

We have a large (10,000+ lines) procedure that typically runs in 0.5-6.0 seconds depending on how much data it has to work with. Over the past month or so it has started taking 30+ seconds after we do ...
7
votes
1answer
12k views

Table-Valued Parameter as Output parameter for stored procedure

Is it possibile to Table-Valued parameter be used as output param for stored procedure ? Here is, what I want to do in code /*First I create MY type */ CREATE TYPE typ_test AS TABLE ( id int ...
6
votes
2answers
846 views

Parameter Sniffing: Why Does This Become An Issue?

Today, I had an issue with a SPROC Timing Out (took longer than 30 seconds) when it was run from an ASP.NET webpage, but executed quickly when run from SSMS (took 5 seconds). After suspecting ...
6
votes
1answer
14k views

PLS-00306 Error: How to find the wrong argument?

PLS-00306: wrong number or types of arguments in call to 'string' Cause: This error occurs when the named subprogram call cannot be matched to any declaration for that subprogram name. The ...
5
votes
2answers
4k views

How to Determine the input and output values of stored procedures?

I have hundreds of SPs and I would like to find out: input parameters with type output fields with type (not output parameters) Of course I could manually go through each one and write it down but ...
5
votes
1answer
366 views

When should startup parameter -E be used?

We are starting to build a data warehouse system using SQL Server 2008 R2. One of the senior DBAs told us to consider using a startup parameter -E for the SQL Server service. I read from Books Online ...
4
votes
2answers
3k views

How to remove all hidden parameters from Oracle Database

How do I remove all hidden parameters from Oracle Database before upgrading? I'm using the SQL query below. So what do you recommended? SELECT name,description from SYS.V$PARAMETER WHERE name LIKE ...
3
votes
2answers
303 views

switch TOP clause between percentage and rows by parameter

For one report I am making query where users suppose have to choice TOP values based on percents or fix amount of rows. I have two ideas Calling two different sub sproc based on passed param. if ...
3
votes
1answer
85 views

PostgresSQL dynamic execute with argument values in array

I'm wondering if this is possible in Postgres: Best explained using a contrived example: create or replace function test_function(filter_param1 varchar default null ...
2
votes
1answer
254 views

SQL Parameter Sniffing Possible Workaround

Our system has roughly 500 "Customers" that have extreme differences in record counts. Here is a (greatly simplfied) sample query that could return 0 - 100000 rows depending on the parameter passed. ...
2
votes
2answers
1k views

SQL Server: Do Statistics Updates cause query plans to be flushed? Should they?

I've found that a big, nasty data-extraction query that runs daily needs updated stats to avoid making horrible query plans based on incorrect rowcount estimates (let's not worry about whether or not ...
2
votes
2answers
92 views

Whats row size in mysql?

i mean what does it mean ?, i have mysql db and table in myisam and it shows Space usage Type Usage Data 1.3 GiB Index 429.1 MiB Total 1.7 GiB Row Statistics Statements Value ...
2
votes
1answer
101 views

Create a Function in sql server without specifying return_data_type

I am trying to create a Scalar-valued function in SQL server, without specifying the return_data_type i want to be able to return any datatype based on a parameter sent by the function caller e.g. ...
2
votes
3answers
176 views

How can I safeguard against SQL injection where parameterizing my query is not an option?

I'm working with ESRI's arcpy module, and I need to specify a WHERE clause as a parameter to this function. Since the result will eventually be used to retrieve data from the database, the text of the ...
2
votes
1answer
1k views

Named Parameters in SQuirreL SQL?

Is it possible to set named-parameters in queries SQuirreL SQL?
2
votes
3answers
2k views

How do i subtract a number of days from a prepared statement parameter in db2?

I have a C# application using OLEDB to connect to a DB2 database. Basically, I want to do this: SELECT CALC.WEEK, COUNT(CALC.ID) AS TRANSACTIONS , SUM(CALC.SUBTOTAL) AS REVENUE FROM ( ...
2
votes
0answers
114 views

Does Oracle ADO.NET varchar parameter size influence query plan reuse?

I am considering to apply a fix which will generate constant parameter sizes for (n)varchar parameters. The application is based on NHibernate with the old OracleClientDriver (using Microsoft Oracle ...
1
vote
1answer
1k views

How bad is query plan pollution (too many equivalent plans in cache)?

Question currently affects C#/.NET, DB access based on ADO.NET and SQL Server 2008 R2, but I think it applies to other databases as well. I noticed some old modules of a system have non-optimal SQL ...
1
vote
2answers
63 views

SET ROLE via parameterized query

In the very helpful response I received to a previous question, I am trying to write some JDBC code that first sets the role to a specific user before executing subsequent queries. On the safe side I ...
1
vote
1answer
143 views

Stop NLS settings in init.ora getting overridden by environment variable

We have a databases server that is used for development which has hundreds of database instances for different branches/builds of our application. And we needed an special instance that has ...
1
vote
1answer
112 views

Finding parameter names for binding stored procedure parameters

For unit testing purposes I am attempting to call the DBMS_OUTPUT.PUT_LINE procedure from c# using parameters that are bound by name. Since this DBMS_OUTPUT package seems to be a standard on Oracle ...
1
vote
1answer
2k views

Is it possible to query value of SQLNET.EXPIRE_TIME parameter?

Can somebody advice whether it is possible to query for current value of SQLNET.EXPIRE_TIME parameter in Oracle 11 DB? Should select * from v$parameter return value of SQLNET.EXPIRE_TIME (if it ...
1
vote
3answers
6k views

How can I pass parameters to an “SQL Script” from isql

I am wondering if it is possible to pass parameters to an SQL script from within sybase's isql utility. For example, I'd like to store a select statement in the file the_script.sql that would look ...
1
vote
1answer
95 views

Package parameter blank in SSIS catalog

I have deployed a package with 2 package parameters which had their values set inside the package prior to deployment. However if I look at those parameters in my SSIS catalog project the values of ...
1
vote
0answers
219 views

MySql Very Slow Writes & Out of memory error

I am having a rds db instance in AWS which is used by Drupal 7 instatllation. I am getting the below error messages in the log: > 130912 11:57:39 [ERROR] /rdsdbbin/mysql/bin/mysqld: Out of memory ...
1
vote
0answers
243 views

Accessing environment variables at design time in SSDT?

I'm re-designing some SSIS packages for 2012 and some parameter/variable/configuration issues are not clear to me. The result that I am trying to achieve is that the user context's temp folder(stored ...
0
votes
1answer
103 views

Table Valued Parameter not pulling the correct data for my sp?

http://sqlfiddle.com/#!3/b2643/5/1 http://sqlfiddle.com/#!3/b2643/5/0 This link above has the sample database tables I created on SQLfiddle. I have 3 main tables in my stored procedure: ...
0
votes
1answer
460 views

What is wrong with this a MySQL 5.6 procedure definition? Use a variable for table name [closed]

Just can't understand why it's throwing this error? Error Code: 1064. You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use ...
0
votes
1answer
35 views

Access: search for more than one parameter?

I need to perform several queries, looking for more than one parameter. for example: in my field "lenght" I want to extract values matching both 4.6 and 4.7. then, next time I need 5.8 and 5.9, and ...
0
votes
1answer
528 views

SQL Linked Server Passing Date Parameters

I'm using SQL Server 2008 R2 and have a linked SQL 2012 Express database. On the 2008 box I am creating a stored procedure to be used in a report. I am wanting to pass a date variable so the user ...
0
votes
1answer
535 views

Print filter parameters on a report

I'm using MS Access 2010. I have a form with a number of fields of various types (number, text, lookup, checkbox). Users can right click on any field to filter the form. Then I have a button that ...
0
votes
0answers
5 views

Send parameter from a report to another SSRS 2010

I would like to send parameter from a report1 to report2 in action of textbox (in report1), I found just tuto for sending parameter to Subreports. Some help
0
votes
1answer
21 views

create multi valued variable inside mysql stored procedure

I have two IN variables into my MYSQL stored procedure. I pass one into a select statement and the value is taken in a temporary variable which is passed to the second SQL statement. CREATE PROCEDURE ...
0
votes
2answers
115 views

Using concat inside a stored procedure parameters

I have a stored procedure and function that accepts a varchar as a parameter and i have this code where i am using concat function in the parameters of such function and stored procedure. DELIMITER ...
0
votes
1answer
36 views

MySQL: Adding innodb_log_file_size in my.cnf causes not starting MySQL service [duplicate]

I checked and found that InnoDB pluginis active. By default, Innodb_log_file_size=5MB. As per the MySQL Documentation, its ideal values range from 1MB to 1/N-th of the size of the buffer pool, where ...
0
votes
1answer
37 views

What to monitor (key indicators) for MySQL server

I have installed Munin for monitoring my MySQL database server. It enabled a large amount of MySQL plugins out of the box. Since running these plugins can be CPU expensive I want to limit them to the ...
0
votes
0answers
48 views

How can I use parameters of type Int32 from an environment for an integration services package in a SQL Server 2008 job?

I made a SSIS package using two string parameters and one Int32 parameter. I defined a SQL Server Agent job that should execute that package. In "Integration Services Catalogs" I definied an ...
0
votes
1answer
122 views

reading input parameter values in stored procedures

I'm using the current version of MariaDB 10.0.12 . I created a stored procedure as specified in the accepted answer for the following question: ...
0
votes
0answers
36 views

Switching from Windows to LINUX server with lower configuration

As of now, My application is running on dedicated windows DB server which configuration is below: RAM 8.00 GB Processor Intel(R) Xeon(R) CPU X5460 @3.16GHz, OS Windows Server ...