Using SQL Developer 4.1.3 (old version used due to compatibility with older Oracle instances) i found no way to delete entries from the recent files in the Export Wizard.
As this is quite annoying when the list grows large (also according to forum on thatjeffsmith.com - large list makes Export Wizard startup slower).
Where is the recent file list stored and how to sanitize it?
The entries are stored in "%USERPROFILE%\AppData\Roaming\SQL Developer\system4.1.3.20.78\o.sqldeveloper.12.2.0.20.78\product-preferences.xml"
in entry:
<hash n="DBConfig">
<hash n="URLFileChooserPaths">
<list n="DEFAULT_CONTEXT">
Related
I am using ArangoDB community edition, I have upgraded the ArangoDB and ArangoDB client softwares, hence I can see multiple installations of ArangoDB on my machine.
Well, depending on my activity I would like to uninstall unused installations.
To have a back-up I would like to save the actual database files.
I would like to save these different database files. viz : Db1 , Db2 , Db3
Just in case I mess up installations or something.
There is no option to download the complete download of database. We can only export Collections as JSON as of now
I would like to know what's the typical location where the database
files are stored.
I did complete check of below locations and I dint find database storage files.
C:\Program Files\ArangoDB3 3.X.X\etc\arangodb3
C:\Users\Prateek\AppData\Local\ArangoDB3-client 3.X.X
and other locations by Search function.
Having multiple installations of ArangDB after upgrading sounds like a bug. Would be nice if you would open a github issue for that.
The recommended way of making backups of your data is by using arangodump and then arangorestore to restore the data.
The actual default location where these database files stored is
C:\ProgramData\ArangoDB\databases
ProgramData is usually hidden under Windows.
Each collection has its own folder and has 2 files;
parameter.json
journal-NNNN.db
We can also see other ArangoDB files under C:\ProgramData\ArangoDB such as
journals
rocksdb
Even though I have had multiple installation showing up due to upgrades these database files are common. I verified this by switching to different server by running arangod.exe in Administrator mode and then calling respective arangodump by switching to that location.
Note : to get the version arangodump is running for we can check from arangodump -version true If we dont run particular aranghodump(exe) this is fetched from environment path variable.
I'm trying to create a bacpac file to export my databases to azure.
Is there anyway of making it ignore the users, while creating an export package (sqlpackage /a:Export) ?
No, unfortunately, there is no option to ignore users on export.
You could, in the alternative, produce a dacpac file with data (sqlpackage /a:extract /p:ExtractAllTableData=true) and ignore users when publishing... but that would only work for a pristine database, because dacpacs skip most Azure import niceties (like publishing stored procedures first to take advantage of deferred name resolution).
I'm guessing that you would like to ignore users because your database contains some users mapped to Windows logins and you'd like to avoid producing a new version of the database that contains only Azure SQL DB-compatible objects. If so, you might be interested in trying the private preview of the Azure SQL Database migration service: https://blogs.technet.microsoft.com/dataplatforminsider/2017/04/25/get-to-cloud-faster-with-a-new-database-migration-service-private-preview/
This functionality is intended to support the process of migrating databases to Azure. It therefore the reasoning goes that it only supports Database Artefacts that are supported by Azure.
Windows Users, File groups and some hints (nolock without a WITH springs to mind) are not allowed.
One workflow that worked for me can be outlined as follows.
Export a Database Application Project of your database (dacpac file).
Import the same into Visual Studio (Version 2013 at least).
Change the Target Platform to Azure SQL Database (I am unsure about the V12 appendage)
Fix all the errors and warnings.
Optionally consider scripting to delete any data that could be removed at this point. You may also want to produce a quite small version for iterative testing.
Restore a backup (from a good old fashioned BAK file) of your Database to a different location.
Publish the dacpac of your Azure-corrected Project onto the restored DB.
Generate a Bacpac from the same.
Once you have a bacpac file, you should be able to promote it to the cloud
Obviously this will be an iterative learning process and some of the steps will require a number of tries to get right.
Is there away (Cheap or FLOSS) to do version control of SQL Server 2008 DB schema?
Here is a nice article by Jeff Atwood on database version control
You can use Team edition for database professionals for this purpose
Here is a list of tools that you can purchase which can be used too:
Red Gate SQL Compare from $295.
DB Ghost from $195
SQL Change Manager $995 per instance.
SQL Effects Clarity standard ed. from $139
SQLSourceSafe from $129.
sqlXpress Diff contact for price. :-(
Embarcadero Change Manager contact for price. :-(
Apex SQL Diff from $399
SQL Source Control 2003 from $199
SASSI v2.0 professional from $180
Evorex Source # shareware or $299+ (conflicting reports!)
Edit Just found this post which explains version control through svn: Versioning SQL Server database
Create a database project for the database, in Visual Studio. Check that project into a library system, such as SVN or Team Foundation Server.
In my experience there is no easy option in an enterprise environment.
The three methods below are the main choices (irrespective of tool set used).
1) Dump entire schema into a file and store file in repository
PROS: Easy
CONS: Big file - difficult to manually edit - hard to see what has changed since last version - can't deploy it so would need some mechanism to prepare a DIFF script between Dev and Test/Live systems
2) Dump every database object into a separate file, stored in repository.
PROS: Very easy to see what has changed. Can produce deployment scripts for most objects easily (although some things would still require DIFF script e.g. Column Definition changes)
CONS: Have to run scripts in a certain order - managing that process can be quite difficult.
3) Treat every change as a separate operation with it's own sequentially numbered SQL script.
PROS: Easy for devs to create scripts, same scripts can be run against each platform (in theory)
CONS: Nightmare to manage - ordering can become an issue, very difficult to see what has changed in a release, or when a given object changed.
Having run with all 3 options, I would say that 2 was lovely to work with, but took ages to set up in the first place - getting all the scripts executed in the correct order took ages - and it STILL required use of a Database diff tool to generate scripts for UAT/Live. So I would now recommend a mix between 1 & 2.
Can we use GIT as the source control for sql management studio?
for Database source control within SSMS
Agent SVN - SCC Subversion Plug-in.
http://www.zeusedit.com/agent/ssms/ms_ssms.html
or
http://www.red-gate.com/products/sql-development/sql-source-control/
I’ve found out that ApexSQL has a tool that natively supports Git as a source control system. It comes as a SSMS add-in, and offers a wizard you can use to map database objects with the source control systems. To do that:
Download and install ApexSQL Source Control
Start SSMS and in Object explorer select the database you want to be linked to a source control
Right-click the database, and form the context menu, select the Link database to source control option, from the ApexSQL Source Control submenu
Select the source control system (in your case it is Git) and choose from 2 database development models - shared or dedicated. Shared model is recommended when you link a database on which multiple developers will work at the same time
Filter objects which you don’t want to track using source control: by schema, type or name by schema, type or name
Provide appropriate login information and repository string. For Git it is:
<protocol>://<hostname>:<portnumber>/<Git server name>/<repository> (see example below):
More detailed step-by-step instructions can be found in this article:
http://knowledgebase.apexsql.com/link-database-source-control-system-2/
You could add Git Bash as an External Tool (Tools | External Tools...):
Name: &Git (use & to specify a hot key)
Command: C:\windows\SysWOW64\cmd.exe (32-bit Command shell)
Arguments: /c ""C:\path\to\Git\bin\sh.exe" --login -i" Finding the path where Git is installed on a Windows system
Initial directory: $(ItemDir)
Try sql-source-control, a free and open source CLI used to get SQL into source control systems like Git.
https://www.npmjs.com/package/sql-source-control
Microsoft has released SQL Operations Studio. It's a free tool that runs on Windows, macOS, and Linux, for managing SQL Server, Azure SQL Database, and Azure SQL Data Warehouse; wherever they're running. It comes with native GIT support.
Since SSMS is (more or less) a custom version of Visual Studio, you might be able to use a solution intended for VS:
Using Git with Visual Studio
Alternatively, manage your DB source code in Visual Studio from the beginning, not in SSMS. That way (at least in VS2010) you have database projects, integrated deployment and unit testing etc. Or continue using SSMS and check in your code from an external tool when you're ready (not so convenient, of course).
But it depends on exactly what you're doing: SSMS is a DBA tool, VS is a developer tool. Either way, you should be using some form of source control, but it's not clear from the question exactly what sort of files you need to version.
Not yet but if you go to http://redgate.uservoice.com/forums/39019-sql-source-control/suggestions/537681-add-git-support and vote for redgate to add support for git it might get added in the next version. Yes I know it's a commercial product but some products are just good enough to pay for!
Red Gate SQL Source Control has been updated to include Git and Mercurial support (as well as Perforce and TFS). Be forewarned that their DVCS integration is not 100% feature complete in relation to their SVN product, as basic features such as viewing history of an object are not supported from within SSMS. This may be a deal-breaker if other Red Gate tools like SQL Compare are part of your workflow.
Our workaround was to install TortoiseGit or GitExtensions and navigate to the repository on disk to drill into the specifics. It works but is a bit clunky.
VersionSQL is an SSMS source control add-in I've designed to be lightweight and easy to use. In the Object Explorer panel, just right-click on a database or object and click Commit. VersionSQL will script it out to Git/SVN in a neatly organized folder structure.
Check it out at https://www.versionsql.com
There have been a number of answers around this question which you might want to look at but in a nutshell ....
The nature of version control is to store the original file and then the deltas, the difference between the original file committed and and subsequent changes (ok i have made that a bit simpler than it is perhaps) and then to manage the version number and give tools to extract any particular revision you need. This also then allows you to compare previous revisions and roll back (etc. etc.)
The RDBMS is made up of the schema and the and data these change and can change frequently in the case of the data so even if you did VCS what would you compare to do a restore and how would that help? Assuming you have a live system then reverting to an earlier revision would lose all the data stored in the interim and although i have never tried it i suspect could destroy the general integrity of the RDBMS.
The better solution is to use a backup application built for that RDBMS, MySQLdump say in the case of MySQL which makes a snapshot of the data and the structure of the data and store that in a safe place.
Dumps can be scheduled regularly and you can do things like master/slave databases (or other strategies) so you can backup live production databases on the fly without impacting on performance
I have a DB on oracle on Windows Server 2003. How do I export it with all the data and put it into other Windows server?
Use RMAN to take a full backup. Then restore it on the new server.
See Clone using RMAN Article
You can use Oracle Data Pump to export and import database. Quote from documentation:
Oracle Data Pump is a feature of Oracle Database 11g Release 2 that enables very fast bulk data and metadata movement between Oracle databases.
Procedure is like this:
Export existing database using expdp utility
Install Oracle database server on new Windows server
Import database on new server using impdp utility
Check this link: Oracle Data Pump. There you will find complete documentation and examples how to use this utility.
If you are wanting to create an exact copy of an existing database on a new sever of the same operating system (though not necessarily the same O/S version) and the same Oracle version, the quickest and least problematic method is to just copy the database files. This is often referred to as database cloning, and it is a common method DBAs use to setup development and test databases that are intended to be exact duplicates of production databases.
Stop all instances of the database on the existing system. You could login to each instance "as sysdba" using SQLPlus and run the "shutdown immediate" command. You could also stop the Windows Services for the instances. They are named OracleServicesid where "sid" is the instance name. Usually, there is just one instance, but there could be multiple instances to a single database. All instances must be stopped for this procedure.
Locate the database files. Look for an "oradata" folder somewhere below the Oracle root folder and then find the folder for the database sid in there. (There could be multiple oradata folders. You need to find the one that has the folder named for the SID of your database.) There are also the files in the Admin folder for the sid as well as the %ORACLE_HOME%/database folder. If DBCA had been used to create the database, then the location of all of these files varies by the Oracle version.
Once you have identified all of the files for the database, you can use any method at your disposal to copy these files to the same locations on the new server. (Note: The database files, control files, and redo logs must be placed in the same locations (i.e., file system paths) where they exist on the old server. Otherwise, configuration files must be changed and commands must be run to alter the database's internal file paths.) The parameter file (initSID.ora) and server parameter file (spfileSID.ora) must be placed in the %ORACLE_HOME%/database folder.
On the new sever, you must run the oradim utility. (Note: oradim is an Oracle utility that is specific to Windows and is used to create, maintain, and delete instance services.) Here is a sample command:
oradim -new -sid yourdbsid -startmode automatic
Startup the database with SQLPlus, and you should be in business.
This is a general overview of the process, but it should help you get the job done quickly and easily. The problem with other tools is the need to create an empty database on the target server before loading the data by whatever means. If the target server has a different version of Oracle, it will be necessary to run data dictionary scripts to upgrade or downgrade the database. (Note: A downgrade may not always be possible.) If the new server has a different O/S, then the above procedure would require additional steps that would significantly increase its complexity.
It also possible to duplicate a database using RMAN. Google the words "clone oracle database using rman" to get some good sites on how this is done using that tool. If you are not already using RMAN, the procedure I have described above would probably be the way to go.