Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 191123
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T16:18:52+00:00 2026-05-11T16:18:52+00:00

Probably I’m doing something wrong but here it goes: I’m trying to create a

  • 0

Probably I’m doing something wrong but here it goes:

I’m trying to create a database using subsonic.migrations in an OracleXE version 10.2.0.1.0. I have ODP v 10.2.0.2.20 installed.

This is my app.config:

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <configSections>
    <section name="SubSonicService" type="SubSonic.SubSonicSection, SubSonic" requirePermission="false"/>
  </configSections>

  <connectionStrings>
    <add name="test" connectionString="Data Source=XE; User Id=test; Password=test;"/>
  </connectionStrings>

  <SubSonicService defaultProvider="test">
    <providers>
      <clear/>
      <add name="test" type="SubSonic.OracleDataProvider, SubSonic" connectionStringName="test" generatedNamespace="testdb"/>
    </providers>
  </SubSonicService>

</configuration>

And that’s my first migration:

public class Migration001_Init : Migration {

        public override void Up() {

            //Create the records table
            TableSchema.Table records = CreateTable("asdf");
            records.AddColumn("RecordName");
       }

        public override void Down() {
            DropTable("asdf");
        }
    }

When I run the sonic.exe, I get this exception:

Setting ConfigPath: 'App.config'
Building configuration from D:\Users\carlucci\Documents\Visual Studio 2008\Projects\Wum\Wum.Migration\App.config
Adding connection to test
ERROR: Trying to execute migrate
Error Message: System.Data.OracleClient.OracleException: ORA-02253: especifica‡Æo de restri‡Æo nÆo permitida aqui

   at System.Data.OracleClient.OracleConnection.CheckError(OciErrorHandle errorHandle, Int32 rc)
   at System.Data.OracleClient.OracleCommand.Execute(OciStatementHandle statementHandle, CommandBehavior behavior, Boolean needRowid, OciRowidDescriptor& rowidDescriptor, ArrayList& resultParameterOrdinals)
   at System.Data.OracleClient.OracleCommand.ExecuteNonQueryInternal(Boolean needRowid, OciRowidDescriptor& rowidDescriptor)
   at System.Data.OracleClient.OracleCommand.ExecuteNonQuery()
   at SubSonic.OracleDataProvider.ExecuteQuery(QueryCommand qry) in D:\@SubSonic\SubSonic\SubSonic\DataProviders\OracleDataProvider.cs:line 350
   at SubSonic.DataService.ExecuteQuery(QueryCommand cmd) in D:\@SubSonic\SubSonic\SubSonic\DataProviders\DataService.cs:line 544
   at SubSonic.Migrations.Migrator.CreateSchemaInfo(String providerName) in D:\@SubSonic\SubSonic\SubSonic.Migrations\Migrator.cs:line 249
   at SubSonic.Migrations.Migrator.GetCurrentVersion(String providerName) in D:\@SubSonic\SubSonic\SubSonic.Migrations\Migrator.cs:line 232
   at SubSonic.Migrations.Migrator.Migrate(String providerName, String migrationDirectory, Nullable`1 toVersion) in D:\@SubSonic\SubSonic\SubSonic.Migrations\Migrator.cs:line 50
   at SubSonic.SubCommander.Program.Migrate() in D:\@SubSonic\SubSonic\SubCommander\Program.cs:line 264
   at SubSonic.SubCommander.Program.Main(String[] args) in D:\@SubSonic\SubSonic\SubCommander\Program.cs:line 90
Execution Time: 379ms

What am I doing wrong?

Thanks a lot for any help 🙂

Andre Carlucci

UPDATE:
As pointed by Anton, the problem is the subsonic OracleSqlGenerator. It is trying to create the schema table using this sql:

CREATE TABLE SubSonicSchemaInfo (
       version int NOT NULL CONSTRAINT DF_SubSonicSchemaInfo_version DEFAULT (0)
)

Which doesn’t work on oracle. The correct sql would be:

CREATE TABLE SubSonicSchemaInfo (
  version int DEFAULT (0),
  constraint DF_SubSonicSchemaInfo_version primary key (version)
)

The funny thing is that since this is the very first sql executed by subsonic migrations, NOBODY EVER TESTED it on oracle.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-11T16:18:52+00:00Added an answer on May 11, 2026 at 4:18 pm

    Just a wild guess (I’m not exactly aware about precise CREATE TABLE syntax for Oracle): SubSonic attempts to create a “Schema Info” table (see this, search for private static void CreateSchemaInfo(string providerName)) with “0” being the default value. Internally it uses OracleGenerator which is basically an ANSIGenerator, so this might be the problem.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 124k
  • Answers 124k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Are you running on OS 3.0? I saw the same… May 12, 2026 at 1:19 am
  • Editorial Team
    Editorial Team added an answer It looks like you need to register Apache::Session::Memcached with Apache::Session::Wrapper,… May 12, 2026 at 1:19 am
  • Editorial Team
    Editorial Team added an answer Use DATENAME or DATEPART: SELECT DATENAME(dw,GETDATE()) -- Friday SELECT DATEPART(dw,GETDATE())… May 12, 2026 at 1:19 am

Related Questions

Probably I'm doing something wrong but here it goes: I'm trying to create a
Most probably I'm missing something obvious here, but why do I need to call
I have few asynchronous tasks running and I need to wait until at least
I'm writing a small Grails app, and I keep on getting StaleObjectStateException:s for about
Can I change the behaviour of a stub during runtime? Something like: public interface

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.