Showing posts with label page. Show all posts
Showing posts with label page. Show all posts

Wednesday, March 28, 2012

How do I "apply" a log to a database? Urgent...

Hello!
The database is giving the torn page error.
I have yesterday's backup and today's log file ldf.
How do I apply the log file to database? We didn't backup today's log...
Thanks for your help and attention.
Jorge C.
rdc02271@.yahoo.com
You don't. If you want to recover to a point in time which is between database backups, then you
should have proper operating measures for that requirement. I.e., do log backups. This is what log
backups are for.
What is the recovery mode for your database? If it is simple, then the information needed to recover
is most probably not in the ldf file anymore. If it is full or bulk logged, then you can give any of
the log reader tools a try. I have listed some on my links page.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Jorge C" <rdc02271@.yahoo.com> wrote in message news:uLIyLmbRFHA.204@.TK2MSFTNGP15.phx.gbl...
> Hello!
> The database is giving the torn page error.
> I have yesterday's backup and today's log file ldf.
> How do I apply the log file to database? We didn't backup today's log...
> Thanks for your help and attention.
> Jorge C.
> rdc02271@.yahoo.com
>
>
|||Jorge,
- Backup current transaction log WITH NO_TRUNCATE
- Restore full backup using NORECOVERY clause
- Restore transaction log backup WITH RECOVERY
See "Restoring a Database to a Prior State" in BOL.
AMB
"Jorge C" wrote:

> Hello!
> The database is giving the torn page error.
> I have yesterday's backup and today's log file ldf.
> How do I apply the log file to database? We didn't backup today's log...
> Thanks for your help and attention.
> Jorge C.
> rdc02271@.yahoo.com
>
>
|||Oops. Perhaps I didn't read the OP close enough. Assuming that you do indeed perform regular
transaction log backups as well as regular database backups, see Alejandro's post. (I read it as you
didn't perform transaction log backups *at all*, which is a big difference from not performed
*today's* transaction log backup yet.
You might want to check out:
http://www.karaszi.com/SQLServer/inf...suspect_db.asp
http://www.karaszi.com/SQLServer/inf...eral_times.asp
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in message
news:uDMBL2bRFHA.3880@.tk2msftngp13.phx.gbl...
> You don't. If you want to recover to a point in time which is between database backups, then you
> should have proper operating measures for that requirement. I.e., do log backups. This is what log
> backups are for.
> What is the recovery mode for your database? If it is simple, then the information needed to
> recover is most probably not in the ldf file anymore. If it is full or bulk logged, then you can
> give any of the log reader tools a try. I have listed some on my links page.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "Jorge C" <rdc02271@.yahoo.com> wrote in message news:uLIyLmbRFHA.204@.TK2MSFTNGP15.phx.gbl...
>

How do I "apply" a log to a database? Urgent...

Hello!
The database is giving the torn page error.
I have yesterday's backup and today's log file ldf.
How do I apply the log file to database? We didn't backup today's log...
Thanks for your help and attention.
Jorge C.
rdc02271@.yahoo.comYou don't. If you want to recover to a point in time which is between databa
se backups, then you
should have proper operating measures for that requirement. I.e., do log bac
kups. This is what log
backups are for.
What is the recovery mode for your database? If it is simple, then the infor
mation needed to recover
is most probably not in the ldf file anymore. If it is full or bulk logged,
then you can give any of
the log reader tools a try. I have listed some on my links page.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Jorge C" <rdc02271@.yahoo.com> wrote in message news:uLIyLmbRFHA.204@.TK2MSFTNGP15.phx.gbl...

> Hello!
> The database is giving the torn page error.
> I have yesterday's backup and today's log file ldf.
> How do I apply the log file to database? We didn't backup today's log...
> Thanks for your help and attention.
> Jorge C.
> rdc02271@.yahoo.com
>
>|||Jorge,
- Backup current transaction log WITH NO_TRUNCATE
- Restore full backup using NORECOVERY clause
- Restore transaction log backup WITH RECOVERY
See "Restoring a Database to a Prior State" in BOL.
AMB
"Jorge C" wrote:

> Hello!
> The database is giving the torn page error.
> I have yesterday's backup and today's log file ldf.
> How do I apply the log file to database? We didn't backup today's log...
> Thanks for your help and attention.
> Jorge C.
> rdc02271@.yahoo.com
>
>|||Oops. Perhaps I didn't read the OP close enough. Assuming that you do indeed
perform regular
transaction log backups as well as regular database backups, see Alejandro's
post. (I read it as you
didn't perform transaction log backups *at all*, which is a big difference f
rom not performed
*today's* transaction log backup yet.
You might want to check out:
http://www.karaszi.com/SQLServer/in..._suspect_db.asp
http://www.karaszi.com/SQLServer/in...veral_times.asp
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message
news:uDMBL2bRFHA.3880@.tk2msftngp13.phx.gbl...
> You don't. If you want to recover to a point in time which is between data
base backups, then you
> should have proper operating measures for that requirement. I.e., do log b
ackups. This is what log
> backups are for.
> What is the recovery mode for your database? If it is simple, then the inf
ormation needed to
> recover is most probably not in the ldf file anymore. If it is full or bul
k logged, then you can
> give any of the log reader tools a try. I have listed some on my links pag
e.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "Jorge C" <rdc02271@.yahoo.com> wrote in message news:uLIyLmbRFHA.204@.TK2MS
FTNGP15.phx.gbl...
>sql

How do I "apply" a log to a database? Urgent...

Hello!
The database is giving the torn page error.
I have yesterday's backup and today's log file ldf.
How do I apply the log file to database? We didn't backup today's log...
Thanks for your help and attention.
Jorge C.
rdc02271@.yahoo.comYou don't. If you want to recover to a point in time which is between database backups, then you
should have proper operating measures for that requirement. I.e., do log backups. This is what log
backups are for.
What is the recovery mode for your database? If it is simple, then the information needed to recover
is most probably not in the ldf file anymore. If it is full or bulk logged, then you can give any of
the log reader tools a try. I have listed some on my links page.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Jorge C" <rdc02271@.yahoo.com> wrote in message news:uLIyLmbRFHA.204@.TK2MSFTNGP15.phx.gbl...
> Hello!
> The database is giving the torn page error.
> I have yesterday's backup and today's log file ldf.
> How do I apply the log file to database? We didn't backup today's log...
> Thanks for your help and attention.
> Jorge C.
> rdc02271@.yahoo.com
>
>|||Jorge,
- Backup current transaction log WITH NO_TRUNCATE
- Restore full backup using NORECOVERY clause
- Restore transaction log backup WITH RECOVERY
See "Restoring a Database to a Prior State" in BOL.
AMB
"Jorge C" wrote:
> Hello!
> The database is giving the torn page error.
> I have yesterday's backup and today's log file ldf.
> How do I apply the log file to database? We didn't backup today's log...
> Thanks for your help and attention.
> Jorge C.
> rdc02271@.yahoo.com
>
>|||Oops. Perhaps I didn't read the OP close enough. Assuming that you do indeed perform regular
transaction log backups as well as regular database backups, see Alejandro's post. (I read it as you
didn't perform transaction log backups *at all*, which is a big difference from not performed
*today's* transaction log backup yet.
You might want to check out:
http://www.karaszi.com/SQLServer/info_corrupt_suspect_db.asp
http://www.karaszi.com/SQLServer/info_restore_log_several_times.asp
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in message
news:uDMBL2bRFHA.3880@.tk2msftngp13.phx.gbl...
> You don't. If you want to recover to a point in time which is between database backups, then you
> should have proper operating measures for that requirement. I.e., do log backups. This is what log
> backups are for.
> What is the recovery mode for your database? If it is simple, then the information needed to
> recover is most probably not in the ldf file anymore. If it is full or bulk logged, then you can
> give any of the log reader tools a try. I have listed some on my links page.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "Jorge C" <rdc02271@.yahoo.com> wrote in message news:uLIyLmbRFHA.204@.TK2MSFTNGP15.phx.gbl...
>> Hello!
>> The database is giving the torn page error.
>> I have yesterday's backup and today's log file ldf.
>> How do I apply the log file to database? We didn't backup today's log...
>> Thanks for your help and attention.
>> Jorge C.
>> rdc02271@.yahoo.com
>>
>

How Do Add a DB Connection to a Table in SQL Server Express using Visual Web Developer?

I'm developing using Visual Web Developer and want to have a web page that shows the contents of a table. I get the error message when testing the connection through database explorer "Login failed for user ''. The user is not associated with a trusted SQL Server connection".

The database is located on a server running IIS and has SQL Server Express installed.

u may need to change the connection string to something like

Server=ServerAddress;Database=DataBase;User ID=Username;Password=Password;Trusted_Connection=False

How Do Add a DB Connection to a Table in SQL Server Express using Visual Web Developer?

I'm developing using Visual Web Developer and want to have a web page that shows the contents of a table. I get the error message when testing the connection through database explorer "Login failed for user ''. The user is not associated with a trusted SQL Server connection".

The database is located on a server running IIS and has SQL Server Express installed.

From MS:

During a logon process to SQL server the following error may appear:"Login failed for user 'username'. The user is not associated with atrusted SQL Server connection. (Microsoft SQL Server, Error: 18452)".

The SQL server has been configured to operate in "Windows Authentication Mode (Windows Authentication)" and doesn't allow
the use of SQL accounts.

Change the Authentication Mode of the SQL server from "Windows Authentication Mode (Windows Authentication)"
to "Mixed Mode (Windows Authentication and SQL Server Authentication)".

Hope this helps

sql

Friday, March 23, 2012

How could I make sure order total is at the bottom of the page?

I have to show mutiplie orders in a report. Order total of one order has to show at the bottom of the page. Now if the order has only one or two items, the order total won't go to the bottom of the page. How can I make sure this order total is at the bottom of the page just as Crystal Report do( set Group Footer at the bottom of the page).

one way you could do it, is to use a textbox, and place it at the bottom of the page then set the value of the textbox to the value of the total in the table. Once you have done that you could hide the specific textbox in the table.
The other thing you could try is setting the height of the table to be exactly the height of the page - margins.|||No. It doesn't work|||Heres how I do,..
Drag a new table onto your design surface, Delete the Header and Detail rows,...
Your left with a footer, place it at the bototm of your report, and It will persist at the bottom, hopefully. And it wont go labeling off multiple rows, it will act as your "Grand Total" area if ya like

Monday, March 12, 2012

How can we limit the data regions in a specific report page?

Hi, all experts here,

Thank you very much for your kind attention.

I wanna know how can we limit the data regions in a specific report page. How can we achieve this? Really need help.

Thanks a lot in advance for any guidance and advices for that.

With best regards,

Yours sincerely,

Hiya,

Would please any expert here give me any guidance and advices for that?

Thanks a lot.

With best regards,

Yours sincerely,

Friday, February 24, 2012

How can I use Reporting Services on ASP.NET Pages?

Hi all,

Could you tell the correct way to use Reporting Services on ASP.NET pages?

Now I wanna create an ASP.NET page to show some reports, and I hope to control all logic by program, so I need know the API between ASP.NET and Reporting Services.

For example, I wanna pass some data to Reporting Services via API, and then Reporting Services handle the data and return reports to me, and then I can show the reports on my web pages.

Please tell me how?

Hi Xinwen.

You can use the Report control and give hime the link to your report so it will show in side the control.

You don't interact with the report like you described - You can interact with the report with PARAMETERS passing through the URL.

So whan you give the report control the report url you can add to that url parameters that the report should get (like person id or project number) and also to change things in the report (like open it in diffrent ways, change the zoom, automaticlly export to pdf and so on) with the url command parameters.

for exm:
ttp://reportserver/myreportfolder/reportname.rdl?rc:format=PDF will export it to pdf.

search google about "report service url parameters"

good luck,
Roy.|||Thanks Roy!

How can I use Reporting Services on ASP.NET Pages?

Hi all,

Could you tell the correct way to use Reporting Services on ASP.NET pages?

Now I wanna create an ASP.NET page to show some reports, and I hope to control all logic by program, so I need know the API between ASP.NET and Reporting Services.

For example, I wanna pass some data to Reporting Services via API, and then Reporting Services handle the data and return reports to me, and then I can show the reports on my web pages.

Please tell me how?

Hi Xinwen.

You can use the Report control and give hime the link to your report so it will show in side the control.

You don't interact with the report like you described - You can interact with the report with PARAMETERS passing through the URL.

So whan you give the report control the report url you can add to that url parameters that the report should get (like person id or project number) and also to change things in the report (like open it in diffrent ways, change the zoom, automaticlly export to pdf and so on) with the url command parameters.

for exm:
ttp://reportserver/myreportfolder/reportname.rdl?rc:format=PDF will export it to pdf.

search google about "report service url parameters"

good luck,
Roy.
|||Thanks Roy!|||

Hi,

I tried with this but instead of prompting to save Excel File,it is displaying the report

http://localhost/Reports/Pages/Report.aspx?ItemPath=NameOfReport&rs:Command=Renderl&rs:Format=Excel

-Thanks,

Digant Desai

|||

In Visual studio 2005,there is a report veiwer contrlo to view your RDL reports.

U need to link report viewer control to corresponding report in Reporting service project.This u can do

by setting Propertis of report viewer.

You can also pass parameters form ASP page to rdl file.

using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class Default2 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
this.ReportViewer2.Visible = false;
}
protected void Button1_Click(object sender, EventArgs e)
{


this.ReportViewer2.Visible = true;
this.ReportViewer2.ServerReport.ReportServerUrl = new System.Uri("
http://localhost/ReportServer");


string strReport = "/ReportProject14/Report1";

this.ReportViewer2.ServerReport.ReportPath = strReport;

Microsoft.Reporting.WebForms.ReportParameter[] RptParameters =
new Microsoft.Reporting.WebForms.ReportParameter[3];

string strComp = this.DropDownList1.SelectedItem.Value;
RptParameters[0] =
new Microsoft.Reporting.WebForms.ReportParameter("INTCOMPANYKEY", strComp);

string strFacility = this.DropDownList3.SelectedItem.Value;
RptParameters[1] =
new Microsoft.Reporting.WebForms.ReportParameter("INTFACILITYKEY", strFacility);

string strActivity = this.DropDownList2.SelectedItem.Value;
RptParameters[2] =
new Microsoft.Reporting.WebForms.ReportParameter("Activity", strActivity);

this.ReportViewer2.ServerReport.SetParameters(RptParameters);
this.ReportViewer2.ServerReport.Refresh();
}
}