| Author |
Message |
christiang
Joined: 03 Feb 2009 Posts: 3
|
Posted: Tue Feb 03, 2009 7:46 pm Post subject: SET ARITHABORT ON at the datbase level |
|
|
I was wondering how I would set ARITHABORT on at the database level. Normal I would use the following script:
ALTER DATABASE [database_name] SET ARITHABORT ON;
Since I don't know the name of the datbase ahead of time when using the packager how can I do this? |
|
| Back to top |
|
 |
Chris Auckland
Joined: 24 Oct 2006 Posts: 715 Location: Red Gate Software Ltd.
|
Posted: Fri Feb 06, 2009 4:53 pm Post subject: |
|
|
Thanks for your post.
The schema script in the package will set the database options. It will use the same options set in the database you package. e.g.
SET ANSI_PADDING, ANSI_WARNINGS, CONCAT_NULL_YIELDS_NULL, ARITHABORT, QUOTED_IDENTIFIER, ANSI_NULLS ON
GO
However, if you don't see the options you want you can add them to the script. You can set options OFF in the same manner.
You don't need to set the database name as the script will already be running in the context of the new/updated database.
I hope this is helpful. _________________ Chris |
|
| Back to top |
|
 |
Chris Auckland
Joined: 24 Oct 2006 Posts: 715 Location: Red Gate Software Ltd.
|
Posted: Thu Feb 12, 2009 10:23 am Post subject: |
|
|
I'm just updating this post as the customer correctly pointed out that my original response would only set the option for that particular session.
If you want to set the option for the new database during install, then you can set ARITHABORT as one of the new database options. I believe the only way to do this will be to edit the PackageProperties resource file and add the extra option.
To do this, export the package as a C# project. Open the project in Visual Studio and edit PackageProperties.resx. You can then add the extra option in PACKAGE_NEW_DBOPTIONS. e.g.
PACKAGE_NEW_DBOPTIONS torn page detection;auto create statistics;auto update statistics;ARITHABORT;
When you build the project, the new databases will be created with ARITHABORT ON. _________________ Chris |
|
| Back to top |
|
 |
|
|
All times are GMT + 1 Hour
|
| Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group