Wednesday, March 28, 2012
long running queries quit - audit logout
ASP/VBScript. Typically 2 - 10 queries are executed in a loop, and the
result sets are sent off to Crystal Reports at the end of the run with the
report being displayed in a browser window. In general this all works well
is has been very reliable.
Lately I've been having trouble with some of these queries on databases that
have gotten quite large (25 - 40G) but only a couple of the tables have
rowcounts in the tens of millions, most are relatively small. The behavior
is that the first query runs, sometimes for up to 90 minutes, seems to
complete, and then the pid is gone. Looking at the profile trace, I can see
that the query executed nearly 13 M reads with a duration of over 90
minutes. The line following the SQL:BatchCompleted event is Audit Logout,
and thats the last trace of the process. Under "normal" operation, the next
query would start and they would all run until the loop is complete. I've
seen this now with 2 completely different sets of queries, on 2 different
dbs, yet the symptoms are the same. It completes a very simple query that
returns a single datetime value. Then the first "real" query runs, anywhere
from 60 - 90 minutes or more, and then the process goes away.
It seems as if I've reached some threshold or internal timeout. I have the
connection time and query timeouts set to very large values (1000 minutes),
so it's not that.The client process is of course IIS. This is running SQL
Server 2000 SP3, NT 4.0, IIS 5.5.
I have had sets of queries that have taken as long as 3 hours to complete,
but each individual query probably never exceeded 45 minutes in duration.
Can anyone think of what is causing this to happen -- why does the pid go
away after the first query completes? Is there some other internal timeout
somewhere that I'm running into?
Any advice is appreciated,
-GaryYou might be experiencing lock_timeout. See if it helps:
http://msdn.microsoft.com/library/en-us/tsqlref/ts_set-set_1yr8.asp
"Gary" <gld@.hotmail.com> wrote in message
news:bisSc.243431$IQ4.52808@.attbi_s02...
> I have a web based application that launches sql queries using ADO from
> ASP/VBScript. Typically 2 - 10 queries are executed in a loop, and the
> result sets are sent off to Crystal Reports at the end of the run with the
> report being displayed in a browser window. In general this all works well
> is has been very reliable.
> Lately I've been having trouble with some of these queries on databases
that
> have gotten quite large (25 - 40G) but only a couple of the tables have
> rowcounts in the tens of millions, most are relatively small. The behavior
> is that the first query runs, sometimes for up to 90 minutes, seems to
> complete, and then the pid is gone. Looking at the profile trace, I can
see
> that the query executed nearly 13 M reads with a duration of over 90
> minutes. The line following the SQL:BatchCompleted event is Audit Logout,
> and thats the last trace of the process. Under "normal" operation, the
next
> query would start and they would all run until the loop is complete. I've
> seen this now with 2 completely different sets of queries, on 2 different
> dbs, yet the symptoms are the same. It completes a very simple query that
> returns a single datetime value. Then the first "real" query runs,
anywhere
> from 60 - 90 minutes or more, and then the process goes away.
> It seems as if I've reached some threshold or internal timeout. I have the
> connection time and query timeouts set to very large values (1000
minutes),
> so it's not that.The client process is of course IIS. This is running SQL
> Server 2000 SP3, NT 4.0, IIS 5.5.
> I have had sets of queries that have taken as long as 3 hours to complete,
> but each individual query probably never exceeded 45 minutes in duration.
> Can anyone think of what is causing this to happen -- why does the pid go
> away after the first query completes? Is there some other internal timeout
> somewhere that I'm running into?
> Any advice is appreciated,
> -Gary
>
>|||Thanks for the tip. I checked a server and it's returning -1 (infinite) for
this. I'm thinking that the problem is the client connection to the database
dropping sometime during the processing of a query, and when the statement
complete event occurs, SQL detects that the connection is gone and therefore
the audit logoff event.
"oj" <nospam_ojngo@.home.com> wrote in message
news:O7lkZQ$fEHA.3632@.TK2MSFTNGP09.phx.gbl...
> You might be experiencing lock_timeout. See if it helps:
> http://msdn.microsoft.com/library/en-us/tsqlref/ts_set-set_1yr8.asp
>
Monday, March 19, 2012
Logon Problem - I am an idiot "ID 10 T"
Works great in WEbMatrix, but when I move the code to Visual Studio.VB,
I get a logon error when the code is run.
Any Help is Greatly Appreciated... I am stuck....
Here is the code:
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
DataGrid1.DataSource = GetCustomers()
DataGrid1.DataBind()
End Sub
Private Function GetCustomers() As System.Data.SqlClient.SqlDataReader
Dim connectionString As String = "server='localhost'; trusted_connection=true; Database='ASPExamples'"
Dim sqlConnection As System.Data.SqlClient.SqlConnection = New System.Data.SqlClient.SqlConnection(connectionString)
Dim queryString As String = "SELECT [Customers].* FROM [Customers]"
Dim sqlCommand As System.Data.SqlClient.SqlCommand = New System.Data.SqlClient.SqlCommand(queryString, sqlConnection)
sqlConnection.Open()
Dim dataReader As System.Data.SqlClient.SqlDataReader = sqlCommand.ExecuteReader(System.Data.CommandBehavior.CloseConnection)
Return dataReader
End Function
End ClassProblem is solved,
It was SQL Server Security, I had to add a user <Machine Name\ASPNET>
..and explicitly give permissions for SELECT, UPDATE, Etc...
Funny, but the same exact code in WEB MATRIX did not require this to be done.
Any insight on this please respond....
Logon failed. (rsLogonFailed)
I am writing a web application in c# that is attempting to get the
parameters from a report on a Reporting Services 2005 server.
I am using the following code:
SQLReportViewer.ServerReport.ReportServerCredentials = new
ReportCredentials(UserName, UserPassword, UserDomain);
SQLReportViewer.ServerReport.ReportPath = Rpt.FileName;
SQLReportViewer.ServerReport.ReportServerUrl = new Uri(ServerUrl);
Parameters = SQLReportViewer.ServerReport.GetParameters();
The Getparameters Line causes the following exception:
Microsoft.Reporting.WebForms.ReportServerException was unhandled by user
code
Message="Logon failed. (rsLogonFailed)"
Source="Microsoft.ReportViewer.WebForms"
ErrorCode="rsLogonFailed"
StackTrace:
at Microsoft.Reporting.WebForms.ServerReport.get_Service()
at Microsoft.Reporting.WebForms.ServerReport.GetExecutionInfo()
at Microsoft.Reporting.WebForms.ServerReport.GetParameters()
The UserName, UserPassword and UserDomain variables are all populated
with correct data, as is Rpt.FileName.
The ReportCredentials class is a very simple implementation of the
ICredentials interface - Code shown here:
-->
public class ReportCredentials : IReportServerCredentials
{
protected string _UserName, _Password, _Domain;
public ReportCredentials(string UserName, string Password, string Domain)
{
_UserName = UserName;
_Password = Password;
_Domain = Domain;
}
//*****************************************************************
public bool GetFormsCredentials (out System.Net.Cookie AuthCookie,
out string UserName, out string Password, out string Authority)
{
UserName = _UserName;
Password = _Password;
Authority = _Domain;
AuthCookie = null;
return (true);
}
//*****************************************************************
public System.Security.Principal.WindowsIdentity ImpersonationUser
{
get { return (null); }
}
//*****************************************************************
public ICredentials NetworkCredentials
{
get{ return (new NetworkCredential(_UserName, _Password, _Domain)); }
}
<--
I can use the same credentials to retrieve a list of reports from the
report server (the report I am trying to access is in that list) and to
log on directly by going to the URL of Reporting Services.
This is made more frustrating by the complete lack of detail in the
error message, as it does not say why the logon failed, or give me a
single clue about what is going on.
Has anyone seen this before and can tell me how to fix it, or is there
something stupid in my code?
Thankyou.
PaulTwo points. What role is your user in? It could be that perhaps you need to
be in a different role to get information about the report than you do to
get a list of reports? It seems to me if it worked for a list of reports
then your login must be OK.
Second issue. For something like this I recommend trying to web forum. The
other MVP is there and is familiar with webservices. Also, that is where MS
people hang out.
http://forums.microsoft.com/msdn/showforum.aspx?forumid=82&siteid=1
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Paul Cheetham" <PAC.News@.dsl.pipex.com> wrote in message
news:%231p4s096HHA.5164@.TK2MSFTNGP05.phx.gbl...
> Hi,
> I am writing a web application in c# that is attempting to get the
> parameters from a report on a Reporting Services 2005 server.
> I am using the following code:
> SQLReportViewer.ServerReport.ReportServerCredentials = new
> ReportCredentials(UserName, UserPassword, UserDomain);
> SQLReportViewer.ServerReport.ReportPath = Rpt.FileName;
> SQLReportViewer.ServerReport.ReportServerUrl = new Uri(ServerUrl);
> Parameters = SQLReportViewer.ServerReport.GetParameters();
> The Getparameters Line causes the following exception:
>
> Microsoft.Reporting.WebForms.ReportServerException was unhandled by user
> code
> Message="Logon failed. (rsLogonFailed)"
> Source="Microsoft.ReportViewer.WebForms"
> ErrorCode="rsLogonFailed"
> StackTrace:
> at Microsoft.Reporting.WebForms.ServerReport.get_Service()
> at Microsoft.Reporting.WebForms.ServerReport.GetExecutionInfo()
> at Microsoft.Reporting.WebForms.ServerReport.GetParameters()
>
> The UserName, UserPassword and UserDomain variables are all populated with
> correct data, as is Rpt.FileName.
> The ReportCredentials class is a very simple implementation of the
> ICredentials interface - Code shown here:
>
> -->
> public class ReportCredentials : IReportServerCredentials
> {
> protected string _UserName, _Password, _Domain;
> public ReportCredentials(string UserName, string Password, string Domain)
> {
> _UserName = UserName;
> _Password = Password;
> _Domain = Domain;
> }
> //*****************************************************************
> public bool GetFormsCredentials (out System.Net.Cookie AuthCookie, out
> string UserName, out string Password, out string Authority)
> {
> UserName = _UserName;
> Password = _Password;
> Authority = _Domain;
> AuthCookie = null;
> return (true);
> }
> //*****************************************************************
> public System.Security.Principal.WindowsIdentity ImpersonationUser
> {
> get { return (null); }
> }
> //*****************************************************************
> public ICredentials NetworkCredentials
> {
> get{ return (new NetworkCredential(_UserName, _Password, _Domain)); }
> }
> <--
> I can use the same credentials to retrieve a list of reports from the
> report server (the report I am trying to access is in that list) and to
> log on directly by going to the URL of Reporting Services.
> This is made more frustrating by the complete lack of detail in the error
> message, as it does not say why the logon failed, or give me a single clue
> about what is going on.
> Has anyone seen this before and can tell me how to fix it, or is there
> something stupid in my code?
> Thankyou.
> Paul
>|||OK Thanks, I'll post there.
I'm pretty sure the Role is OK, as I know the same user details are
being used successfully in another application, which I am replacing,
but that is just showing the report and is not trying to get the
Parameter list.
Paul
Bruce L-C [MVP] wrote:
> Two points. What role is your user in? It could be that perhaps you need to
> be in a different role to get information about the report than you do to
> get a list of reports? It seems to me if it worked for a list of reports
> then your login must be OK.
> Second issue. For something like this I recommend trying to web forum. The
> other MVP is there and is familiar with webservices. Also, that is where MS
> people hang out.
> http://forums.microsoft.com/msdn/showforum.aspx?forumid=82&siteid=1
>
Logon failed. (rsLogonFailed)
I am writing a web application in c# that is attempting to get the parameters from a report on a Reporting Services 2005 server.
I am using the following code:
SQLReportViewer.ServerReport.ReportServerCredentials = new
ReportCredentials(UserName, UserPassword, UserDomain);
SQLReportViewer.ServerReport.ReportPath = Rpt.FileName;
SQLReportViewer.ServerReport.ReportServerUrl = new Uri(ServerUrl);
Parameters = SQLReportViewer.ServerReport.GetParameters();
The Getparameters Line causes the following exception:
Microsoft.Reporting.WebForms.ReportServerException was unhandled by user code
Message="Logon failed. (rsLogonFailed)"
Source="Microsoft.ReportViewer.WebForms"
ErrorCode="rsLogonFailed"
StackTrace:
at Microsoft.Reporting.WebForms.ServerReport.get_Service()
at Microsoft.Reporting.WebForms.ServerReport.GetExecutionInfo()
at Microsoft.Reporting.WebForms.ServerReport.GetParameters()
The UserName, UserPassword and UserDomain variables are all populated with correct data, as is Rpt.FileName.
The ReportCredentials class is a very simple implementation of the ICredentials interface - Code shown here:
-->
public class ReportCredentials : IReportServerCredentials
{
protected string _UserName, _Password, _Domain;
public ReportCredentials(string UserName, string Password, string Domain)
{
_UserName = UserName;
_Password = Password;
_Domain = Domain;
}
//*****************************************************************
public bool GetFormsCredentials (out System.Net.Cookie AuthCookie, out string UserName, out string Password, out string Authority)
{
UserName = _UserName;
Password = _Password;
Authority = _Domain;
AuthCookie = null;
return (true);
}
//*****************************************************************
public System.Security.Principal.WindowsIdentity ImpersonationUser
{
get { return (null); }
}
//*****************************************************************
public ICredentials NetworkCredentials
{
get{ return (new NetworkCredential(_UserName, _Password, _Domain)); }
}
<--
I can use the same credentials to retrieve a list of reports from the report server (the report I am trying to access is in that list) and to log on directly by going to the URL of Reporting Services.
This is made more frustrating by the complete lack of detail in the error message, as it does not say why the logon failed, or give me a single clue about what is going on.
Has anyone seen this before and can tell me how to fix it, or is there something stupid in my code?
Thankyou.
Paul
Does the same thing happen when you do this:
Code Snippet CredentialCache cc = new CredentialCache(); cc.Add(new Uri(Settings.Default.ReportServerEndPoint),"Basic", new NetworkCredential("uid", "pwd")); reportViewer.ServerReport.ReportServerCredentials.NetworkCredentials = cc;
|||Hi,
ReportServerCredentials.NetworkCredentials is read only, and so cannot be assigned to.
Thankyou.
|||
You are right of course. Unline the WinForms version, the ASP.NET version of ReportViewer has NetworkCredentials read-only. Upon a second look, I don't see your code implementing IReportServerCredentials.GetBasicCredentials.
Code Snippet
using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.Reporting.WinForms;
using System.Security.Principal;
public class ReportViewerCredentials : IReportServerCredentials
{
public ReportViewerCredentials()
{
}
public ReportViewerCredentials(string username)
{
this.Username = username;
}
public ReportViewerCredentials(string username, string password)
{
this.Username = username;
this.Password = password;
}
public ReportViewerCredentials(string username, string password, string domain)
{
this.Username = username;
this.Password = password;
this.Domain = domain;
}
public string Username
{
get
{
return this.username;
}
set
{
string username = value;
if (username.Contains("\\"))
{
this.domain = username.Substring(0, username.IndexOf("\\"));
this.username = username.Substring(username.IndexOf("\\") + 1);
}
else
{
this.username = username;
}
}
}
private string username;
public string Password
{
get
{
return this.password;
}
set
{
this.password = value;
}
}
private string password;
public string Domain
{
get
{
return this.domain;
}
set
{
this.domain = value;
}
}
private string domain;
#region IReportServerCredentials Members
public bool GetBasicCredentials(out string basicUser, out string basicPassword, out string basicDomain)
{
basicUser = username;
basicPassword = password;
basicDomain = domain;
return username != null && password != null && domain != null;
}
public bool GetFormsCredentials(out string formsUser, out string formsPassword, out string formsAuthority)
{
formsUser = username;
formsPassword = password;
formsAuthority = domain;
return username != null && password != null && domain != null;
}
public WindowsIdentity ImpersonationUser
{
get
{
return null;
}
}
#endregion
}
After much messing about and testing, I finally tracked it down to a problem in the GetformsCredentials function in my Credentials class.
By changing it to the following, everything works.
public bool GetFormsCredentials (out System.Net.Cookie AuthCookie, out string UserName, out string Password, out string Authority)
{
UserName = null;
Password = null;
Authority = null;
AuthCookie = null;
return (false);
}
Thanks
Paul
Logon failed. (rsLogonFailed)
I am writing a web application in c# that is attempting to get the parameters from a report on a Reporting Services 2005 server.
I am using the following code:
SQLReportViewer.ServerReport.ReportServerCredentials = new
ReportCredentials(UserName, UserPassword, UserDomain);
SQLReportViewer.ServerReport.ReportPath = Rpt.FileName;
SQLReportViewer.ServerReport.ReportServerUrl = new Uri(ServerUrl);
Parameters = SQLReportViewer.ServerReport.GetParameters();
The Getparameters Line causes the following exception:
Microsoft.Reporting.WebForms.ReportServerException was unhandled by user code
Message="Logon failed. (rsLogonFailed)"
Source="Microsoft.ReportViewer.WebForms"
ErrorCode="rsLogonFailed"
StackTrace:
at Microsoft.Reporting.WebForms.ServerReport.get_Service()
at Microsoft.Reporting.WebForms.ServerReport.GetExecutionInfo()
at Microsoft.Reporting.WebForms.ServerReport.GetParameters()
The UserName, UserPassword and UserDomain variables are all populated with correct data, as is Rpt.FileName.
The ReportCredentials class is a very simple implementation of the ICredentials interface - Code shown here:
-->
public class ReportCredentials : IReportServerCredentials
{
protected string _UserName, _Password, _Domain;
public ReportCredentials(string UserName, string Password, string Domain)
{
_UserName = UserName;
_Password = Password;
_Domain = Domain;
}
//*****************************************************************
public bool GetFormsCredentials (out System.Net.Cookie AuthCookie, out string UserName, out string Password, out string Authority)
{
UserName = _UserName;
Password = _Password;
Authority = _Domain;
AuthCookie = null;
return (true);
}
//*****************************************************************
public System.Security.Principal.WindowsIdentity ImpersonationUser
{
get { return (null); }
}
//*****************************************************************
public ICredentials NetworkCredentials
{
get{ return (new NetworkCredential(_UserName, _Password, _Domain)); }
}
<--
I can use the same credentials to retrieve a list of reports from the report server (the report I am trying to access is in that list) and to log on directly by going to the URL of Reporting Services.
This is made more frustrating by the complete lack of detail in the error message, as it does not say why the logon failed, or give me a single clue about what is going on.
Has anyone seen this before and can tell me how to fix it, or is there something stupid in my code?
Thankyou.
Paul
Does the same thing happen when you do this:
Code Snippet CredentialCache cc = new CredentialCache(); cc.Add(new Uri(Settings.Default.ReportServerEndPoint),"Basic", new NetworkCredential("uid", "pwd")); reportViewer.ServerReport.ReportServerCredentials.NetworkCredentials = cc;
|||Hi,
ReportServerCredentials.NetworkCredentials is read only, and so cannot be assigned to.
Thankyou.
|||
You are right of course. Unline the WinForms version, the ASP.NET version of ReportViewer has NetworkCredentials read-only. Upon a second look, I don't see your code implementing IReportServerCredentials.GetBasicCredentials.
Code Snippet
using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.Reporting.WinForms;
using System.Security.Principal;
public class ReportViewerCredentials : IReportServerCredentials
{
public ReportViewerCredentials()
{
}
public ReportViewerCredentials(string username)
{
this.Username = username;
}
public ReportViewerCredentials(string username, string password)
{
this.Username = username;
this.Password = password;
}
public ReportViewerCredentials(string username, string password, string domain)
{
this.Username = username;
this.Password = password;
this.Domain = domain;
}
public string Username
{
get
{
return this.username;
}
set
{
string username = value;
if (username.Contains("\\"))
{
this.domain = username.Substring(0, username.IndexOf("\\"));
this.username = username.Substring(username.IndexOf("\\") + 1);
}
else
{
this.username = username;
}
}
}
private string username;
public string Password
{
get
{
return this.password;
}
set
{
this.password = value;
}
}
private string password;
public string Domain
{
get
{
return this.domain;
}
set
{
this.domain = value;
}
}
private string domain;
#region IReportServerCredentials Members
public bool GetBasicCredentials(out string basicUser, out string basicPassword, out string basicDomain)
{
basicUser = username;
basicPassword = password;
basicDomain = domain;
return username != null && password != null && domain != null;
}
public bool GetFormsCredentials(out string formsUser, out string formsPassword, out string formsAuthority)
{
formsUser = username;
formsPassword = password;
formsAuthority = domain;
return username != null && password != null && domain != null;
}
public WindowsIdentity ImpersonationUser
{
get
{
return null;
}
}
#endregion
}
After much messing about and testing, I finally tracked it down to a problem in the GetformsCredentials function in my Credentials class.
By changing it to the following, everything works.
public bool GetFormsCredentials (out System.Net.Cookie AuthCookie, out string UserName, out string Password, out string Authority)
{
UserName = null;
Password = null;
Authority = null;
AuthCookie = null;
return (false);
}
Thanks
Paul
Logon Failed
run it in BS, but when I try to get the report in my Web app or using Report
Manager I get "Logon Failed" error. I'm using Win Athentication credientials.
SQL Server 2005, SP2.
Thanks for help.
FereydoonI found the answer by myself:
In the Reporting Server Configuration page in Execution Account, uncheck the
Specify Account, so any user that have access to the reporting server can
execute the report.
"Fereydoon" wrote:
> OK. I have my Reporting Server running and able to create report with BS and
> run it in BS, but when I try to get the report in my Web app or using Report
> Manager I get "Logon Failed" error. I'm using Win Athentication credientials.
> SQL Server 2005, SP2.
> Thanks for help.
> Fereydoon
Monday, March 12, 2012
Logistics - Transaction Log Backup
application. I have been doing daily backups of the SQL 2K database (Simple
Recovery method) and then use another service to ship that backup off
somewhere else in the world (can only schedule a backup once a day) in
addition to the daily system backup by the hosting company. Recently, the
server crashed and took with it my RAID drives as they were unreadable
somehow. The data was retrieved but I lost a day's worth of data.
So, I would like to NOT lose a day's worth of data again, and move to a Full
Recovery method with daily full backups with transaction log backups
periodically throughout the day. My trouble is that since I don't have a
dedicated tape machine, or access to a network drive (somewhere far away
from my server), and don't know of any FTP programs (to where?) that would
move those logs off my server, I'm wondering what others do. Just saving
those logs throughout the day won't do any good if the server crashes two
minutes before the backup.
Thanks for any tips on the logistics of backup.For smaller database I do backup locally, then have another job step (or all inside the stored
procedure) that uses the "DOS" COPY command to copy that files over to another machine. If that
isn't an option, I do the backup though an UNC directly to the other machine.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Don Miller" <nospam@.nospam.com> wrote in message news:OxjxSf3cGHA.4900@.TK2MSFTNGP02.phx.gbl...
>I rent a dedicated server at a hosting site for a database-driven web
> application. I have been doing daily backups of the SQL 2K database (Simple
> Recovery method) and then use another service to ship that backup off
> somewhere else in the world (can only schedule a backup once a day) in
> addition to the daily system backup by the hosting company. Recently, the
> server crashed and took with it my RAID drives as they were unreadable
> somehow. The data was retrieved but I lost a day's worth of data.
> So, I would like to NOT lose a day's worth of data again, and move to a Full
> Recovery method with daily full backups with transaction log backups
> periodically throughout the day. My trouble is that since I don't have a
> dedicated tape machine, or access to a network drive (somewhere far away
> from my server), and don't know of any FTP programs (to where?) that would
> move those logs off my server, I'm wondering what others do. Just saving
> those logs throughout the day won't do any good if the server crashes two
> minutes before the backup.
> Thanks for any tips on the logistics of backup.
>|||Just out of curiosity, have you checked with your hosting company about
doing the tape backup for you? Most provide this with your monthly fee
if it's their server.
At any rate, you can write a DTS package to move your backups via FTP
to wherever you like.|||Yes, I've talked to the hosting company (who does the entire system backups
to tape for a monthly fee) and this request (can I use their tape as a
device for backing up log files) seemed to puzzle them.
In the interim today, I found a service called LiveVault that does DB
backups of the "open" .mdf and .ldf files every 15 minutes without
transaction logs or any intervention with "standard" SQL 2K backup methods.
The problem is that this service costs as much as the server per month.
"PSPDBA" <williambr@.state.pa.us> wrote in message
news:1147200884.116152.217410@.i39g2000cwa.googlegroups.com...
> Just out of curiosity, have you checked with your hosting company about
> doing the tape backup for you? Most provide this with your monthly fee
> if it's their server.
> At any rate, you can write a DTS package to move your backups via FTP
> to wherever you like.
>|||You probably wouldn't want to use a tape as a backup device. You are
much better off (quicker) to backup to disk, then transfer to tape.
You can probably just give them the directories you want backed up and
the schedule.
It all comes down to what your downtime costs you - figure that out and
you'll know which avenue is best.
Friday, March 9, 2012
Login with Web Archive
I have a subscription that sends a web archive report to my email
address. When I view the report in Outlook 2002, I am prompted with a
Windows login box. The report cosists of two tables and a chart.
In addition there is a 2k attachment with a long name consisting of
number, letters, and dahses.
When I view the same report in RS, the system recognizes my current
login credentials and lets me in without the login box appearing.
We are using Reporting Services SP1 on a Windows 2000 server. Our
email is all done using Exchange 2000.
Why does it ask me to login when I am viewing the report in Outlook?
Any help you can provide is greatly appreciated.
CraigI have also found the part of the MHTML file that may be the problem:
.a57 {
BORDER-RIGHT: black 1pt solid; PADDING-RIGHT: 0pt; BORDER-TOP: black
1pt solid; PADDING-LEFT: 0pt; BACKGROUND-IMAGE:
url(http://oaknccw2k49/ReportServer?%2fIT+Metrics%2fITFS%2fIT+Employee+Reviews&rs%3aFormat=MHTML&rs%3aImageID=5e3cd4b5-ae96-4650-9e3b-f687c89cfbef);
PADDING-BOTTOM: 0pt; BORDER-LEFT: black 1pt solid; WIDTH: 171.45mm;
PADDING-TOP: 0pt; BORDER-BOTTOM: black 1pt solid; BACKGROUND-REPEAT:
no-repeat; HEIGHT: 130.18mm; BACKGROUND-COLOR: white
}
When I browser to that link, I get a "rsStreamNotFound" error.
I have not been able to find anything with a background image other
than my chart and that is working correctly.
Thanks again.
Craig
Login with different Roles
Hello readers
I have a problem with the following:
I made a login page in Visual Web Developer 2005 and I used the ASP.net Configationtool in the Website menu. Made some couple test accounts to login and made a role: "Beheerders". Made 1 of my test accounts a "Administrators".
So my problem is when I log in with the account with the "Beheerders" role, i go to the page of the "normal user". I tried to look in many sites, I could find some nice aid but not 100% the one that could solve my problem.
This is my code i programmed in the seperatefile of Login.aspx
Imports System
Imports System.Data
Imports System.Data.SqlClient
Imports Login
PartialClass LoginInherits System.Web.UI.Page
ProtectedSub Login1_LoggedIn(ByVal senderAsObject,ByVal eAs System.EventArgs)Handles Login1.LoggedInDim userinfoAs MembershipUser = Membership.GetUser(Login1.UserName)
Dim UserRol()AsString
UserRol = Roles.GetRolesForUser(userinfo.UserName)
If (Roles.IsUserInRole("Beheerders") =False)Then
Response.Redirect("~\Index.aspx")EndIf
EndSub
ProtectedSub Login1_LoggedIn()EndSub
ProtectedSub Login1_LoginError(ByVal senderAsObject,ByVal eAs System.EventArgs)Handles Login1.LoginError'Parameters instellen voor InvalidCredentialsLogDataSource
InvalidCredentialsLogDataSource.InsertParameters("ApplicationName").DefaultValue = Membership.ApplicationNameInvalidCredentialsLogDataSource.InsertParameters("UserName").DefaultValue = Login1.UserName
InvalidCredentialsLogDataSource.InsertParameters("IPAddress").DefaultValue = Request.UserHostAddressInvalidCredentialsLogDataSource.InsertParameters("Password").DefaultValue = Login1.Password
'Er was een probleem bij het aanmelden
'Nakijken of gebruiker bestaat in de databank
Dim userInfoAs MembershipUser = Membership.GetUser(Login1.UserName)If userInfoIsNothingThen
'Ongeldige gebruikersnaam...
LoginErrorDetails.Text ="Geen gebruiker met naam """ & Login1.UserName &""" in de databank !"
Else
'Nakijken of gebruiker Lockedout of Approved is
IfNot userInfo.IsApprovedThen
LoginErrorDetails.Text ="Uw account is nog niet goedgekeurd!"
ElseIf userInfo.IsLockedOutThen
LoginErrorDetails.Text ="Uw account is geblokkeerd wegens te veel mislukte aanmeldpogingen!"
Else
'Het wachtwoord was verkeerd
LoginErrorDetails.Text ="Verkeerd wachtwoord - """ & Login1.Password &""""
EndIf
EndIf
'Record wegschrijven naar datasource
InvalidCredentialsLogDataSource.Insert()
EndSubEndClass
Thanks for your help.
Regardings
Griffin1987
I believe your problem here is that in the loggedIn event, the cookie is not actually set yet. To get the name of the user, use the name from the control which I think is
login1.UserName
Wednesday, March 7, 2012
Login to SQL Server for Web Application
Hello everyone,
I am currently developing a web application that retrieves and updates contact information in a database. I am coding the application with VB.Net and ASP.Net with a little bit of javascript. It is accessing a SQL Server Database.
Everything is working fine when I run the web application from within the VS.Net environment. However after publishing the website to our local Intranet (where the app will be stored) I get the following error:
Server Error in '/ollodev1/RIC' Application.
Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.
Description:Anunhandled exception occurred during the execution of the current webrequest. Please review the stack trace for more information about theerror and where it originated in the code.
Exception Details:System.Data.SqlClient.SqlException: Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.
Source Error:
An unhandled exception was generated during the execution of thecurrent web request. Information regarding the origin and location ofthe exception can be identified using the exception stack trace below.
I assume that this message appears because I am not retrieving setting the proper access rights from the DB but I don't know how to go about doing this. Could someone provide me with a link to a few examples to help resolve my issue?
Thanks,
Eric
Also, I've been testing to resolve the matter and I assume it is because of this.
When I added the line of: label1.text = Request.Servervariables("AUTH_USER")
it shows: domain1\<winnt id>
But when I published the website to our intranet:
The label is blanked...
I'm trying to add as much info as possible.
Thanks again
The Null user error is related to your SQL Server installed with Windows Authentication and your application connecting to SQL Server with SQL Server authentication, you can solve this by changing SQL Server to mixed authentication. That is covered in the link below.
http://msdn2.microsoft.com/en-us/library/ms188670.aspx
Asp.net account in IIS5 that is Win2k and XP, and Network service account in Win2003 needs permissions in SQL Server, there are two permissions in SQL Server the server permissions in the security section under management in Management Studio and the database permissions in the new security section within the database in Management Studio. When you have finished creating the permissions adjust your Web.Config as in the link below. Hope this helps.
http://weblogs.asp.net/scottgu/archive/2005/08/25/423703.aspx
Friday, February 24, 2012
Login Prompt after ~3min timeout
to excel with certain parameters, takes several minutes to run. After
something between 2.5mins and 3mins this will prompt for a username and
password. Providing a valid username and passoword gives you another 3mins
before you get prompted again and so on until you have been prompted 3 times,
after which you get an IIS permission denied message up.
Running a SQL Server trace against the server makes it appear as if the
report restarts running as the stored procedure is re-run (even though this
had completed successfully before the timeout was hit), so the report appears
to start again.
Looking at the Logfiles there are message about orphaned requests and Item
with session ... not found in database.
I have tried increasing the:
Database query timeout to 240 secs - no effect.
The report timeout to unlimited - no effect.
MaxMemoryLimit to 80% - no effect.
ASP timeout to 600 sec - no effect.
I can't see any error messages in the event log.
Does anybody have any idea what is actually timing out, and even where I can
set it.
Please through in random suggestions, I am willing to try anything. BTW
this is happening on both the server which is running SP2 and the one with no
service packs on.
Many thanksI should have added:
It is nothing to do with permissions as this is fine with a smaller dataset,
also I am administrator on, one of the machines on which this problem is
occuring.
Session timeout values are default of 20mins.
"Nicola Jones" wrote:
> I have a report which I am running from a web front end, which, when exported
> to excel with certain parameters, takes several minutes to run. After
> something between 2.5mins and 3mins this will prompt for a username and
> password. Providing a valid username and passoword gives you another 3mins
> before you get prompted again and so on until you have been prompted 3 times,
> after which you get an IIS permission denied message up.
> Running a SQL Server trace against the server makes it appear as if the
> report restarts running as the stored procedure is re-run (even though this
> had completed successfully before the timeout was hit), so the report appears
> to start again.
> Looking at the Logfiles there are message about orphaned requests and Item
> with session ... not found in database.
> I have tried increasing the:
> Database query timeout to 240 secs - no effect.
> The report timeout to unlimited - no effect.
> MaxMemoryLimit to 80% - no effect.
> ASP timeout to 600 sec - no effect.
> I can't see any error messages in the event log.
> Does anybody have any idea what is actually timing out, and even where I can
> set it.
> Please through in random suggestions, I am willing to try anything. BTW
> this is happening on both the server which is running SP2 and the one with no
> service packs on.
> Many thanks|||The problem was caused by the ConnectionTimeout value in machine.config.
This was set to 2mins.
"Nicola Jones" wrote:
> I should have added:
> It is nothing to do with permissions as this is fine with a smaller dataset,
> also I am administrator on, one of the machines on which this problem is
> occuring.
> Session timeout values are default of 20mins.
> "Nicola Jones" wrote:
> > I have a report which I am running from a web front end, which, when exported
> > to excel with certain parameters, takes several minutes to run. After
> > something between 2.5mins and 3mins this will prompt for a username and
> > password. Providing a valid username and passoword gives you another 3mins
> > before you get prompted again and so on until you have been prompted 3 times,
> > after which you get an IIS permission denied message up.
> >
> > Running a SQL Server trace against the server makes it appear as if the
> > report restarts running as the stored procedure is re-run (even though this
> > had completed successfully before the timeout was hit), so the report appears
> > to start again.
> >
> > Looking at the Logfiles there are message about orphaned requests and Item
> > with session ... not found in database.
> >
> > I have tried increasing the:
> >
> > Database query timeout to 240 secs - no effect.
> > The report timeout to unlimited - no effect.
> > MaxMemoryLimit to 80% - no effect.
> > ASP timeout to 600 sec - no effect.
> >
> > I can't see any error messages in the event log.
> >
> > Does anybody have any idea what is actually timing out, and even where I can
> > set it.
> >
> > Please through in random suggestions, I am willing to try anything. BTW
> > this is happening on both the server which is running SP2 and the one with no
> > service packs on.
> >
> > Many thanks|||Sorry that should have said metabase.xml not machine.config.
"Nicola Jones" wrote:
> The problem was caused by the ConnectionTimeout value in machine.config.
> This was set to 2mins.
> "Nicola Jones" wrote:
> > I should have added:
> >
> > It is nothing to do with permissions as this is fine with a smaller dataset,
> > also I am administrator on, one of the machines on which this problem is
> > occuring.
> >
> > Session timeout values are default of 20mins.
> >
> > "Nicola Jones" wrote:
> >
> > > I have a report which I am running from a web front end, which, when exported
> > > to excel with certain parameters, takes several minutes to run. After
> > > something between 2.5mins and 3mins this will prompt for a username and
> > > password. Providing a valid username and passoword gives you another 3mins
> > > before you get prompted again and so on until you have been prompted 3 times,
> > > after which you get an IIS permission denied message up.
> > >
> > > Running a SQL Server trace against the server makes it appear as if the
> > > report restarts running as the stored procedure is re-run (even though this
> > > had completed successfully before the timeout was hit), so the report appears
> > > to start again.
> > >
> > > Looking at the Logfiles there are message about orphaned requests and Item
> > > with session ... not found in database.
> > >
> > > I have tried increasing the:
> > >
> > > Database query timeout to 240 secs - no effect.
> > > The report timeout to unlimited - no effect.
> > > MaxMemoryLimit to 80% - no effect.
> > > ASP timeout to 600 sec - no effect.
> > >
> > > I can't see any error messages in the event log.
> > >
> > > Does anybody have any idea what is actually timing out, and even where I can
> > > set it.
> > >
> > > Please through in random suggestions, I am willing to try anything. BTW
> > > this is happening on both the server which is running SP2 and the one with no
> > > service packs on.
> > >
> > > Many thanks
Login process error
Just setup a new system running Win2k3, SQL Server 2005, etc (all msdn).
I've got a web app (.net 2) which is running perfectly well, most of the
time, and then there's one page where I'm getting the following error...
Server Error in '/' Application.
A connection was successfully established with the server, but then an error
occured during the login process. (provider: Shared Memory Provider, error:
0
- No process is on the other end of the pipe.)
I guess the question is what does this message mean and how can I fix it?!
It's a website that's working fine apart from that page, and as far as I can
tell the code should be fine. Help!!
Cheers
Danmusosdev wrote:
> Hi guys
> Just setup a new system running Win2k3, SQL Server 2005, etc (all
> msdn). I've got a web app (.net 2) which is running perfectly well,
> most of the time, and then there's one page where I'm getting the
> following error...
> Server Error in '/' Application.
> A connection was successfully established with the server, but then
> an error occured during the login process. (provider: Shared Memory
> Provider, error: 0 - No process is on the other end of the pipe.)
> I guess the question is what does this message mean and how can I fix
> it?! It's a website that's working fine apart from that page, and as
> far as I can tell the code should be fine. Help!!
> Cheers
>
> Dan
http://msdn2.microsoft.com/en-us/library/ms175496.aspx
http://blogs.msdn.com/sql_protocols.../22/483684.aspx (see
message 4)
David Gugick - SQL Server MVP
Quest Software
Monday, February 20, 2012
Login Problem
I am not able to login into my SQL Server using Query Analyser using a valid
SA Password. But My web application is working fine.
Any Idea why it is happening.
Thanks & Regards
Balaji Prabhu.TBalaji,
Your message this thin... what's the error message ? Are you timing out whi
le attempting to connect ?
Need more info.
Login problem
I have two servers where the SQL Server DB provides the data for a Web site.
One server is the live Web server, the other one will serve as a backup.
I use an ODBC connection to conect to SQL Server, and there are a number of
asp pages that connect the SQL Server using SQL Server authentication.
Recently I restored the website DB on the backup server with a full backup
file from the live server and now the asp pages can not connect any more.
When I try to configure the ODBC connection I also get a message that
connection failed.
If I switch to Windows authentication in the ODBC manager I can connect and
the DB tests out successfully.
I tried editing the password but when I try to save it I get the message
that the userid already exists.
I also tried deleting the userid and adding it back in, but I get the same
message, that userid already exists.
I have just transferred another backup from the live server and it includes
a backup of the master, model and msdb DB's. I am hoping that restoring all
from this backup will correct the problem, but I am not an experienced DBA,
so I am not sure
Any suggestions as to how I could fix this problem would be appreciated, our
live server is acting up so we may need to switch.
RagnarSounds like you have switched the LoginMode for this Server or the password
of the user you are connecting with.
Try connecting to the server with the SQL login, if that wont work use
integrated authentication and check wheter the loginmode is WIndows or Mixed
Mode. If its mixed mode, you gotta reset your password because it doesnt
fit to that you you have. If you already tried that, there can be a
difference between the accounts that you imported. A user is created on the
server side on granted access to something on the db on the database level.
If you got a back restore on the backup server, these accounts wont fit
togehter, so oyu gotta delete the user on the db level and recreate him with
the appopiate security Script.
If you dont know how, just raise a hand (or write a mail) and ill help
you.
HTH, Jens Suessmeyer.
http://www.sqlserver2005.de
--
"Ragnar Midtskogen" <ragnar_ng@.newsgroups.com> schrieb im Newsbeitrag
news:O5d0%23g3SFHA.2096@.TK2MSFTNGP14.phx.gbl...
> Hello,
> I have two servers where the SQL Server DB provides the data for a Web
> site.
> One server is the live Web server, the other one will serve as a backup.
> I use an ODBC connection to conect to SQL Server, and there are a number
> of asp pages that connect the SQL Server using SQL Server authentication.
> Recently I restored the website DB on the backup server with a full backup
> file from the live server and now the asp pages can not connect any more.
> When I try to configure the ODBC connection I also get a message that
> connection failed.
> If I switch to Windows authentication in the ODBC manager I can connect
> and the DB tests out successfully.
> I tried editing the password but when I try to save it I get the message
> that the userid already exists.
> I also tried deleting the userid and adding it back in, but I get the same
> message, that userid already exists.
> I have just transferred another backup from the live server and it
> includes a backup of the master, model and msdb DB's. I am hoping that
> restoring all from this backup will correct the problem, but I am not an
> experienced DBA, so I am not sure
> Any suggestions as to how I could fix this problem would be appreciated,
> our live server is acting up so we may need to switch.
> Ragnar
>|||Thank you Jens,
I fixed the problem by adding a new userid with the appropriate privileges,
but I just restored an up to date backup and now the new userid doesn't
work.
This clearly has something to do with the restore, but from my understanding
of SQL Server it should not happen, since the userids and the security data
is stored in the Master database.
This time I was able to delete and add back the userid, so I am back in
business, but I need to find out why this is happening so I can prevent it.
We will be doing regular restores in order to keep the backup server ready
to take over if the live machine fails.
I guess I could run a script to delete and add back the user after every
restore, but I would rather avoid that.
Ragnar|||You are stucked in with orphaned users, you should look here:
http://support.microsoft.com/kb/274188/en-us
HTH, Jens Suessmeyer.
http://www.sqlserver2005.de
--
"Ragnar Midtskogen" <ragnar_ng@.newsgroups.com> schrieb im Newsbeitrag
news:Ow0VLwPTFHA.2768@.tk2msftngp13.phx.gbl...
> Thank you Jens,
> I fixed the problem by adding a new userid with the appropriate
> privileges, but I just restored an up to date backup and now the new
> userid doesn't work.
> This clearly has something to do with the restore, but from my
> understanding of SQL Server it should not happen, since the userids and
> the security data is stored in the Master database.
> This time I was able to delete and add back the userid, so I am back in
> business, but I need to find out why this is happening so I can prevent
> it.
> We will be doing regular restores in order to keep the backup server ready
> to take over if the live machine fails.
> I guess I could run a script to delete and add back the user after every
> restore, but I would rather avoid that.
> Ragnar
>|||Thank you Jens,
You hit the nail on the head!
I did not notice it, but the database username I was having problems with
does not have a login name, but there is a login with that name, so I
thought everything was OK.
And, sure enough, when I run the sp_change_users_login, the user can log in
to the DB again.
Of course, the acid test of the fix will come when I do the next restore.
I am puzzled how this happened though, I did not set up the DB on the backup
server, but I know it was created initially by restoring a backup from the
live server.
And the user could log in until I did a restore with recent data..
Thank you, made my day!
Ragnar|||Hello Jens,
I had a similar problem, and sp_change_users_login fixed most logins,
but for some of the logins the sp_change_users_login procedure returns
the error:
"The login already has an account under a different user name."
Isn't this exactly the situation that sp_change_users_login is supposed
to fix? What are your thoughts?
-Steve Reich
Ragnar Midtskogen wrote:
> *Thank you Jens,
> You hit the nail on the head!
> I did not notice it, but the database username I was having problems
> with
> does not have a login name, but there is a login with that name, so
> I
> thought everything was OK.
> And, sure enough, when I run the sp_change_users_login, the user can
> log in
> to the DB again.
> Of course, the acid test of the fix will come when I do the next
> restore.
> I am puzzled how this happened though, I did not set up the DB on the
> backup
> server, but I know it was created initially by restoring a backup
> from the
> live server.
> And the user could log in until I did a restore with recent data..
> Thank you, made my day!
> Ragnar *
sreich
---
Posted via http://www.codecomments.com
---
login page problem with reportviewer for winforms
My reportserver has forms authentication (for web based users).
When I now try to open a report in the winform report viewer I get an error
on the viewer about the login page. How can I pass the login credentials via
code to the reportserver?:
System.Net.WebException: The request failed with the error message:
--
<html><head><title>Object moved</title></head><body>
<h2>Object moved to <a
href='/ReportServer/pages/UIlogon.aspx?ReturnUrl=%2fReportserver%2fReportExecution2005.asmx'>here</a>.</h2>
</body></html>Hello bartVDA,
Thank you for posting.
Regarding on the windows form's reportViewer control, it is
programmatically requesting the report content from reportServer
application rather than interactively like the webbrowser control. Also,
since the form based authentication require the client-side always use
webbrowser to interactively request the report, this will break the winform
reportviewer(also webform reportviewer). BTW, for wniform application, you
can also consider directly lauch webbrowser to display the report through
the actual URL or use a webbrowser control in it though they're not as good
as the well encapsulated reportviewer.
Regards,
Steven Cheng
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may
learn and benefit from your issue.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.