Showing posts with label mode. Show all posts
Showing posts with label mode. Show all posts

Wednesday, March 7, 2012

repair_allow_data_loss Repair statement not processed. Database needs to be in single user

I have to repair a database with repair_allow_data_loss level, so I start
SQL Server on single-user mode with the following command
sqlservr.exe -c -m
and run the repair command:
dbcc checkdb ('blade', repair_allow_data_loss)
I get the following error that doesn't make sense, since I am already in
single user mode:
Server: Msg 7919, Level 16, State 2, Line 1
Repair statement not processed. Database needs to be in single user mode.
DBCC execution completed. If DBCC printed error messages, contact your
system administrator.
Anyone can help?You don't need to start the server in single user mode for the DBCC, just
place the *database* in single-user-mode. You can do this with ALTER
DATABASE:
ALTER DATABASE MyDaabase
SET SINGLE_USER
Note that it's usually better to restore from backup than resort to DBCC
CHECKDB ... REPAIR_ALLOW_DATA_LOSS. However, the option is useful if you
have no backup.
Hope this helps.
Dan Guzman
SQL Server MVP
"savvas" <savvas@.blade.com.cy> wrote in message
news:uI0sdJFLGHA.3944@.tk2msftngp13.phx.gbl...
>I have to repair a database with repair_allow_data_loss level, so I start
> SQL Server on single-user mode with the following command
> sqlservr.exe -c -m
> and run the repair command:
> dbcc checkdb ('blade', repair_allow_data_loss)
> I get the following error that doesn't make sense, since I am already in
> single user mode:
> Server: Msg 7919, Level 16, State 2, Line 1
> Repair statement not processed. Database needs to be in single user mode.
> DBCC execution completed. If DBCC printed error messages, contact your
> system administrator.
>
> Anyone can help?
>

repair_allow_data_loss Repair statement not processed. Database needs to be in single

I have to repair a database with repair_allow_data_loss level, so I start
SQL Server on single-user mode with the following command
sqlservr.exe -c -m
and run the repair command:
dbcc checkdb ('blade', repair_allow_data_loss)
I get the following error that doesn't make sense, since I am already in
single user mode:
Server: Msg 7919, Level 16, State 2, Line 1
Repair statement not processed. Database needs to be in single user mode.
DBCC execution completed. If DBCC printed error messages, contact your
system administrator.
Anyone can help?You don't need to start the server in single user mode for the DBCC, just
place the *database* in single-user-mode. You can do this with ALTER
DATABASE:
ALTER DATABASE MyDaabase
SET SINGLE_USER
Note that it's usually better to restore from backup than resort to DBCC
CHECKDB ... REPAIR_ALLOW_DATA_LOSS. However, the option is useful if you
have no backup.
Hope this helps.
Dan Guzman
SQL Server MVP
"savvas" <savvas@.blade.com.cy> wrote in message
news:uI0sdJFLGHA.3944@.tk2msftngp13.phx.gbl...
>I have to repair a database with repair_allow_data_loss level, so I start
> SQL Server on single-user mode with the following command
> sqlservr.exe -c -m
> and run the repair command:
> dbcc checkdb ('blade', repair_allow_data_loss)
> I get the following error that doesn't make sense, since I am already in
> single user mode:
> Server: Msg 7919, Level 16, State 2, Line 1
> Repair statement not processed. Database needs to be in single user mode.
> DBCC execution completed. If DBCC printed error messages, contact your
> system administrator.
>
> Anyone can help?
>

Monday, February 20, 2012

Rendering: PDF and Landscape

I have a (very simple) report where I specifiy 11 X 8.5 as the paper size.
The report renders in HTML correctly in Landscape mode. When I select PDF
and Export the report is reformated and rendered as 8.5 X 11 (portait mode).
How can I fix this?
thanks
dlr"blackshirt" <blackshirt@.discussions.microsoft.com> wrote in message news:<A9031067-D190-44C0-98A6-C0155B65ACE9@.microsoft.com>...
> Dennis,
> Did you ever find the answer. I'm having the same issu.
> Thanks
> "Dennis Redfield" wrote:
> > I have a (very simple) report where I specifiy 11 X 8.5 as the paper size.
> > The report renders in HTML correctly in Landscape mode. When I select PDF
> > and Export the report is reformated and rendered as 8.5 X 11 (portait mode).
> > How can I fix this?
> >
> > thanks
> >
> > dlr
> >
> >
> >
try this:
from the main menu,
1. go to Report->Report Properties...
2. on the 'Report Properties' window go to the 'Layout' tab
3. then proceed to the Page width and Page Height controls. they have
default values of 8.5 for the width and 11 for the height.
4. Reverse the values for the width to be 11in and the height to be
8.5in
try it and let me know how it goes.
Good luck!|||I was going from a published report and switching from portrait to landscape
mode and the report was snap shot cached. In the end I deleted the report
(using RM) and re-deployed the report (from VS). after that I was fine.
dlr
"A Gutie" <fiututor@.yahoo.com> wrote in message
news:eca873f7.0409160622.58362840@.posting.google.com...
> "blackshirt" <blackshirt@.discussions.microsoft.com> wrote in message
news:<A9031067-D190-44C0-98A6-C0155B65ACE9@.microsoft.com>...
> > Dennis,
> > Did you ever find the answer. I'm having the same issu.
> >
> > Thanks
> >
> > "Dennis Redfield" wrote:
> >
> > > I have a (very simple) report where I specifiy 11 X 8.5 as the paper
size.
> > > The report renders in HTML correctly in Landscape mode. When I select
PDF
> > > and Export the report is reformated and rendered as 8.5 X 11 (portait
mode).
> > > How can I fix this?
> > >
> > > thanks
> > >
> > > dlr
> > >
> > >
> > >
> try this:
> from the main menu,
> 1. go to Report->Report Properties...
> 2. on the 'Report Properties' window go to the 'Layout' tab
> 3. then proceed to the Page width and Page Height controls. they have
> default values of 8.5 for the width and 11 for the height.
> 4. Reverse the values for the width to be 11in and the height to be
> 8.5in
> try it and let me know how it goes.
> Good luck!

Rendering true Excel

My users are complaining that the Excel files they are getting back from
the web application's rendering of reports in Excel mode are not true
Excel, but rather still retain HTML. Has anyone else experienced this?
I have included my rendering code snippet below:
--
try
{
data = render.RunReport(ConfigurationSettings.AppSettings[ePledgeConstants.REPORT_SERVER_URL_PROPERTY],
fullReportName, reportParameters, format, out
encoding,
out mimeType, out parametersUsed, out warnings,
out streamIds);
Response.Clear();
Response.ContentType = mimeType;
string fileName = report.Name +
GetFileExtension(mimeType);
if (mimeType != "text/html")
{
Response.AddHeader("Content-Disposition",
"attachment; filename=" + fileName);
}
switch(encoding)
{
case "Unicode (UTF-8)":
Response.ContentEncoding = new UTF8Encoding();
break;
case "Unicode (UTF-7)":
Response.ContentEncoding = new UTF7Encoding();
break;
default:
Response.ContentEncoding = new UTF8Encoding();
break;
}
Response.BinaryWrite(data);
}
catch (Exception exception)
{
Console.Out.Write(exception.ToString());
}
---
The run report method in turn is like this:
---
public byte[] RunReport(string ServerUrl, string ReportName,
ParameterValue[] parameters, string Format, out string encoding, out
string mimeType, out ParameterValue[] parametersUsed, out Warning[]
warnings, out string[] streamIds)
{
ReportingService rs = new ReportingService();
rs.Timeout = -1;
rs.Url = ServerUrl;
rs.Credentials = new NetworkCredential(UserName, Password);
return rs.Render(ReportName, Format, null, null, parameters, null,
null, out encoding, out mimeType, out parametersUsed, out warnings,
out streamIds);
}Have you deployed Reporting Services SP1. In SP1, we output native XLS.
-Lukasz
This posting is provided "AS IS" with no warranties, and confers no rights.
"Bryon" <blape@.whittmanhart.com> wrote in message
news:OVl$MrGGFHA.2932@.TK2MSFTNGP15.phx.gbl...
> My users are complaining that the Excel files they are getting back from
> the web application's rendering of reports in Excel mode are not true
> Excel, but rather still retain HTML. Has anyone else experienced this? I
> have included my rendering code snippet below:
> --
> try
> {
> data => render.RunReport(ConfigurationSettings.AppSettings[ePledgeConstants.REPORT_SERVER_URL_PROPERTY],
> fullReportName, reportParameters, format, out
> encoding,
> out mimeType, out parametersUsed, out warnings, out
> streamIds);
> Response.Clear();
> Response.ContentType = mimeType;
> string fileName = report.Name +
> GetFileExtension(mimeType);
> if (mimeType != "text/html")
> {
> Response.AddHeader("Content-Disposition",
> "attachment; filename=" + fileName);
> }
> switch(encoding)
> {
> case "Unicode (UTF-8)":
> Response.ContentEncoding = new UTF8Encoding();
> break;
> case "Unicode (UTF-7)":
> Response.ContentEncoding = new UTF7Encoding();
> break;
> default:
> Response.ContentEncoding = new UTF8Encoding();
> break;
> }
> Response.BinaryWrite(data);
> }
> catch (Exception exception)
> {
> Console.Out.Write(exception.ToString());
> }
> ---
> The run report method in turn is like this:
> ---
> public byte[] RunReport(string ServerUrl, string ReportName,
> ParameterValue[] parameters, string Format, out string encoding, out
> string mimeType, out ParameterValue[] parametersUsed, out Warning[]
> warnings, out string[] streamIds)
> {
> ReportingService rs = new ReportingService();
> rs.Timeout = -1;
> rs.Url = ServerUrl;
> rs.Credentials = new NetworkCredential(UserName, Password);
> return rs.Render(ReportName, Format, null, null, parameters, null,
> null, out encoding, out mimeType, out parametersUsed, out warnings, out
> streamIds);
> }|||Lukasz Pawlowski [MSFT] wrote:
> Have you deployed Reporting Services SP1. In SP1, we output native XLS.
> -Lukasz
>
Yes I have.
An interesting side note to this problem is that on a Mac, it only sees
the HTML, never the Excel information. In Windows, the file looks like
Excel, but does not save as Excel.
Also, is there a way to display gridlines? The Excel comes back as
Excel for the web and does not have gridlines by default.|||Grid lines are based on how you designed your report. If you created for
example a table with inner boarders, you should see grid lines.
Are you supplying any device info parameters to your excel rendering?
-Lukasz
This posting is provided "AS IS" with no warranties, and confers no rights.
"Bryon" <blape@.whittmanhart.com> wrote in message
news:%23ynRKTHGFHA.128@.TK2MSFTNGP14.phx.gbl...
> Lukasz Pawlowski [MSFT] wrote:
>> Have you deployed Reporting Services SP1. In SP1, we output native XLS.
>> -Lukasz
>>
> Yes I have.
> An interesting side note to this problem is that on a Mac, it only sees
> the HTML, never the Excel information. In Windows, the file looks like
> Excel, but does not save as Excel.
> Also, is there a way to display gridlines? The Excel comes back as Excel
> for the web and does not have gridlines by default.|||Lukasz Pawlowski [MSFT] wrote:
> Grid lines are based on how you designed your report. If you created for
> example a table with inner boarders, you should see grid lines.
> Are you supplying any device info parameters to your excel rendering?
> -Lukasz
>
I'm not sure what you mean by device parameters.