I'm new to altibase hdb. I was installed altibase hdb with the instructions from here:
http://support.altibase.com/manual/en/631b/html/Installation/index.html
after using the links guides I was able to start the server well but I could not create the database via the recommended command:
CREATE DATABASE mydb INITSIZE=10M NOARCHIVELOG CHARACTER SET KSC5601 NATIONAL CHARACTER SET UTF16;
after some manipulation I found out that the datafiles and anchorlog files were exist here:
$ALTIBASE_HOME\Altibase\altibase-HDB-server-6.3.1\logs
$ALTIBASE_HOME\Altibase\altibase-HDB-server-6.3.1\dbs
So I cleaned them and now I can use the command above to create the database. but if I just rename the databasename to forexample mydbb instead of mydb the command does not work and get me the following error:
Invalid Database Name. Check The Properties and retry.
So what's problem with the database name? what's the difference between mydb and mydbb????
Keep in mind that this same issue should occur even if you install ALTIBASE HDB on Linux.
If you are going to change the database name using the "CREATE DATABASE" command, you must also change the DB_NAME property in your $ALTIBASE_HOME/conf/altibase.properties file to match.
Once you do so, the command you specified should work fine.
Related
I need to set up a new Oracle XE database after the server holding our old XE testing database suddenly died.
To do this I do have a .dmp file from when the database was functional.
The server is a Windows machine.
The database structure was originally created in an Oracle 11g environment but the server had been updated since so the .dmp was created in a 19c environment.
The new Oracle XE database I'm trying to set up is 21c.
The installation of Oracle XE worked, but trying to create a PDB fails with ORA-65100 "missing or invalid path prefix".
Issued the following statements in sqlplus via command line:
create pluggable database DATABASE_MAIN
admin user USERNAME identified by PASSWORD
storage (maxsize 2G)
default tablespace TS_DATA
datafile '/disk1/Oracle/product/21c/dbhomeXE/pdbs/DATABASE_MAIN/DATABASE_MAIN.dbf' size 250M autoextend on
path_prefix = '/disk1/Oracle/product/21c/dbhomeXE/pdbs/DATABASE_MAIN/'
file_name_convert = ('/disk1/Oracle/product/21c/dbhomeXE/pdbs/pdbseed', '/disk1/Oracle/product/21c/dbhomeXE/pdbs/DATABASE_MAIN/');
So this line is currently throwing the error:
path_prefix = '/disk1/Oracle/product/21c/dbhomeXE/pdbs/DATABASE_MAIN/'
Things I've tried to get around the error:
ran cmd as administrator in case its a simple permission issue
created the missing folders myself ( /pdbs/DATABASE_MAIN )
replaced /disk1 with /diskc to see if it makes a difference
omitted /disk1 and started the string with /Oracle
tried a different path ( /disk1/Oracle/product/21c/pdbs/DATABASE_MAIN/ )
removed the trailing '/' at the end of the path prefix
Searching online for what invalidates the path prefix sadly didn't give me any answers however Oracle's documentation states the following as a valid example path prefix:
PATH_PREFIX = '/disk1/oracle/dbs/salespdb/'
This is my first time interacting with this "new" Oracle database structure of CDB/PDB as I've only worked with older databases so far that were built with the user/schema structure.
As noted in the comments, the issue was due to the UNIX style paths rather than Windows styled.
So changing the paths from
/disk1/foo/bar
to
C:\foo\bar
resolved the issue.
Here's the functional create-statement as run in sqlplus:
create pluggable database DATABASE_MAIN
admin user USERNAME identified by PASSWORD
storage (maxsize 2G)
default tablespace TS_DATA
datafile 'C:\Oracle\product\21c\oradata\XE\DATABASE_MAIN\DATABASE_MAIN.dbf' size 250M autoextend on
path_prefix = 'C:\Oracle\product\21c\oradata\XE\DATABASE_MAIN'
file_name_convert = ('C:\Oracle\product\21c\oradata\XE\pdbseed','C:\Oracle\product\21c\oradata\XE\DATABASE_MAIN');
I am struggling with an error when using create pluggable database from command. My config is:
HOST_A - source CDB with couple of PDBs with ASM
HOST_B - destination CDB with couple of existing PDBs with ASM
I would like to create a new pluggable database on HOST_B using dblink to HOST_A and "create pluggable database X from dbLink" statement, however I'm getting this error:
ORA-65169 Error encountered while attempting to copy file -- path to .DBF file on HOST_A
ORA-17628: Oracle error 19505 returned by remote Oracle server
ORA-19505: failed to identify file ""
I have checked above path to .dbf file and owner on HOST_A - it exists and has correct owner. Also, HOST_B has enough space to create new snapshot. What makes that even more weird, is that I have very similar HOST_C with same init parameters and it works without any problem.
I noticed on HOST_B oracle has copied these files and placed them under valid ASM mount point with correct name etc, however create pluggable database still fails.
Any ideas?
I opened Firebird ISQL Tool to create a database (I assume thats right?) and I typed in the "create database 'path_here'" command to create my database. When I pressed enter, it asked me for a CON string, so I typed in the below:
ISQL Version: WI-V3.0.1.32609 Firebird 3.0
Use CONNECT or CREATE DATABASE to specify a database
SQL> create database 'C:\Users\User\Desktop\Remake\FirebirdDatabase'
CON> user 'SYSDBA' password 'myPASSWORD123';
When clicking enter, I received this error:
Statement failed, SQLSTATE = 08001
I/O error during "CreateFile (create)" operation for file "C:\USERS\USER\DESKTOP\REMAKE\FIREBIRDDATABASE"
-Error while trying to create file
-Access is denied.
SQL>
Is there a way to fix this? I googled it and all the answers pretty much give information for Linux and nothing for windows.
The only way I can reproduce this error, is if C:\Users\User\Desktop\Remake\FirebirdDatabase already exists, and FirebirdDatabase is a folder (directory), and not a file.
The database path you give in create database is the full path to a database file. So make sure there is no folder FirebirdDatabase in C:\Users\User\Desktop\Remake. It is customary to give Firebird databases the file extension .fdb.
With your version of Firebird, there is no need to quote the name of the user name, which is also case insensitive.
I am struggling to create a database using SQLite3 using Windows 7.
SLite3 is currently installed:
C:\Program Files (x86)\Development\
and has sqlite3.def, sqlite3.dll and a sqlite3 (.exe) file.
I have also updated the environment variable of Path to:
C:\Program Files (x86)\Development\
When I double click:
sqlite3.exe
It opens up the command prompt with the address at the top as:
C:\Program Files (x86)\Development\sqlite3.exe
It opens up and is:
"Connected to a transient in-memory database."
(transient in-memory database) is in red text
Looking around this means that it saves to memory and not hard disk but if you specify:
.save testDB
Then all should be good, but not for me. I have tried:
sqlite3 testDB.db
.save testDB
create table tbl1(one varchar(10), two smallint);
But I get the error:
Error: near "sqlite3" syntax error
Any ideas what I'm doing wrong? I have SQLite manager installed too but I assume I can't use that until a database is saved to disk?
Thanks.
Would changing my Path variable to:
C: \Program Files (x86)\Development\
Make any difference i.e. a space between : and the \?
I ran into the same problem and found help here on the official website. Essentially, you can double-click on the sqlite3.exe file. Then use the .open command to get a persistent database. To create your testDB.db database, you can do as follows:
SQLite version 3.8.8.3 2015-02-25 13:29:11
Enter ".help" for usage hints.
Connected to a transient in-memory database.
Use ".open FILENAME" to reopen on a persistent database.
sqlite> .open c:/sqlite/testDB.db
sqlite>
This should create testDB.db in c:/sqlite or some other folder you specify.
You do not need sqlite3.def or sqlite3.dll.
There are two ways if starting the sqlite3 command-line shell, either by double-clicking on the .exe, or by typing sqlite3 and any parameters in the Command Prompt.
Do not try to start sqlite3 from inside itself.
SQLite Manager is able to create a new database.
Using a wrong path would not work.
Reach the path where you want to start with SQLite through command prompt, for e.g. c:\sqlite>. Now when I use ls command I get c:\sqlite>ls
sqlite3.exe
Now to create database type c:\sqlite>sqlite3 database.db It will create a database for you.
Add sqlite3.exe in a folder, for example: C:\sqlite3\sqlite3.exe
Now go to the path where the sqlite3.exe is and run it.
Per the '.help' instructions, type '.save filename'. When reopening, type '.open filename'. This worked for me.
Full error below:
Error 1 SQL01268: .Net SqlClient Data Provider: Msg 1834, Level 16, State 1, Line 1 The file 'C:\Program Files\Microsoft SQL Server\MSSQL10.SQLEXPRESS\MSSQL\DATA\testdatabase.mdf' cannot be overwritten. It is being used by database 'testdatabase'. SchemaCompare5 25 0
I read about this on some forums and quite a few people were getting this and supposedly for some it had to do with parameterising the file path name to the db etc. or ticking "ignore file names and path for files and log files" prior to doing the comparison - this I have tried to no avail.
Someone else who has the same/similar issue: http://social.msdn.microsoft.com/Forums/en/vstsdb/thread/5a8b8c52-adb4-4a5a-95ed-09ad22bacf60
Basically for me I seem to get this error irrespective of which databases I am using for target and source. Say even if I create a new database with one table and another database with no tables and different name and try to update the schema of the database with no tables using the db with the single table it still gives me the error. Almost like SQL server express has gone nuts. I remember using the schema comparison tool before with no trouble. All db connections were created, tried many ways to do this to no avail ie: pointing to copy of *.mdf db in another folder or deleting things from the DATA folder in mysql directory in program files etc.
Also believe I read someone had solved a similar issue be deleting some files the scheme
comparison tool creates, think they were *.sql type not sure which ones though.
The problem arises because the database files already exist.
Try the below within the Visual Studio database project.
Create the schema comparison.
Go to menu: Data > Schema Compare > Export to > Editor
Once the script has been created delete the alter database commands that add the physical files. Then create a connection, switch to SQLCMD mode (making sure you have focus on the script) and execute the script.
To switch to SQLCMD mode access: Data > Transact-SQL Editor > SQLCMD Mode
If the target DB already exists, just delete through Management Studio first before you deploy for the first time.
I had already created the database manually through SQL Server Management Studio when I was establishing the original connection when creating the Database Project via the SQL Server 2008 Wizard in VS. It wouldn't allow me to continue until it could detect that the database existed. Then once I got to the Deploy step for the first time, it threw the same error as above. I just went into Management Studio and deleted the DB, then tried to deploy and it worked fine. Interestingly, it's deploying every time now without me having to go in and delete it every time.
RESTORE DATABASE B FROM DISK = 'A.bak'
WITH MOVE 'DataFileLogicalName' TO 'C:\SQL Directory\DATA\B.mdf',
MOVE 'LogFileLogicalName' TO 'C:\SQL Directory\DATA\B.ldf',
REPLACE ---> Needed if database B already exists