Re: Roundhouse with Oracle - removing User ID / Password for admin_connection_string

162 views
Skip to first unread message

Rob Reynolds

unread,
Jul 1, 2012, 9:52:58 AM7/1/12
to chucknorri...@googlegroups.com
Admin connection gives you the ability to create a database (schema) that doesn't yet exist. It is also there for some administration tasks. Your first connection string is to the subject you want changes to happen to, the admin connection string allows those changes to occur.

Have you tried passing   --connstringadmin  to RH? 
____
Rob
"Be passionate in all you do"

http://devlicio.us/blogs/rob_reynolds
http://ferventcoder.com
http://twitter.com/ferventcoder


On Thu, Jun 28, 2012 at 2:54 PM, Justin Kohlhepp <jkoh...@gmail.com> wrote:
Hello,

I'm trying to get Roundhouse working against Oracle Express Edition running on my local machine.  I have a couple sample SQL scripts and I'm trying to execute RH like this:

--dbt=oracle --db=MY_DATABASE --vf=sql -o=.\_rh_log\ --connstring="Data Source=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521)));User Id=system;Password=MY_PASSWORD;"

This connection string works fine in a test .NET app I have that uses System.Data.OracleClient to connect to Oracle XE.  However, when I execute RH, it crashes with invalid username / password.  I couldn't figure it out so I grabbed the RH source, and it turns out that the User ID and Password fields from the connection string are getting removed when setting the admin_connection_string.  It happens in this code from OracleDatabase.initialize_connections:

            if (string.IsNullOrEmpty(admin_connection_string))
            {
                admin_connection_string = Regex.Replace(connection_string, "Integrated Security=.*?;", "Integrated Security=yes;");
                admin_connection_string = Regex.Replace(admin_connection_string, "User Id=.*?;", string.Empty);
                admin_connection_string = Regex.Replace(admin_connection_string, "Password=.*?;", string.Empty);
            }

What is the purpose of this code?  Why does it remove those properties?  Why is admin_connection_string being used instead of the "normal" connection string that I set on the command line?  What is the intent behind having a separate "admin" connection string?

Thanks,

~ Justin Kohlhepp

--
You received this message because you are subscribed to the Google Groups "chucknorris" group.
To view this discussion on the web visit https://groups.google.com/d/msg/chucknorrisframework/-/D8TRM_n4IZEJ.
To post to this group, send email to chucknorri...@googlegroups.com.
To unsubscribe from this group, send email to chucknorrisframe...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/chucknorrisframework?hl=en.

Justin Kohlhepp

unread,
Jul 2, 2012, 2:13:54 PM7/2/12
to chucknorri...@googlegroups.com
Thanks Rob.  I'm sure I can use that command line setting to bypass.  I'm curious what the *purpose* of that code is, though.  I want to make sure it won't bite me later if I pass in the same connection string for admin.  From what I understand, the Oracle support does not include the creation of databases, so I'm not sure what else this connection string will get used for in the case of Oracle.
 
~ Justin
To post to this group, send email to chucknorrisframework@googlegroups.com.
To unsubscribe from this group, send email to chucknorrisframework+unsub...@googlegroups.com.

Rob Reynolds

unread,
Jul 2, 2012, 3:27:04 PM7/2/12
to chucknorri...@googlegroups.com
I'm sure there was a reason at the time for doing it...unfortunately I think we all suffer from coder's Alzheimer's after more than a few months.

I know it is used with the alter database folder, but I am unsure how often that is used with Oracle.
To view this discussion on the web visit https://groups.google.com/d/msg/chucknorrisframework/-/YuiXktssaT8J.

To post to this group, send email to chucknorri...@googlegroups.com.
To unsubscribe from this group, send email to chucknorrisframe...@googlegroups.com.

Chris Fischer

unread,
Apr 2, 2015, 5:23:40 PM4/2/15
to chucknorri...@googlegroups.com
It looks like the purpose is to invoke an "EXTERNALLY IDENTIFIED" Oracle user as if you had done: "SQLPLUS / AS SYSDBA".  This would be appropriate for Windows users connecting to a Windows-based Oracle instance with Windows integrated security enabled and the windows user is in the ORA_DBA group.  For all other cases, this probably wouldn't work.
To post to this group, send email to chucknorri...@googlegroups.com.
To unsubscribe from this group, send email to chucknorrisframework+unsubscrib...@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/chucknorrisframework?hl=en.

--
You received this message because you are subscribed to the Google Groups "chucknorris" group.
Reply all
Reply to author
Forward
0 new messages