|
|
SELECT CAST(RAND() * 1000 AS VARCHAR) AS [Random_Number]
|
|
|
|
|
I'm trying to display an SSRS report in a ReportViewer control in a WinForms application. Here's the Form_Load...
private void Form1_Load(object sender, EventArgs e)
{
reportViewer1.ServerReport.ReportServerUrl = new Uri("http://192.168.2.5/reportserver");
reportViewer1.ServerReport.ReportServerCredentials.NetworkCredentials = CredentialCache.DefaultCredentials;
string reportFile = @"C:\Report Project1\Report1.rdl";
reportViewer1.ServerReport.ReportPath = reportFile;
reportViewer1.ProcessingMode = ProcessingMode.Remote;
reportViewer1.ServerReport.DisplayName = "Corporate View Report";
ReportParameter[] parameters = new ReportParameter[3];
parameters[0] = new ReportParameter("@ProjectId", "6");
parameters[1] = new ReportParameter("@PrimaryWhseId", "8293");
parameters[2] = new ReportParameter("@SecondaryWhseId", "8290");
reportViewer1.ServerReport.SetParameters(parameters);
try
{
reportViewer1.RefreshReport();
}
catch(Exception ex)
{
throw ex;
}
}
With the reportViewer1.ServerReport.SetParameters(parameters); line uncommented, at this point the form pops ups, the repot is blank, and nothing else happens after that.
If I comment out the parameters and run it the form runs and in the viewer control I get "The request failed with HTTP status 401: Unauthorized".
I can't find any examples of displaying a SSRS report in a WinForms application.
I could really use some help here.
Thanks
Everything makes sense in someone's mind
|
|
|
|
|
|
Hello All ,
I am trying to connect my server with oracle database. but getting the following error--
Can anyone suggest me what to do ----
=====================================================
sqlplus / as sysdba
SQL*Plus: Release 10.2.0.3.0 - Production on Wed Apr 13 20:23:32 2011
Copyright (c) 1982, 2006, Oracle. All Rights Reserved.
Connected to an idle instance.
SQL> set head off
SQL> grant dba to msdp;
grant dba to msdp
*
ERROR at line 1:
ORA-01034: ORACLE not available
SQL> startup
ORACLE instance started.
Total System Global Area 566231040 bytes
Fixed Size 1291772 bytes
Variable Size 243272196 bytes
Database Buffers 314572800 bytes
Redo Buffers 7094272 bytes
Database mounted.
ORA-00603: ORACLE server session terminated by fatal error
SQL>
Thanks
Ish Kumar Kapila
|
|
|
|
|
Check what error messages you have in the alert.log after the startup command (easiest to start to read the log from the end).
|
|
|
|
|
Hi , I am unabel to find the alert.log in oracle installation folder.
Can u help me where to relocate it.
Thanks
Ish Kumar Kapila
|
|
|
|
|
it should be in a directory like
<oracle root>/admin/<instancename>/bdump
You can also search for a file named alert*.log
|
|
|
|
|
Hello Buddy ....!!!
Sorry , dear unable to find the file.
any other way around ...
Thanks
Ish Kumar Kapila
|
|
|
|
|
I hope this is a stupid question.
But you are looking on the server, right?
|
|
|
|
|
Well Buddy ,
I am new to oracle and did what ever was possible ... but no luck
Thanks 4 the help
Ish Kumar Kapila
|
|
|
|
|
Without finding the alert.log, it's quite hard to find out the cause for the error.
If the server is windows, open a command prompt on the server where the Oracle is installed, go to each of your drives root (for example c:\, d:\, e:\) and try find the file with dir:
dir /s alert*.log
|
|
|
|
|
Sorry .........
Ish Kumar Kapila
|
|
|
|
|
Then I'm afraid there's not much to work with. The error you got can be caused because of several different reasons. I'm sorry to say, but without getting the details, it's just wild goose chase.
|
|
|
|
|
Sorry for the rant, but even WinXP has a 'search' function in it's Explorer, so you should easily able to locate the file - if it exists ...
{Addition] www.giyf.com
the 4th result (from ora-00603) leads to a response like:
???\oracle\admin\aso\udump\aso_ora_1360.trc
HTH
modified on Wednesday, April 13, 2011 6:10 PM
|
|
|
|
|
We are running SQL 2008 R2 Enterprise server with ASP Persistent sessions and our main data DB on the same 2008 R2 Enterprise server. We're currently experiencing random freezes where all websites and applications accessing the DB become un-responsive.
Has anyone same problem and how you solved it.
Any suggestion?
Thx
We live in a Newtonian world of Einsteinian physics ruled by Frankenstein logic
|
|
|
|
|
The first thing os to start monitoring, what happens in the database.
Open Management Studio and check the Activity Monitor. Based on your symptoms search for processes that have a value in "Blocked By" -column. Since this sounds like it could be a locking problem see if the processes are waiting for lock releases. If you find those, you can search for the process having a value in "Head Block" column, this would be the one (or several) process causing the situation. If you find such process, have a look at the details, what is it doing. This helps to find the problem source in the calling code.
Also check memory and CPU usage,are they extremely high.
|
|
|
|
|
At that particular time yes, CPU 100% (2.27GHz), memory 99% (8GB) and no release. Yes, procedure is identified : UPDATE [ASPState].dbo.ASPStateTempSessions procedure trying to update ASPState table... and after: life is crashed.
We live in a Newtonian world of Einsteinian physics ruled by Frankenstein logic
|
|
|
|
|
Ok, several possible reasons for this but I guess you should go through the procedure and optimize the statements, possibly create indexes etc.
Also feels like the server could be paging. You could check that with Performance Monitor (Windows) and if the server is paging, reduce maximum amount of memory allocated to SQL Server.
|
|
|
|
|
Yes, I've already done it. In my case Expired sessions were not cleaned. When I release Memory with T-SQL, I allocated these jobs to my Agent, and memory release comes after 30-40 min, (I run job every 30 min) I understand that the problem is session. I am going to try CURSOR-BASED ROUTINE. Hope it will prevent my Server from troubles what cause us all week. If there any suggestions, I would be glad to hear them.
P.S.: Found solution. I replaces ASPState expiry session procedure with Alternative CURSOR-BASED ROUTINE.
Performance came back to normal state. No crashes also.
We live in a Newtonian world of Einsteinian physics ruled by Frankenstein logic
modified on Friday, April 15, 2011 6:25 AM
|
|
|
|
|
Glad to hear you got it resolved!
|
|
|
|
|
hi everybody,
I have a big problem with update statement, let me mention the situation by exact script and results!
first create trans table=>
create table trans(
id bigint identity(1,1) not null,
price decimal(18,0) null,
relatedid bigint null)
Then fill it by this script
Insert into trans (price,relatedid)values(100,NULL)
Insert into trans (price,relatedid)values(100,NULL)
Insert into trans (price,relatedid)values(500,NULL)
Insert into trans (price,relatedid)values(1,NULL)
Insert into trans (price,relatedid)values(1,3)
Now run this query!
Update trans
set price=(case when relatedid is null then (select avg(price) from trans where id<=t.id)
else (select top(1) price from trans where id=t.relatedid) end)
from trans t
After execution of query I expect this result:
id-----price-----relatedid
1 100 NULL
2 300 NULL
3 200 NULL
4 200 3 <======== realy expected!!!!
But this is the result!!!
id-----price-----relatedid
1 100 NULL
2 300 NULL
3 200 NULL <======= #3 row
4 1 3 <===== wrong value, i mean this is the value before update
row with id 3 has been updated before but update doesnt know this!!!!!
WHAT I NEED i need to get expected result from this execution!!!! plzzzzzzzzzzz
modified on Wednesday, April 13, 2011 7:53 AM
|
|
|
|
|
My output looks like this:
id price relatedid
1 100 NULL
2 100 NULL
3 233 NULL
4 175 NULL
5 500 3
SQL Server 2008 R2
|
|
|
|
|
row #5 expected to be updated to 233, not 500
|
|
|
|
|
Not the way it is written.
select top(1) price from trans where id=t.relatedid gives the value in the database at the time of the query not after the update.
You would need to calculate the maximum average in this query.
|
|
|
|