Why does Redgate compare for Oracle show NONEDITIONABLE for objects?
We have installed Oracle 12C locally on a windows machine to dry run database scripts before running them on the main Oracle 12C database on a Unix machine.
After running the scripts on the local version we run Redgate Schema compare and find that some of the Views and Triggers don't match. Upon further review the only difference between the two is the word "NONEDITIONABLE". This is not part of the our script and we are unsure how this was added to the local version of the object.
CREATE OR REPLACE FORCE NONEDITIONABLE
When researching EDITIONING we thought that maybe it was because the local Oracle install wasn't a portable database (PDB), so we changed our install, and confirmed that the EDITIONS_ENABLE was 'Y' for the user.
We are restoring a dump of the main to our local, and it appears to only be the objects that existed previously. Any new objects do not experience this issue.
I was never able to find a good solution in the local 12C version install. I finally used the restored 12C version to create by own backup, which I downgraded to the 11.2 version for Oracle Express. Once I restored the downgraded version the comparison and ran the scripts I no longer experienced an issue with the compare.
Related
I am successfully doing a daily restore of a backup from an earlier version onto MS SQL 2017 using T-SQL.
However during the restore the database gets upgraded to the current version.
This is a problem as I wish to modify the database and then do a backup which then gets transferred and restored to another system which is using the same earlier version of MS SQL.
Is it possible to run the RESTORE without the database getting upgraded?
Have been looking through T-SQL documentation and not found this referred to.
The T-SQL code I am using is:
USE master
GO
ALTER DATABASE Polly SET SINGLE_USER
with ROLLBACK IMMEDIATE
GO
RESTORE DATABASE Polly FROM DISK = 'C:\data\Polly.bak';
GO
USE Polly
DELETE FROM SytLog;
GO
ALTER DATABASE Polly SET MULTI_USER
GO
If anyone has general improvements to above I am happy for suggestions.
When the above runs I get:
Database 'Polly' running the upgrade step from version 782 to version 801.
...
Database 'Polly' running the upgrade step from version 868 to version 869.
Would like to see no upgrade steps, but only if database still usable.
When the above runs I get: Database 'Polly' running the upgrade step
from version 782 to version 801. ... Database 'Polly' running the
upgrade step from version 868 to version 869.
Would like to see no upgrade steps, but only if database still usable.
This is not possible. Every version of SQL Server has its data and log files structure that differs between server versions. And if you restore or attach database from lower version db files are one-way updated to have a structure that the current version of SQL Server needs.
It's impossible to not upgrade because the current version of server needs that new structure for db files.
All speculations around compatibility level / read_only property will not help at all, current server will never run with files that are not of the structure it needs.
In case of readonly database its files will be upgrade but the database will remain readonly.
Compatibility level has nothing to do with database version (version of db files) at all. It just tell to server what version of query optimizer should be used, what legacy syntax can still be parsed, etc.
No, this isn't possible. Once a database is attached to a newer version of SQL Server, you can't move it back to older. The only option in this case is to export/import the data. If you need to modify the database and move it back to the older server, you need to install a server with the same old version and do the restores there!
Microsoft documentation states:
If you restore a SQL Server 2005 (9.x) or higher database to SQL Server 2017, the database is automatically upgraded.
Although I would try in case of desperate need to create read-only database and restore it.
But this is kind of black magic not directly supported by vendor.
The compatibility level is important.
Even when the compatibility level of the database needs to be changed, under certain conditions the backup can’t be simply restored.
Restoring a database backup created on a SQL Server 2008
R2 to a SQL Server 2012 instance goes smoothly, but if a SQL Server
2000 backup is tried to be restored on a SQL Server 2012 you cannot
directly do it.
We recently updated our production SQL Server 2016 Enterprise instance from SP1 to SP2. We are currently on version 13.0.5026. Prior to the upgrade, a user with connect rights to SSISDB and proper rights on the Integration Services Catalog folder could deploy an ISPAC file successfully.
After the upgrade, the same users can still deploy to the SSISDB, but when you execute the .DTSX, the script task inside fails validation. If I deploy the exact same ISPAC as a sysadmin, there's no issue. The usual solution I've seen is to confirm that SSDT Configuration Properties are set to SQL Server 2016. We have verified this is set correctly prior to building the ISPAC.
I saw a similar issue when migrating from SQL Server 2014 to 2016 a couple years back, but the solution at that time was to give the Proxy account that runs the package modify rights to the C:\Windows\Temp folder so it can generate temp files. This new issue is hard to pin down, and I don't want to give out sysadmin just so others can do the simple deployment steps.
Any thoughts or suggestions are appreciated.
*******Update/edit************:
The server has a SQL Server 2016 deployment tool located under SQL Server/130/DTS/Binn - ISDeploymentWizard.exe. This deployment tool works. There is another identical wizard under the 140/DTS/Binn location, same name but 1 KB larger (assuming this is because SSMS is a separate install now, and I installed latest and greatest on server). This one fails deployment. I'm banging my head against the wall as to why one works but the other doesn't. Locally we all use SSMS 2017, and with that we get the 140/DTS/Binn ISDeployment file, not the 130 (since that's SQL Server 2016 and we're using SSMS 2017, which I thought was backwards compatible). Either way, this problem just started occurring and we've been on the same version of SSMS for a few months.
Image of the Execution information report from SSMS
Had resolved a similar issue with C# scripts recently. In short: don't use 140 version of ISDeploymentWizard.exe with MS SQL 2016. It apparently mangles something in C# code, or components' properties, and 2016 runtime stops recognising them.
In my case, a package with C# script source has started to throw the following error during the validation phase:
Error: Microsoft.SqlServer.Dts.Pipeline.ComponentVersionMismatchException:
The version of C# source component name is not compatible with this
version of the DataFlow. [[The version or pipeline version or both for
the specified component is higher than the current version. This
package was probably created on a new version of DTS or the component
than is installed on the current PC.]]
at Microsoft.SqlServer.Dts.Pipeline.ManagedComponentHost.HostCheckAndPerformUpgrade(IDTSManagedComponentWrapper100
wrapper, Int32 lPipelineVersion)
The first comment here has helped me to ultimately identify the cause.
I recently restored my old computer's system (running win XP SP2), on which I was using oracle 8i in addition to Forms and Reports 6i.
Unfortunately, restoring the system deleted the software, and thereafter I had no access to the local database nor the Forms and Reports I had earlier.
I then installed Oracle 9i v 9.0 as I think that Oracle DB usually has 2-updates compatibility. The installer didn't recognize my 8i database so I went on creating a new 9i database, but now I can't connect forms 6i.
Logging in to sqlplus 9 works fine, but sqlplus 8 requires
DATABASE CONNECTION (e.g. t:node:SID) [LOCAL]
What should the input be??
My 9i SID = ABD and tnsnames.ora is cloned from 9i network folder to 6i net80 folder.
Thank you in advance
Usually, 6i version should be installed in this order: database first, then Reports, and Forms at the end. Why? Because Reports installation overwrites Forms' configuration files, but Forms installation won't overwrite Reports' ones.
Apart from that, the rest should be relatively simple: if you don't use TNS_ADMIN environment variable (my suggestion: do use it), then you have to manually maintain all copies of TNSNAMES.ORA synchronized - that's what you already did: put copy into \developer_suite_home\network\admin directory.
Forms should then be able to recognize the database and connect to it.
I am new to oracle database products. I am planning to install oracle 11g express edition in my PC,it looks like a standard installer.But in many of the oracle database installation tutorial mentions oracle universal installer.oracle universal installer provides more open options,but those options and features not available in downloaded oracle 11g express edition.
difference between two https://docs.oracle.com/cd/E17781_01/install.112/e18803/toc.htm#XEINW151 and http://www.oracle.com/webfolder/technetwork/tutorials/obe/db/11g/r1/prod/install/dbinst/windbinst2.htm
so anyone explain me exactly what is oracle universal installer??Thx in advance.
As the name suggests oracle universal installer is a utility which can be used to install or uninstall multiple oracle products.
The utility can also check pre-requisites before installing a new software.
Only thing you need to do is to provide path to products.xml file inside oraparam.ini file. This can be location for the file on your physical machine or remote location may be hosted on oracle site.
The products.xml file actually have the information about the product being installed for example it is Oracle Client or DB.
For more information please check this link
FYI, this question would have been better asked on the DBA site since it has nothing to do with programming.
XE is a minimal installation for test/dev work so I guess they decided not to clutter it up with OUI, which I have never liked anyway. OUI is simply Oracle's Java-based installer that installs and keeps track of the majority of Oracle software you have installed on your system. There's nothing special about it, and you have no need to worry about missing out on something. If you were installing the standard database, it would try to start the network config tool that creates the TNSNames.ora file, for example. It's been a while since I used XE but I think it's install just creates a generic one for connecting to the XE instance.
version of my database is 661.
when i attach my database in new version of sqlserver, version of my database changed to 665
Automatically.
I don't want to change version of my database.
how can i do that?
You can't prevent automatically database version upgrade when you're attaching/restoring database from lower to higher version of SQL Server.
Source: A lot of years of experience.
BUT, you can do a manual migration of higher version database into lower version by doing THIS
Well, I think you are using SQL Server 2008 R2 database which are 661 version. Hopefully you are trying to attach 2008 R2 to an SQL server 2008 instance but once the database has been upgraded to an 2008(665 version), it cannot be downgraded to SQL Server 2008 R2(661).
You need to uninstall SQL Express and reinstall the latest version to fix the problem.
You can't stop it changing the version, when an older version database is attached to a newer version of SQL server, it must perform these upgrade steps so before the database can be brought online on the new version. These upgrades are internal to SQL server and include things like file format changes etc, they themselves should not affect behaviour of your user code (although the changes in the new version of the SQL engine might).
The only significant result of these upgrade steps is that the database can no longer be attached or restored to an older version of SQL server.