I installed Oracle 11g, with ad instance called orcl.
And I want to create another instance, called for example orcl1.
How could I do that? Do I nead to re-install another database like I did the first time?
You need either to use :
DBCA : recommended because easier. See example (this assumes that Oracle executables have already been installed).
or
CREATE DATABASE SQL statement with SQL*Plus: more complex.
Related
I'm using a postgresql (9.6) database in my project which is currently in development stage.
For production I want to use an exact copy/mirror of the database-cluster with a slightly different name.
I am aware of the fact that I can make a backup and restore it under a different cluster-name, but is there something like a mirror function via the psql client or pgAdmin (v.4) that mirrors all my schemas and tables and puts it in a new clustername?
In PostgreSQL you can use any existing database (which needs to be idle in order for this to work) on the server as a template when you want to create a new database with that content. You can use the following SQL statement:
CREATE DATABASE newdb WITH TEMPLATE someDbName OWNER dbuser;
But you need to make sure no user is currently connected or using that database - otherwise you will get following error.
ERROR: source database "someDbName" is being accessed by other users
Hope that helped ;)
I have an application that uses EF Code First against a SQL Server 2012 database. I'm using the DropCreateDatabaseIfModelChanges initializer.
I have a database on my development machine that I want to move over to my testing machine, and to do that I'm attempting to use backup/restore. Unfortunately, having done that, I get the dreaded "Model compatibility cannot be checked because the database does not contain model metadata" error.
I don't understand why this is the case - the database works OK on my dev machine. Is it not possible to transfer the database to another machine?
Solved: the issue was that the __MigrationHistory table, while present, was not accessible to the application because of insufficient database privileges. I (temporarily) made the user a DBO on the database, and it all worked fine. (Hat tip to Jayantha).
Now the metadata table is removed from the code first DB and added the __MigrationHistory table to system tables. You can try running Enable-Migrations command in Package Manager Console. Here is more details .
I installed db2 client in my system for personal use. I am not able to understand from where to create the database so that i can create tables on that db and play around with sql queries as of now.
This is totally related to my personal use and learning purpose.
Please inform how to create a dummy database and play around with it with db2 client?
Regards,
Are you on Windows? Are you using DB2 Express-C? I'm assuming you are, since you say this is for personal work.
After you have the DB2 binaries installed, you should have been prompted with the "DB2 First Steps" application, where you could have the application go through a GUI to create the database for you. If you missed it, you should be able to find it in your start menu with Start -> Programs -> IBM DB2 -> DB2COPY1 (Default) -> Set-up Tools -> First Steps.
If you prefer the command line, you can use the following:
First, determine if your installation created a default instance (on Windows, this will be called DB2) by using the db2ilist command. In the DB2 Command Window, if you're not on the instance you want to create a database in, you can switch with the following command:
set db2instance=DB2
Be sure to not include spaces around the equal sign.
Now, in order to create a database in the current instance, you use this command:
db2 create database mydatbase
For further reading, IBM has produced a Getting Started ebook, and I would highly recommend you check it out!
The DB2 client is just that - a client only. It does not include the database engine.
To create a database you have to install the server. The server includes the client portions.
i've a simple question.
Is it possible to use another database name as the readme says it have to be called "DotNetNuke" ?
manually create SQL Server database named "DotNetNuke" ( using Enterprise Manager or your tool of choice )
i've a webhost which have different database names.
thanks
Yes, you can use any database name that you would like. During the installation process, you provide your database name.
You can also manually edit the connection string in the web.config file. By doing this the Auto install option will still be available.
I would like to change the name of my SQL Server instance. Is there a simple way of doing this or is a significant effort required? Note, this is a named instance - not the default instance.
The only way is a reinstall. See this similar thread for more info: SQL Server, convert a named instance to default instance?
Or you could try this method:
http://groups.google.com/group/microsoft.public.sqlserver.server/browse_thread/thread/544c4eaf43ddfaf3/f1bdcd1ec9cab158#f1bdcd1ec9cab158
I have seen a few makeshift ways of doing this, but I don't have confidence in any of them. I think I will simply install a new instance and transfer my information over.
Renaming does't work well on the registry. Install a new isntance.
Although there is no simple way of renaming a SQL Server instance, one can create SQL aliases.