The tag has no wiki summary.

learn more… | top users | synonyms

2
votes
2answers
56 views

How to pass parameter in select query(In with clause) and not in where condition in SQl Server SSIS Package?

I want to pass a parameter (@date1) in my SSIS OLE DB Source so I created a variable and I tried to pass the parameter using '?' but it's showing 'Syntax error, permission violation or other ...
0
votes
2answers
51 views

xml parameter to distributed query - difference between SQL2005 & SQL2012

I have inherited an old SQL2005 Enterprise database (on Windows 2003) that allows an xml parameter to a distributed query such as this: exec sp_executesql 'exec [server].[database].dbo.sproc ...
0
votes
1answer
84 views

Alternatives to Linked Servers (Allow Inline SQL with Parameters)

I am trying to find a solution to execute inline SQL with parameters against some liked server databases. From what I have found online the only proper way to query a linked server is to use ...
1
vote
1answer
39 views

Plans created several times under Force Parameterization

People use forced parameterization to save plan compilation cost. However, I found things different here. The query I will run is as following, and under AdventureWorks2012 database: DECLARE @Var ...
0
votes
1answer
159 views

MariaDB I/O capacity with innodb_io_capacity parameter

I use hdparm to test my SSD hard drive I/O benchmark : [root@mail ~]# hdparm -t -T /dev/xvda2 /dev/xvda2: Timing cached reads: 12906 MB in 1.99 seconds = 6477.79 MB/sec Timing buffered disk ...
0
votes
1answer
22 views

Can't cast a SPROC parameter?

I have several sprocs that take a date/time input, one of which takes a date only in the form of an nvarchar because it utilizes dynamic SQL. When I try to cast the variable going into the sproc I'm ...
0
votes
2answers
134 views

Using output value of column from function for another column in SQL*Loader

I have asked the same question on StackOveflow. Do not know, if this site is linked to that or not and thus whether that question will be seen by professionals here, so I am adding it here. Please ...
1
vote
2answers
47 views

What is the correct query set up to access the columns in table being passed as parameter?

I am trying to use table-valued parameter to bulk upsert some data into my table. I have the following stored procedure. This setup seems to agree with the intellisense. I am not getting any errors ...
0
votes
0answers
16 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
199 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 ...
3
votes
1answer
897 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 ...
0
votes
2answers
1k 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 ...
1
vote
2answers
226 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 ...
0
votes
1answer
131 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
86 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 ...
1
vote
1answer
202 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
402 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 ...
0
votes
0answers
70 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 ...
2
votes
1answer
566 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. ...
0
votes
1answer
230 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: ...
2
votes
2answers
160 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 ...
1
vote
1answer
217 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 ...
0
votes
1answer
179 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
845 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 ...
2
votes
3answers
288 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
0answers
166 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
3k 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 ...
2
votes
1answer
2k 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 ...
9
votes
1answer
434 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 ...
0
votes
1answer
37 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
1k 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 ...
1
vote
0answers
261 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
319 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 ...
4
votes
2answers
4k 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 ...
1
vote
0answers
958 views

How do I disable oracle's MAX_ENABLED_ROLES limit? [closed]

How do I disable oracle's MAX_ENABLED_ROLES limit or expand the limit?
5
votes
1answer
439 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 ...
2
votes
3answers
3k 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 ( ...
6
votes
2answers
938 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 ...
2
votes
1answer
108 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
1answer
2k views

Named Parameters in SQuirreL SQL?

Is it possible to set named-parameters in queries SQuirreL SQL?
5
votes
2answers
5k 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 ...
11
votes
1answer
17k 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 ...
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 ...
0
votes
1answer
645 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 ...
3
votes
2answers
336 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 ...
6
votes
1answer
17k 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 ...
1
vote
3answers
8k 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 ...