When the query or stored procedure is run form SSRS, the ANSI warnings are setting to OFF - the connection takes defaults values from Server properties.
Is there any way to determinate the ANSI warnings ON for current user (not for entire server) who is define in connections ?
SQL Server 2012
Related
Not getting "IF Not EXIST" option is not getting in sql server while generating script file. This option was present in sql server 2008 but not showing in 2012
While generating script file in SQL Server 2012 we can’t see the “IF NOT EXIST’ option , which was present in SQL Server 2008 to check the existence of the object. This feature is also present in 2012 but we have make true the option “Check for object existence” to get the same output as SQL Server 2008.
I got some crystal reports, these are developed by someone but now I am migrating to SSRS. So when i go to 'show SQL query' from crystal reports it is showing some query but i can't understand properly where these columns coming from. Is there anyway to know exact SQL query so that i can use it in sql server to generate data sets for SSRS.
thanks
You can run Sql Profiler against your database server to see the exact Sql that Crystal Reports is running to generate the report.
Sql Profiler is a tool that comes with Sql Server (under Performance Tools in your Sql Server programs) that shows every Sql statement hitting the database. Run a trace on your Sql Server through Sql Profiler then run your report and Sql Profiler will show you the exact Sql statements that your Crystal report is running against the database.
One option would be split the query manully and see the select and where clause using or if you have access to database run the query over the database to check what all columns it is returning
Is there a way (a tool) to check that a SQL Server 2008 script will run on SQL Server 2005?
Open up SQL Management studio, rt mouse click on the database name, select properties, select option, set compatability level. Test. A far as is known, when the compatabailty level is set to a (lower) level, functionality is disabled and errors raised entirely in line with the selected level. MS are a bit relctant to comit http://msdn.microsoft.com/en-gb/library/bb510680.aspx but in practice I've not found any issues. You can of course install an instance of the 2005 build and bulk insert for a really thorough check.
You can use SQL Fiddle for SQL Server 2008
At the left top you can select the RDMS
My personal computer is running Windows 7 (language turkish) and I installed SQL Server 2008. When I create a new database, the database language is Turkish_CI_AS
And I have a server with Windows Server 2003 (language english) and installed SQL Server 2008 on that server. I set the Regional and Language Options as Turkish. I am creating a database and selecting collation Turkish_CI_AS
But when I insert a row into a table on the server, an error occurrs:
The date format is invalid
You should always use unambigious formats like YYYYMMDD or YYYYMMDD HH:MM:SS so that no matter what setting the server/database is it will be added correctly. Read this for a better understanding http://beyondrelational.com/modules/2/blogs/70/posts/10898/understanding-datetime-column-part-ii.aspx
Between SQL 2000 and 2005 MS changed the syntax to connect to a local database from (local) to .\instanceName.
I have a client who has been using (local)\instanceName to connect to local SQL Server 2005 databases. Usually it works fine, but sometimes it doesn't and he has been using PCname\instanceName.
Why does this sometimes fail?
You can define alias for your instance in sql server configuration manager. You can define multiple aliases for same instace, so both (loacl) and instanceName will work.