If you have been using SQL reporting services, you may have encountered few errors which just become difficult to resolve. In such cases, its advisable to enable the remote errors on your reporing services which helps you to understand the inner exceptions.
The remote errors can be enabled on the reporting services in two ways:
1. Using the SQL Server Management Studio
Start Management Studio and connect to a report server instance.
Right-click the report server node, and select Properties.
Click Advanced to open the properties page.
In EnableRemoteErrors, select True.
Click OK.
2. Using a script to enable remote errors:
a. Create a text file and copy the following script into the file.
Public Sub Main()
Dim P As New [Property]()
P.Name = "EnableRemoteErrors"
P.Value = True
Dim Properties(0) As [Property]
Properties(0) = P
Try
rs.SetSystemProperties(Properties)
Console.WriteLine("Remote errors enabled.")
Catch SE As SoapException
Console.WriteLine(SE.Detail.OuterXml)
End Try
End Sub
b. Save the file as .rss in your local folder.
c. Open a command prompt window
d. Either Navigate to the directory that contains the .rss file you just created or use the absolute file location on the command prompt. Type the following command line, replacing servername with the actual name of your server:
rs -i EnableRemoteErrors.rss -s http://servername/ReportServer
3. Enabling the remote errors by updating the database.
a. Update ReportServer database Configuration table for EnableRemoteErrors
Update the ConfigurationInfo table in the ReportServer database for configuration record named "EnableRemoteErrors". The default value for EnableRemoteErrors property in the ConfigurationInfo database table is "False". Update the value to true by running a simple update statement.
You may not be successful to see the changes made on the ConfigurationInfo table on the Reporting Services application, if the application is being used intensely.
If everything goes fine, you should see a message "remote error enabled."
Note: Do ensure that your server is accessible from the location / machine you run the script from. If you have direct access to the server, run the script on the server.
Enabling the remote errors should give you detailed information on all the issues you encounter on your reporting services.
Showing posts with label Sql Server. Show all posts
Showing posts with label Sql Server. Show all posts
Wednesday, October 7, 2009
Monday, April 13, 2009
How to get the server's timezone
The problem
How to get the server's timezone display name correctly and display it to the user in his locale.
server's default timezone
Firstly, you need to get the server's default timezone. This is easily achieved by the following call
final TimeZone timeZone = TimeZone.getDefault();
use daylight time?
Secondly, you need to find out if this timezone uses daylight time. This is important as some timezones change their names during daylight saving. Don't use the TimeZone.useDaylightTime() method
//final boolean daylight = timeZone.useDaylightTime();
This method works fine only for systems where the timezone never changes. If the administrator changes the time on the server, this change won't be reflected in subsequent calls. What you need to do instead, is to find out is the daylight savings is on right now.
final boolean daylight = timeZone.inDaylightTime(new Date());
user's locale
The last important step is to get the right locale, the locale you want this timezone name to display in. You could call Locale.getDefault(), but this returns server's default locale. You want the locale that the user is using. In a web application, the user's locale can be obtained from getLocale() method of ServletRequest object.
final Locale locale = servletRequest.getLocale();
final step - timezone display name
Now we can call getDisplayName method with all required parameters.
return timeZone.getDisplayName(daylight, TimeZone.LONG, locale);
Solution
To put this all together, the final solution may look like this method
private String getServerTimeZoneDisplayName(){ final TimeZone timeZone = TimeZone.getDefault(); final boolean daylight = timeZone.inDaylightTime(new Date()); final Locale locale = servletRequest.getLocale(); return timeZone.getDisplayName(daylight, TimeZone.LONG, locale);}
References
Java TimeZone class
JEE ServletRequest class
JRA-15488 - Shows incorrect time (zone) when subscribing to filter
How to get the server's timezone display name correctly and display it to the user in his locale.
server's default timezone
Firstly, you need to get the server's default timezone. This is easily achieved by the following call
final TimeZone timeZone = TimeZone.getDefault();
use daylight time?
Secondly, you need to find out if this timezone uses daylight time. This is important as some timezones change their names during daylight saving. Don't use the TimeZone.useDaylightTime() method
//final boolean daylight = timeZone.useDaylightTime();
This method works fine only for systems where the timezone never changes. If the administrator changes the time on the server, this change won't be reflected in subsequent calls. What you need to do instead, is to find out is the daylight savings is on right now.
final boolean daylight = timeZone.inDaylightTime(new Date());
user's locale
The last important step is to get the right locale, the locale you want this timezone name to display in. You could call Locale.getDefault(), but this returns server's default locale. You want the locale that the user is using. In a web application, the user's locale can be obtained from getLocale() method of ServletRequest object.
final Locale locale = servletRequest.getLocale();
final step - timezone display name
Now we can call getDisplayName method with all required parameters.
return timeZone.getDisplayName(daylight, TimeZone.LONG, locale);
Solution
To put this all together, the final solution may look like this method
private String getServerTimeZoneDisplayName(){ final TimeZone timeZone = TimeZone.getDefault(); final boolean daylight = timeZone.inDaylightTime(new Date()); final Locale locale = servletRequest.getLocale(); return timeZone.getDisplayName(daylight, TimeZone.LONG, locale);}
References
Java TimeZone class
JEE ServletRequest class
JRA-15488 - Shows incorrect time (zone) when subscribing to filter
Tuesday, October 14, 2008
difference b/w EJB2.1 and EJB3.0
EJB3.0
Finally, concluding this topic I think the main difference is that EJB 3.0 is moved towards annotations based programming model and dependency injection to make our life easy .
For more information please visit http://javaknowledgestorm.blogspot.com/2009/04/differences-between-ejb20-and-ejb30.html
- No need of Home Interface (EJBHome),but it is needed in EJB2.0
- No more confusions to make an EJB remote or local,it's the client which would decide and cast to appropriate.
- Just write SINGLE simple Java class and annotate it to be Stateless/Stateful/Entity/MessageDriven.Container
- No Deployment Descriptors , MetaData Annotations are explored which is introduced in J2SE5.0
- Forget all EJB life cycles.For example Entity bean life cycle in 3.0 is new,managed,detached,removed.
- Ejb 3.0 siplifies the developement of the application
Ready to develop complex query,inner/outer join with EJB3.0.
The main difference lies in the persistence In case of EJB 3.0 there is JPA Java persistence API which makes the mapping of EntityBeans with the database easy with the help of a service called as EntityManager.
Mapping is done with the help of annotations unlike in EJB2.0.
Home interfaces are eliminated.
Deployment descriptors are an option in EJB 3.0.
EJB3.0 also supports webservice client through SOAP and WSDl.
Finally, concluding this topic I think the main difference is that EJB 3.0 is moved towards annotations based programming model and dependency injection to make our life easy .
For more information please visit http://javaknowledgestorm.blogspot.com/2009/04/differences-between-ejb20-and-ejb30.html
Display all tables in sql server
Hi,
We used the show tables command in mysql. But, here in Sql Server to display all tables we need to write select * from information_schema.tables command in order to display all tables.
Cheers!!!
Ujjwal B Soni
We used the show tables command in mysql. But, here in Sql Server to display all tables we need to write select * from information_schema.tables command in order to display all tables.
Cheers!!!
Ujjwal B Soni
Subscribe to:
Posts (Atom)