SSRS Parameter issue (SQL Server 2008 R2) - sql

Having an issue where I have created a report with a shared data source and several shared data sets. The report has 2 parameters one dependent on the other. This was working fine until just recently. Now any report I create with a parameter does not work. I've tried creating a simple empty report that has an embedded DataSet:
SELECT ClientId, Name From Client
Then have the parameter use this query to populate available values (Value = ClientId and Label = Name).
When I preview in BIDS (VS-2008) it works just fine.
When I deploy and run the report I get the following error:
An error occurred within the report server database. This may be due to a connection failure, timeout or low disk condition within the database. (rsReportServerDatabaseError)
Arithmetic overflow error converting expression to data type int. The statement has been terminated.
There are no expressions and I've deleted all old datasets that used to have an expression. Seems like SSRS has something cached though I have deleted Internet Cache and deleted the datasets from SSRS and went into the DB and deleted everything I could. Anyone else out there experience this issue?
Thanks

Related

Cannot read the next data row for the dataset DataSet1. (rsErrorReadingNextDataRow)

I am working in Microsoft Visual Studio to create my RDL's. I have a sub report which refuses to run when we put it up on SSRS. This report runs fine inside of Visual studio in preview mode even when pointed at a copy of the prod database (still takes 30 min to run but it completes). The report only returns 1 row with counts of a large amount of data for a summary.
The full error text is:
An error has occurred during report processing. (rsProcessingAborted)
o Cannot read the next data row for the dataset DataSet1. (rsErrorReadingNextDataRow)
A severe error occurred on the current command. The results, if any, should be discarded. Operation cancelled by user.
This report used to work but the query was not correctly pulling the information. I had to change the query and expand what it was pulling from the database. Is there any way this could be caused by not enough memory being given to SSRS? We are using SSRS 2008 r2.
Turns out my problem was solved by putting in the recommended indexes provided by SQL Query Analyzer. After the indexes were created the query ran in ~4 min no problems.

SSAS Multidimensional - Table Value Function as a Query for Partition

#GregGalloway was able to answer the question I should have asked. I am adding a more concise question here, while maintaining the original lengthy text
How do I use a table valued function as the query for a partition, when the function is in separate database from my fact and referenced dimensions?
Overview: I am building a SSAS multidimensional cube that is built off of a single fact table in our application's data warehouse, and want to use the result set from a table valued function as my fact table's partition query. We are using SQL Server (and SSAS) 2014
Condition: For each environment (Dev,Tst,Prd) there are 2 separate databases on the same server, one for the application data warehouse [DW_App], the other for custom objects [DW_Custom]. I cannot create any objects in [DW_App], but have a lot of freedom in [DW_Custom]
Background info: I have not been able to find much information on using a TVF and partitions in this way. My thinking is that it will help streamline future development by giving me a single place to update the SQL if/when I modify the fact table.
So in testing out my crazy idea of using a TVF as the query for my partitions I have run into a bit of a conundrum. I am able to use my TVF when I explicitly state the Database in my FROM clause.
SELECT * FROM [DW_Custom].[dbo].[CubePartition](#StartDate, #EndDate)
However, that will not work, because the cube will be deployed in multiple environments before production, and it needs to point to different DBs for each. So I tried adding a new data source, setting my partition query to point to the new data source, and then remove the database name. IE:
SELECT * FROM [dbo].[CubePartition](#StartDate, #EndDate)
I get an error that
The SQL syntax is not valid. The relational database returned the following error message: Deferred prepare could not be completed. Invalid object name 'dbo.CubePartition'
If I click through this error and the subsequent warnings about the cube not being able to process if I continue I am able to build and deploy the cube. However I cannot process it, because I get an error that one of my dimensions does not exist.
Looking into the query that was generated and it is clear that it is querying my dimensions as well as fact, which do not exist inside of '[DW_Custom]' which explains that error perfectly fine.
So I guess 2 questions:
Is it possible to query another DB (on the same server) from inside of an SSAS partition query?
If not, is there any way I can use a variable as the database name in the query, and update that variable based on the project configuration (Dev,Tst,Prd)
Bonus question: Is the reason that I can not find much about doing it this way because it is an obviously bad idea that I am overlooking, and if so why?
How about creating a second SSAS Data Source pointing to the DW_Custom database (or whatever it's called in the particular environment you're deploying to)? Then when you deploy from Dev to Prod, you need only change that connection string. When you create your partitions, then specify the DW_Custom data source and then specify the query without database name:
SELECT * FROM [dbo].[CubePartition](#StartDate, #EndDate)
As long as the query plan for that table-valued function is efficient compared to a plain SELECT statement, then I don't see a problem with that.

Access Date Filters on Linked Tables Fails - Data type mismatch in criteria expression

I have an Access 2013 application where I have linked tables to an outside database, in this case it is Firebird SQL database.
The table in question is actually a Firebird SQL view. In this view I have a column that is stored as a database DATE type. From this access linked table, I created a datasheet view.
The problem I am facing is when a user attempts to filter this date column by the Today, Tomorrow and Yesterday date filters that are offered in the column header.
Attempting to filter nets this error message:
Data type mismatch in criteria expression
Debugging the ODBC connection to expose the SQL statements used on the connection does not show any SQL level filtering, so I assume it is happening in application. Other questions seem to indicate an issue with the escaping of the dates, but I'm not generating a SQL Query at all. Just trying to use the Date Filters offered in Access out of the box.
Everything other than Today, Yesterday, Tomorrow work just fine.

copying data between servers on two different machines - SQL

I found this question Copy table to a different database on a different SQL Server which is close to what I want but my two databases are on two different machines. I am interested in backing 1 or two tables, not the whole database. I tried BCP backup and bulk insert but I am consistently getting error on importing date field (type mismatch or invalid character for the specified codepage). I gave up after I successfully imported the peice of csv file that I was getting error for in a new test table.
Now I would like something like this
select INTO mycomputer\SQLEXPRESS\target_table from ReMOTECOMPUTER\SQLEXPRESS\source_table
or anything similar? Can I do that, what is the proper syntax if yes. I tried but was not successful.
Have you looked at using linked servers? We had a somewhat similar data consistency issue and used a linked server setup to provide for triggered data propagation. Once you have the linked servers defined you can issue your statement pretty much as you have it listed in your question.
http://msdn.microsoft.com/en-us/library/ms188279.aspx

Conversion failed when converting the nvarchar value '' to data type int

While this may sound like a beginner 101 problem I think it is a bit more complicated.
I have two instances of SQL server, one is a log-shipped read/only standby copy of the master database that is used for reporting purposes.
They are both 64-bit SQL 2005, SP3.
The LogShipped Instance is: 9.00.4035.00 (Standard Edition)
The Original Instance is: 9.00.4035.00 (Enterprise Edition) in an Active / Passive Cluster.
Server collation is Latin1_General_CI_AI on both and they both run on Server 2003 64 bit.
I have a query that runs and executes fine on the master database server but it fails on the standby / read-only copy with a conversion of nvarchar to int.
The code is identical and i've copied and pasted it from the main instance query window just to double check.
Is there a bug in SQL server somewhere? I can paste the query if needed (its a bog-standard select with some in-line tables)
Just don't understand why it works on the one yet the log-shipped copy fails.
Any pointers is much appreciated.
-- Edit
I have found the culprit.. the transaction log database contains invalid data that isn't in the primary database.. quite why they are out of sych I do not know yet as the transaction log shipping is still working and I have no errors in the job-history.
Just a few orphaned records that are invalid that are not in the primary db.. how odd
Are you sure the data is the same?
If you try
select convert(int, char(10))
it will probably get a similar error, so your query will fail if the value you are converting is char(10), which may not be be obvious when viewing the data.
check any trigger if that is updating any view(having int for the specific column) based on your table