Asp.Net membership errors - asp.net-membership

I have 2 databases that a mirrors of eachother schmatically. The data is the only thing that is different. When I try to log into the second database I keep getting this error -
The
System.web.security.sqlmembershipprovider
requires a database schema compatible
with schma version '1' However the
current database schema is not
compativle with this version. You may
need to wither install a compatible
schema with aspnet_regsql.exe or
upgrade the provider to a newer
version
When I check the dbo.aspnet_SchemaVersions I see the following:
common 1 True
health monitoring 1 True
membership 1 True
personalization 1 True
profile 1 True
role manager 1 True
What is the issue?

Ensure that both applications are using the same version of ASP.NET and the Membership provider.

Related

SAP Hybris Connection with Oracle DB

What all i need to change in the DB properties here?
#db.url=jdbc:oracle:thin:#<host>:1522:<sid>
#db.driver=oracle.jdbc.driver.OracleDriver
#db.username=<system>
#db.password=<password>
#db.tableprefix=
I am using Hybris 6.2 and wanted to connect it to Oracle 11g. I have downloaded Oracle11g,SqlDeveloper and made a connection between them. I've copied the Oracle Db server properties into the local.properties file of the Config folder in Hybris.
However i'm not able to understand the steps after that (what all info i need to put in connection properties above, do i have to intialize and upadate again?).
Avoid nasty OCI driver configuration.
Because geffchang's answer only shows the configuration with the OCI driver I'm showing here the most simple configuration with the thin client.
Reference is https://help.sap.com/viewer/a74589c3a81a4a95bf51d87258c0ab15/1905/en-US/551f907063044685a309a8b22f5779c3.html
You already wrote how db.url looks like with thin client by specifying host, port and sid. Here are some examples: jdbc:oracle:thin:#192.168.1.1:1521:orcl jdbc:oracle:thin:#//ora01-ic.mydomain.net:1532/hybris jdbc:oracle:thin:#//ora901scan.de.mydomain.net:1523/shop
db.driver=oracle.jdbc.driver.OracleDriver
username and password should be self explanatory.
Avoid tableprefix. You only need it if you want to have multiple hybris instances within a single DB. But if you need multiple instances you could alternatively also create a second DB in the Oracle DBMS (see difference between DB and DBMS!) and use an additional SID like e.g. hybris2.
That's all: host/ip, port, SID, username and password. Three configuration lines depending on your local environment and one static db.driver setting.
OCI vs. Thin driver
I mostly use the Thin driver. The way the hybris documentation explains the usage of the OCI driver is somewhat nasty (to avoid the term "insecure") by using LD_LIBRARY_PATH instead of using ld.conf.
Using the Thin driver is platform-independent and most easy to configure. Using OCI is the opposite and depends on the OS. OCI with LD_LIBRARY_PATH is targeted towards Linux.
Reference OCI: https://docs.oracle.com/en/database/oracle/oracle-database/12.2/jjdbc/JDBC-OCI-features.html#GUID-A8201BD0-BAED-4C54-B53B-C26C5F295B32
Reference Thin client: https://docs.oracle.com/cd/B28359_01/java.111/b31224/jdbcthin.htm
The JDBC driver
It must be put into bin/platform/lib/dbdriver. Current version at time of this writing is ojdbc8-12.2.0.1.0.jar. Here's a list with other versions and timestamps matching their release dates:
$ ls -lnG ojdbc*jar
-rw-r--r-- 1 501 2739670 Jul 28 2014 ojdbc6-11.2.0.4.jar
-rw-r--r-- 1 501 3397734 Jun 25 2013 ojdbc7-12.1.0.1.jar
-rw-r--r-- 1 501 3698857 Apr 11 2016 ojdbc7-12.1.0.2.jar
-rw-r--r-- 1 501 4036257 Mar 1 2017 ojdbc8-12.2.0.1.0.jar
Other settings
db.pool: The values in geffchang's answer are the default values already set in advanced.properties. You don't need to specify them a second time.
oracle.statementcachesize: In Hybris docs referenced above it is mentioned "Do not set any other value than 0". In fact you don't need to set it at all.
tenant.restart.on.connection.error: Usually you don't need to set it. Keeping it on true (default in advanced.properties) MAY cause your DB to be locked at Hybris startup with wrong password because Hybris will try to connect to DB several times and some Oracle DB admins activate an user lock on e.g. 3rd failed login. In this case ask the Oracle admin to provide the correct password and to unlock the account.

Grails 3.2.9 with Oracle 12c Identity Column issues with groovy.Sql.executeInsert's with no id specified

Has anyone successfully migrated an app from Grails 2 to Grails 3 where backend is Oracle and you dropped to groovy.Sql to do inserts for performance reasons.
I have the Grails 2 (hibernate 4) app live against Oracle 12c where I use id mapping generator ‘sequence’ and pre-insert Oracle Trigger.
I’ve tried the same approach on Grails 3 (hibernate 5) and I get errors like “Found 1 parameter placeholders but supplied with 0 parameters” (always off-by 1), when using executeINSERT() without the id field specified (which is the way it used to work in grails 2).
The CRUD works ok, however.
I have tried generator ‘sequence-identity’ but this doesn’t change the table create id to NUMBER GENERATED ALWAYS AS IDENTITY instead of NOT NULL, which is what I was expecting it to do (though the grails docs don't say this explicitly). Oracle doc link
I’ve tried dropping back to hibernate 4 but still have the problem.
Any thoughts, please before I officially go mad?

Oracle Repository creation utility Unable to connect to oracle 11g Enterprise Edition database DB ORA-01882: timezone region

it happened on Oracle fussion middleware error.
Unable to connect to the DB. Check if DB connection details entered are correct.
ORA-00604: error occurred at recursive SQL level 1
ORA-01882: timezone region not found
To be very honest, i i've searched thouroughly.
i found out that it had something to do with the jdk in my oracle 11g ee edition so i tried running timezone updater on the jdk, but the timezone was unable to update.. it returned an error saying 'cant rename {0} to {1}'.
am not even sure am on the right path... please can someone out there give me a hand.
the timezone error was coming up as a result of the character set i selected for my database. it was suppose to be utf8 however, i choose some other one. i had to uninstall my database, and recreated a new one using "utf8" character set, which happens to be a general standard. :)
Installation of FMW falls into two categories: Developer and Production. Developer uses soa_quickstart + WCC + WCP + MFT etc. WLS and all needed files are installed in this installation and then there are 3 different domains that can be used/configured - local to JDev, standalone (file based no DB or RCU required) and Compact (db required + RCU). Production requires WLS + infrastructure + binaries (SOA/OSB/BPM, MFT, WCC, WCP). These are all separate installs and require DB and RCU as well. So, the question is: what are you installing and why? If you are installing for a production env you should follow the oracle install instructions and EDG closely. If you are installing a dev env, then it is very fast and easy - a standalone env is a great choice. While there are some capabilities not available in a Standalone/File- based install, it is still the preferred choice for SOA/OSB/BPM developers. If you simply want a FMW install to play with or use as a developer, you can download and install a free VirtualBox image that comes fully configure and ready to use. You should also consult the system compatibility guide as well, just to be sure.

TNS,can not handle the service name when two different version installed together

In our server,we publish a asp.net application,which use the oracle11g as the database.
We just set the connection string in the web.config,it works.
However someone install the oracle8 in the same server since they need them in other client application.
But after that,our web applcation can not work,we get the error:
ora-12154 TNS an not handle the service name
Then I found that the path environment has been changed. The "C:/app/oracle81/bin" is added at first. But even I change the "D:/app/oracle11g/bin" first,it does not work also.
Any idea to make the both work?
You might investigate what drivers are being used within .NET ... Microsoft's deprecated Oracle provider or Oracle's own provider or some kind of ODBC provider sitting on top of several kinds of possible drivers in a DSN. Each might be remedied in a different way.
But it sounds like the Oracle 8 installation has stolen priority over the Oracle 11 installation in some way that is not just the "PATH" environment variable. My guess would be the registry.
In ascending order of inconvenience and effectiveness you could try:
1) Run the Oracle 11 installer and see if it knows about the Oracle 8 home. (Unlikely if it's 8.0). Set it as default or top of the list; exit; then go back and set Oracle 11 as the default/top of the list.
2) Configure the TNS entries in your Oracle 8 home to connect to your Oracle 11 database. Live with the fact you're using a very out of date client.
3) Uninstall and reinstall Oracle 11 to get it to steal back the priority.
By default the .net framework uses the FIRST oracle directory it comes to the in the path statement. There have been some discussions on how to get around this - but your best bet is to run one client per machine.

What do the ASP.NET Universal Providers enable that the default sql providers don't?

Inside the readme file of the ASP.NET Universal providers NuGet package is this quote
The SqlMembershipProvider, SqlRoleProvider, SqlProfileProvider classes that shipped in ASP.NET through version 4 support only Microsoft SQL Server and Microsoft SQL Server Express. They do not support newer offerings such as Microsoft SQL Azure and Microsoft SQL Server Compact.
However, when I run the custom aspnet_regsql scripts for Sql Azure http://support.microsoft.com/kb/2006191 and then point my web.config to the SQL Azure database, ASP.NET membership seems to work correctly.
Can anyone tell me what exactly doesn't work with SQL Azure, that the universal providers enable?
The main difference, as far as I can tell, is that when you connect to Sql Azure you need to implement retry logic. The original providers won't retry when a connection error occurs and this will happen from time to time with SQL Azure.
Also, the original providers don't raise exceptions containing the full SQL error codes so if your database is being throttled you won't know which throttling rule is being applied. At least this is what the SQL Azure support team tell me - I'm currently in the process of upgrading for this reason.
A note of caution: the Universal Providers seem to use a different database schema to the original providers, so you will need to migrate membership data. If you are starting a new project it will be much easier to change these providers before you go live with real users!
the universal providers enable you to use asp.net membership system on sqlazure and also make the implementation sql agnostic. you can take the same app using universal providers and change the datasource to be sql server/sqlexpress/sqlce/localdb etc

Resources