Cube project doesn't work because of permissions - sql-server

I'm doing "Multidimensional Project" with MS SQL Server 2012 (Server Data Tools - Visual Studio 2010 Shell). I can't run (debug) it.
If the data source's impersonation information is set to "use the service account", this error occures:
Error 2 Internal error: The operation terminated unsuccessfully. 0 0
Error 3 OLE DB error: OLE DB or ODBC error: Login failed for user 'NT Service\MSSQLServerOLAPService'.; 28000. 0 0
Error 4 Errors in the high-level relational engine. A connection could not be made to the data source with the DataSourceID of 'Data Warehouse', Name of 'Data Warehouse'. 0 0
Error 5 Errors in the OLAP storage engine: An error occurred while the dimension, with the ID of 'Items', Name of 'Items' was being processed. 0 0
Error 6 Errors in the OLAP storage engine: An error occurred while the 'Id' attribute of the 'Items' dimension from the 'Warehouse_MultidimensionalProject_Cube' database was being processed. 0 0
Error 7 Server: The current operation was cancelled because another operation in the transaction failed. 0 0
I guessed that this account has no premissions but (1) I coudn't even add this account (it seems that it doesn't exist) and (2) how is that even possible for it to not have built-it poremissions?
When I'm setting impersonation to "use the credentials of current user" (which is the owner of the data source, btw.), another error occures:
Error 2 Internal error: The operation terminated unsuccessfully. 0 0
Error 3 The datasource, 'Data Warehouse', contains an ImpersonationMode that is not supported for processing operations. 0 0
Error 4 Errors in the high-level relational engine. A connection could not be made to the data source with the DataSourceID of 'Data Warehouse', Name of 'Data Warehouse'. 0 0
Error 5 Errors in the OLAP storage engine: An error occurred while the dimension, with the ID of 'Items', Name of 'Items' was being processed. 0 0
Error 6 Errors in the OLAP storage engine: An error occurred while the 'Id' attribute of the 'Items' dimension from the 'Warehouse_MultidimensionalProject_Cube' database was being processed. 0 0
Error 7 Server: The current operation was cancelled because another operation in the transaction failed. 0 0
Any help?

The password musn't be set to blank for SQL Server to work properly... curious detail. :-)

Related

Could not change transaction status (0) (SQLSetConnectAttr)

We have a Django app connected to a remote SQL-server database.
I get an error when i try to do an update request on a database table :
[HY000] [FreeTDS][SQL Server]Could not change transaction status (0) (SQLSetConnectAttr).
I conclude that a similar request is still in progress and it blocks all my requests.
1/ The "autocommit" parameter is True.
2/ I tested :
connection.rollback()
This did not resolve the problem.
3/ I tried to do a live SQL query on the database.
My query returns no error.
It's a problem with Django or the libraries used.
Traceback :
/venv/src/django-pyodbc-azure/sql_server/pyodbc/base.pyc in
_set_autocommit(self, autocommit)
361 else:
362 self.connection.rollback()
--> 363 self.connection.autocommit = autocommit
364
365 def check_constraints(self, table_names=None):
Error: ('HY000', '[HY000] [FreeTDS][SQL Server]Could not change transaction status (0) (SQLSetConnectAttr)')
Does someone have an idea ?
The problem is fixed.
I remove the following line:
if not ModelName.objects.filter(pk=instance.pk)
My code :
#receiver(pre_save, sender=ModelName)
def model_name_pre_save(sender, instance, **kwargs):
if not ModelName.objects.filter(pk=instance.pk):
instance.field_name = value

Kafka-connect with sqlserver

These are commands which I am running:-
bin/zookeeper-server-start etc/kafka/zookeeper.properties &
bin/kafka-server-start etc/kafka/server.properties &
bin/schema-registry-start etc/schema-registry/schema-registry.properties &
bin/connect-standalone etc/schema-registry/connect-avro-standalone.properties etc/kafka-connect-jdbc/quickstart-sqlserver.properties &
bin/kafka-avro-console-consumer --new-consumer --bootstrap-server localhost:9094 --topic test3-sqlserver-jdbc-ErrorLog --from-beginning
I am trying to connect sqlserver using confluent platform(kafka-connect) and facing following issues:
When I am trying to connect to default schema i.e. dbo , connection is built but it is not able to fetch data into the kafka consumer. The connection details that I am using are:
name=test-sqlserver-jdbc-autoincrement
connector.class=io.confluent.connect.jdbc.JdbcSourceConnector
tasks.max=1
connection.url=jdbc:sqlserver://********:1433;database=AdventureWorks2012;user=****;password=****
mode=incrementing
incrementing.column.name=ErrorLogID
topic.prefix=test3-sqlserver-jdbc-
table.whitelist=ErrorLog
schema.registry=dbo
When I am trying to connect to any other schema, the producer is throwing error, connection details that i am using are :
name=test-sqlserver-jdbc-autoincrement
connector.class=io.confluent.connect.jdbc.JdbcSourceConnector
tasks.max=1
connection.url=jdbc:sqlserver://********:1433;database=AdventureWorks2012;user=****;password=****
mode=incrementing
incrementing.column.name=AddressID
topic.prefix=test3-sqlserver-jdbc-
table.whitelist=Address
schema.registry=Person
Error :
INFO Source task WorkerSourceTask{id=test-sqlserver-jdbc-autoincrement-0} finished
initialization and start (org.apache.kafka.connect.runtime.WorkerSourceTask:138)
[2017-03-07 17:55:47,041] ERROR Failed to run query for table
TimestampIncrementingTableQuerier{name='Address', query='null',
topicPrefix='test3-sqlserver-jdbc-', timestampColumn='null',
incrementingColumn='AddressID'}:
com.microsoft.sqlserver.jdbc.SQLServerException: Invalid object name 'Address'.
io.confluent.connect.jdbc.JdbcSourceTask:239)
[2017-03-07 17:55:52,124] ERROR Failed to run query for table
TimestampIncrementingTableQuerier{name='Address', query='null',
topicPrefix='test3-sqlserver-jdbc-', timestampColumn='null',
incrementingColumn='AddressID'}: com.microsoft.sqlserver.jdbc.SQLServerException:
Invalid object name 'Address'. (io.confluent.connect.jdbc.JdbcSourceTask:239)
[2017-03-07 17:55:53,684] INFO Reflections took 9299 ms to scan
262 urls, producing 12112 keys and 79402 values
(org.reflections.Reflections:229)
[2017-03-07 17:55:57,181] ERROR Failed to run query for table
TimestampIncrementingTableQuerier{name='Address', query='null',
topicPrefix='test3-sqlserver-jdbc-', timestampColumn='null',
incrementingColumn='AddressID'}:
com.microsoft.sqlserver.jdbc.SQLServerException: Invalid object name 'Address'.
(io.confluent.connect.jdbc.JdbcSourceTask:239)

Importing huge SQL file into SQL Server 2012

I have a database that is about 20 GB in size. I generated script for DB and content and now trying to import to different server. I googled and found such thing:
sqlcmd -S localhost -i C:\Users\Administrator\Downloads\SQL_backup.sql
While executing sqlcmd like this, the process starts but after some time I get an error :
Msg 105, Level 15, State 1, Server WIN-I79PRE6OQTV, Line 793
Unclosed quotation mark after the character string '
172551665 ......
So my question is - if I have generated script using Microsoft SQL Server Management Studio - why do I get such an error while importing the data?
How can I resolve this issue?
P.S the column that this error complains contains XML data stored as string and is very long string.
Is there any other backup/ restore way?
UPDATED
I ran - > dbcc checkdb('CreditInfoDB',REPAIR_ALLOW_DATA_LOSS)
and this is the result
DBCC results for 'CreditInfoDB'.
Service Broker Msg 9675, State 1: Message Types analyzed: 14.
Service Broker Msg 9676, State 1: Service Contracts analyzed: 6.
Service Broker Msg 9667, State 1: Services analyzed: 3.
Service Broker Msg 9668, State 1: Service Queues analyzed: 3.
Service Broker Msg 9669, State 1: Conversation Endpoints analyzed: 0.
Service Broker Msg 9674, State 1: Conversation Groups analyzed: 0.
Service Broker Msg 9670, State 1: Remote Service Bindings analyzed: 0.
Service Broker Msg 9605, State 1: Conversation Priorities analyzed: 0.
DBCC results for 'sys.sysrscols'.
There are 1092 rows in 14 pages for object "sys.sysrscols".
DBCC results for 'sys.sysrowsets'.
There are 147 rows in 3 pages for object "sys.sysrowsets".
DBCC results for 'sys.sysclones'.
There are 0 rows in 0 pages for object "sys.sysclones".
DBCC results for 'sys.sysallocunits'.
There are 172 rows in 2 pages for object "sys.sysallocunits".
DBCC results for 'sys.sysfiles1'.
There are 2 rows in 1 pages for object "sys.sysfiles1".
DBCC results for 'sys.sysseobjvalues'.
There are 0 rows in 0 pages for object "sys.sysseobjvalues".
DBCC results for 'sys.syspriorities'.
There are 0 rows in 0 pages for object "sys.syspriorities".
DBCC results for 'sys.sysdbfrag'.
There are 0 rows in 0 pages for object "sys.sysdbfrag".
DBCC results for 'sys.sysfgfrag'.
There are 0 rows in 0 pages for object "sys.sysfgfrag".
DBCC results for 'sys.sysdbfiles'.
There are 2 rows in 1 pages for object "sys.sysdbfiles".
DBCC results for 'sys.syspru'.
There are 0 rows in 0 pages for object "sys.syspru".
DBCC results for 'sys.sysbrickfiles'.
There are 0 rows in 0 pages for object "sys.sysbrickfiles".
DBCC results for 'sys.sysphfg'.
There are 1 rows in 1 pages for object "sys.sysphfg".
DBCC results for 'sys.sysprufiles'.
There are 2 rows in 1 pages for object "sys.sysprufiles".
DBCC results for 'sys.sysftinds'.
There are 0 rows in 0 pages for object "sys.sysftinds".
DBCC results for 'sys.sysowners'.
There are 14 rows in 1 pages for object "sys.sysowners".
DBCC results for 'sys.sysdbreg'.
There are 0 rows in 0 pages for object "sys.sysdbreg".
DBCC results for 'sys.sysprivs'.
There are 141 rows in 1 pages for object "sys.sysprivs".
DBCC results for 'sys.sysschobjs'.
There are 2271 rows in 52 pages for object "sys.sysschobjs".
DBCC results for 'sys.syscsrowgroups'.
There are 0 rows in 0 pages for object "sys.syscsrowgroups".
DBCC results for 'sys.sysexttables'.
There are 0 rows in 0 pages for object "sys.sysexttables".
DBCC results for 'sys.syscolpars'.
There are 890 rows in 14 pages for object "sys.syscolpars".
DBCC results for 'sys.sysxlgns'.
There are 0 rows in 0 pages for object "sys.sysxlgns".
DBCC results for 'sys.sysxsrvs'.
There are 0 rows in 0 pages for object "sys.sysxsrvs".
DBCC results for 'sys.sysnsobjs'.
There are 1 rows in 1 pages for object "sys.sysnsobjs".
DBCC results for 'sys.sysusermsgs'.
There are 0 rows in 0 pages for object "sys.sysusermsgs".
DBCC results for 'sys.syscerts'.
There are 0 rows in 0 pages for object "sys.syscerts".
DBCC results for 'sys.sysrmtlgns'.
There are 0 rows in 0 pages for object "sys.sysrmtlgns".
DBCC results for 'sys.syslnklgns'.
There are 0 rows in 0 pages for object "sys.syslnklgns".
DBCC results for 'sys.sysxprops'.
There are 0 rows in 0 pages for object "sys.sysxprops".
DBCC results for 'sys.sysscalartypes'.
There are 34 rows in 1 pages for object "sys.sysscalartypes".
DBCC results for 'sys.systypedsubobjs'.
There are 0 rows in 0 pages for object "sys.systypedsubobjs".
DBCC results for 'sys.sysidxstats'.
There are 227 rows in 4 pages for object "sys.sysidxstats".
DBCC results for 'sys.sysiscols'.
There are 419 rows in 2 pages for object "sys.sysiscols".
DBCC results for 'sys.sysendpts'.
There are 0 rows in 0 pages for object "sys.sysendpts".
DBCC results for 'sys.syswebmethods'.
There are 0 rows in 0 pages for object "sys.syswebmethods".
DBCC results for 'sys.sysbinobjs'.
There are 23 rows in 1 pages for object "sys.sysbinobjs".
DBCC results for 'sys.sysaudacts'.
There are 0 rows in 0 pages for object "sys.sysaudacts".
DBCC results for 'sys.sysobjvalues'.
There are 234 rows in 22 pages for object "sys.sysobjvalues".
DBCC results for 'sys.syscscolsegments'.
There are 0 rows in 0 pages for object "sys.syscscolsegments".
DBCC results for 'sys.syscsdictionaries'.
There are 0 rows in 0 pages for object "sys.syscsdictionaries".
DBCC results for 'sys.sysclsobjs'.
There are 16 rows in 1 pages for object "sys.sysclsobjs".
DBCC results for 'sys.sysrowsetrefs'.
There are 0 rows in 0 pages for object "sys.sysrowsetrefs".
DBCC results for 'sys.sysremsvcbinds'.
There are 0 rows in 0 pages for object "sys.sysremsvcbinds".
DBCC results for 'sys.sysxmitqueue'.
There are 0 rows in 0 pages for object "sys.sysxmitqueue".
DBCC results for 'sys.sysrts'.
There are 0 rows in 0 pages for object "sys.syscommittab".
DBCC results for 'sys.filetable_updates_2105058535'.
There are 0 rows in 0 pages for object "sys.filetable_updates_2105058535".
CHECKDB found 0 allocation errors and 0 consistency errors in database 'CreditInfoDB'.
DBCC execution completed. If DBCC printed error messages, contact your system administrator.
You can, and should, use ETL to backup to a file and import it to the new server. ETL is going to be way more effective than scripts for large data sets.
Microsoft provides SSIS to do this exact thing. You can export to a RAW file (don't go via CSV or XLSX option), and import it into the other server.
More likely your script file is being truncated at some point in the process. The parser have a file size limit (you are using multiple processes [create, load, execute, etc.]).
The best way to perform such task would be a database backup/restore.
Edit: Based on comment from OP, added information.
If the data is corrupted then it makes no difference what approach you take. And as far as wanting a new database, well; the idea is to restore as a New Database, not to override the old one.
Before taking the backup run an integrity check on the source database. After the backup; verify your backup media.
Have you tried to increase packet size and see if the error is gone or another error comes up?
sqlcmd -S localhost -a 32767 -i C:\Users\Administrator\Downloads\SQL_backup.sql
On top of running backup/restore you could also try just moving the database as is by either detaching the database and then reattaching it in it's new location or using the move database.
Both methods are covered on msdn Detach MsSQL database 2008 - 2016 and Move MsSQL database 2008 - 2016 (I wouldn't normally post links but this is direct from the official support site so should stand up for a few years)

how to check status of native ODBC connection in matlab?

Brief introduction of the problem:
the main problem is not in the connection procedure, i could connect to database successfully, and insert some rows in my database(firs code block shows this),but after closing the connection if someone tries to insert a row in the database ,matlab will terminate suddenly without any clear error message, (i expect to have a function to check if the connection is open or close or to get an error message to handle the error but non of these happened and just matlab closed because of a fatal error)
i wrote the following code to connect to MS SQL SERVER database in matlab:
conn=database.ODBCConnection('MS SQL SERVER','','');
insert(conn,'trace',{'obj_id','obj_type_id','time_step','pos_x','pos_y','vel_x','vel_y'},[1,1,1,0,0,0,0]);
close(conn);
and every thing was ok.
then i tried to insert another row (to check what is the error message) then Matlab closed (due to fatal error) without showing any error message.
i tried to use following functions to get status of database connection before inserting new raws:
isconnection(conn);
ping(conn);
but it says
Undefined function 'ping' for input arguments of type
'database.ODBCConnection'.
Undefined function 'isconnection' for input arguments of type
'database.ODBCConnection'
even i tried to use try-catch block but it didn't work and Matlab Closed for fatal error.
so i want to know is there any way to chek status of native ODBC to prevent sudden close of matlab in case of a closed connection??
Update:
>> conn=database.ODBCConnection('MS SQL SERVER','','')
conn =
ODBCConnection with properties:
Instance: 'MS SQL SERVER'
UserName: ''
Message: []
Handle: [1x1 database.internal.ODBCConnectHandle]
TimeOut: 0
AutoCommit: 0
Type: 'ODBCConnection Object'
>> close(conn)
>> conn
conn =
ODBCConnection with properties:
Instance: 'MS SQL SERVER'
UserName: ''
Message: []
Handle: [1x1 database.internal.ODBCConnectHandle]
TimeOut: 0
AutoCommit: 0
Type: 'ODBCConnection Object'
no properties or message changed before and after closing the connection,
the problem is that i don't know how to check that if a connection is still open or closed in other parts of a program!
in this case if i use an insert command when a connection was closed before,
matlab suddenly terminates (and show the message MATLAB(R2013B) has stopped working),
so i want to know is there any way to check if a native odbc connection has closed before?
Further update
>> conn=database('MS SQL SERVER','','')
conn =
Instance: 'MS SQL SERVER'
UserName: ''
Driver: []
URL: []
Constructor: [1x1 com.mathworks.toolbox.database.databaseConnect]
Message: []
Handle: [1x1 sun.jdbc.odbc.JdbcOdbcConnection]
TimeOut: 0
AutoCommit: 'on'
Type: 'Database Object'
>> isconnection(conn)
ans =
1
>> close(conn)
>> isconnection(conn)
ans =
0
i mean a function like "isconnection" in the example above for jdbc connection which returns 1 if a connection is open and 0 if the connection closed before.
I request you to check the database connection with toolstrip functionality of Matlab. You can find complete guide from here...
You can perform the testing first so that you can ruled out of any problem with server..
Once it is connected successfully..you can check the code.connection settings and apply it in your code accordingly.
Regards,
As per the documentation you can check status of an existing database.ODBCConnection or database.ODBCCursor in the Database Toolbox by checking the value of the Message property in the database.ODBCConnection object and the database.ODBCCursor Object.
You may need to set Error handling to store using setdbprefs('ErrorHandling','store'). Use setdbprefs('ErrorHandling','report') to switch it back again.
ping and isconnection only work on database connection object and not on database.ODBCConnection objects.

import dmp file into a new install of oracle xe

I'm trying to import a *.dmp file from the database of a client into a new install of Oracle XE 11.2.0.
I'm new to Oracle DB, I always used MySQL, so I have searched the forum and used the command from cmd
C:\oraclexe\app\oracle\product\11.2.0\server\bin>imp 'system/root AS SYSDBA' file=c:\export.dmp full=yes log=implog.txt
with no luck.
The implog.txt is as follows:
Connected to: Oracle Database 11g Express Edition Release 11.2.0.2.0 - Production
Export file created by EXPORT:V09.02.00 via conventional path
import done in WE8MSWIN1252 character set and AL16UTF16 NCHAR character set
import server uses AL32UTF8 character set (possible charset conversion)
export client uses UTF8 character set (possible charset conversion)
. importing SYSTEM's objects into SYSTEM
IMP-00015: following statement failed because the object already exists:
"CREATE UNDO TABLESPACE "UNDOTBS1" BLOCKSIZE 8192 DATAFILE '/home/app/oracl"
"e/oradata/ANA/undotbs01.dbf' SIZE 2000M AUTOEXTEND ON NEXT 5242880 M"
"AXSIZE 32767M EXTENT MANAGEMENT LOCAL "
IMP-00015: following statement failed because the object already exists:
"CREATE TEMPORARY TABLESPACE "TEMP" BLOCKSIZE 8192 TEMPFILE '/home2/oradata"
"/ANA/temp01.dbf' SIZE 2916M AUTOEXTEND ON NEXT 655360 MAXSIZE 32767M"
" EXTENT MANAGEMENT LOCAL UNIFORM SIZE 1048576"
IMP-00017: following statement failed with ORACLE error 1119:
"CREATE TABLESPACE "INDX" BLOCKSIZE 8192 DATAFILE '/home/app/oracle/oradata"
"/ANA/indx01.dbf' SIZE 1048576 AUTOEXTEND ON NEXT 1310720 MAXSIZE 327"
"67M EXTENT MANAGEMENT LOCAL AUTOALLOCATE ONLINE PERMANENT NOLOGGING SEGM"
"ENT SPACE MANAGEMENT AUTO"
IMP-00003: ORACLE error 1119 encountered
ORA-01119: error in creating database file '/home/app/oracle/oradata/ANA/indx01.dbf'
ORA-27040: file create error, unable to create file
OSD-04002: unable to open file
O/S-Error: (OS 3) Impossibile trovare il percorso specificato.
IMP-00017: following statement failed with ORACLE error 1119:
"CREATE TABLESPACE "TOOLS" BLOCKSIZE 8192 DATAFILE '/home/app/oracle/oradat"
"a/ANA/tools01.dbf' SIZE 209715200 AUTOEXTEND ON NEXT 327680 MAXSIZE "
"32767M EXTENT MANAGEMENT LOCAL AUTOALLOCATE ONLINE PERMANENT NOLOGGING S"
"EGMENT SPACE MANAGEMENT AUTO"
IMP-00003: ORACLE error 1119 encountered
ORA-01119: error in creating database file '/home/app/oracle/oradata/ANA/tools01.dbf'
ORA-27040: file create error, unable to create file
OSD-04002: unable to open file
O/S-Error: (OS 3) Impossibile trovare il percorso specificato.
IMP-00015: following statement failed because the object already exists:
"CREATE TABLESPACE "USERS" BLOCKSIZE 8192 DATAFILE '/home/app/oracle/oradat"
"a/ANA/users01.dbf' SIZE 1048576 AUTOEXTEND ON NEXT 1310720 MAXSIZE 3"
"2767M EXTENT MANAGEMENT LOCAL AUTOALLOCATE ONLINE PERMANENT NOLOGGING SE"
"GMENT SPACE MANAGEMENT AUTO"
IMP-00017: following statement failed with ORACLE error 1119:
"CREATE TABLESPACE "XDB" BLOCKSIZE 8192 DATAFILE '/home/app/oracle/oradata/"
"ANA/xdb01.dbf' SIZE 209715200 AUTOEXTEND ON NEXT 655360 MAXSIZE 3276"
"7M EXTENT MANAGEMENT LOCAL AUTOALLOCATE ONLINE PERMANENT NOLOGGING SEGME"
"NT SPACE MANAGEMENT AUTO"
IMP-00003: ORACLE error 1119 encountered
ORA-01119: error in creating database file '/home/app/oracle/oradata/ANA/xdb01.dbf'
ORA-27040: file create error, unable to create file
OSD-04002: unable to open file
O/S-Error: (OS 3) Impossibile trovare il percorso specificato.
IMP-00017: following statement failed with ORACLE error 1119:
"CREATE TABLESPACE "A00" BLOCKSIZE 8192 DATAFILE '/home2/oradata/A/a00.dbf'"
" SIZE 1048576000 EXTENT MANAGEMENT LOCAL AUTOALLOCATE ONLINE PERMAN"
"ENT NOLOGGING"
IMP-00003: ORACLE error 1119 encountered
ORA-01119: error in creating database file '/home2/oradata/A/a00.dbf'
ORA-27040: file create error, unable to create file
OSD-04002: unable to open file
O/S-Error: (OS 3) Impossibile trovare il percorso specificato.
IMP-00017: following statement failed with ORACLE error 1119:
"CREATE TABLESPACE "D00" BLOCKSIZE 8192 DATAFILE '/home2/oradata/A/d00.dbf'"
" SIZE 5000M EXTENT MANAGEMENT LOCAL AUTOALLOCATE ONLINE PERMANENT "
"NOLOGGING"
IMP-00003: ORACLE error 1119 encountered
ORA-01119: error in creating database file '/home2/oradata/A/d00.dbf'
ORA-27040: file create error, unable to create file
OSD-04002: unable to open file
O/S-Error: (OS 3) Impossibile trovare il percorso specificato.
IMP-00015: following statement failed because the object already exists:
"CREATE USER "OUTLN" IDENTIFIED BY VALUES '4A3BA55E08595C81' TEMPORARY TABLE"
"SPACE "TEMP" PASSWORD EXPIRE ACCOUNT LOCK"
IMP-00015: following statement failed because the object already exists:
"CREATE USER "ANONYMOUS" IDENTIFIED BY VALUES 'anonymous' DEFAULT TABLESPACE"
" "XDB" TEMPORARY TABLESPACE "TEMP" PASSWORD EXPIRE ACCOUNT LOCK"
IMP-00017: following statement failed with ORACLE error 959:
"CREATE USER "A00" IDENTIFIED BY VALUES 'DB7EF8D464FCEC4D' DEFAULT TABLESPAC"
"E "A00" TEMPORARY TABLESPACE "TEMP""
IMP-00003: ORACLE error 959 encountered
ORA-00959: tablespace 'A00' does not exist
IMP-00017: following statement failed with ORACLE error 959:
"CREATE USER "D00" IDENTIFIED BY VALUES '546A075B8012922B' DEFAULT TABLESPAC"
"E "D00" TEMPORARY TABLESPACE "TEMP""
IMP-00003: ORACLE error 959 encountered
ORA-00959: tablespace 'D00' does not exist
IMP-00015: following statement failed because the object already exists:
"CREATE ROLE "SELECT_CATALOG_ROLE""
IMP-00015: following statement failed because the object already exists:
"REVOKE "SELECT_CATALOG_ROLE" FROM SYSTEM"
IMP-00015: following statement failed because the object already exists:
"CREATE ROLE "EXECUTE_CATALOG_ROLE""
IMP-00015: following statement failed because the object already exists:
"REVOKE "EXECUTE_CATALOG_ROLE" FROM SYSTEM"
IMP-00015: following statement failed because the object already exists:
"CREATE ROLE "DELETE_CATALOG_ROLE""
IMP-00015: following statement failed because the object already exists:
"REVOKE "DELETE_CATALOG_ROLE" FROM SYSTEM"
IMP-00015: following statement failed because the object already exists:
"CREATE ROLE "RECOVERY_CATALOG_OWNER""
IMP-00015: following statement failed because the object already exists:
"REVOKE "RECOVERY_CATALOG_OWNER" FROM SYSTEM"
IMP-00015: following statement failed because the object already exists:
"CREATE ROLE "GATHER_SYSTEM_STATISTICS""
IMP-00015: following statement failed because the object already exists:
"REVOKE "GATHER_SYSTEM_STATISTICS" FROM SYSTEM"
IMP-00015: following statement failed because the object already exists:
"CREATE ROLE "LOGSTDBY_ADMINISTRATOR""
IMP-00015: following statement failed because the object already exists:
"REVOKE "LOGSTDBY_ADMINISTRATOR" FROM SYSTEM"
IMP-00015: following statement failed because the object already exists:
"CREATE ROLE "AQ_ADMINISTRATOR_ROLE""
IMP-00015: following statement failed because the object already exists:
"CREATE ROLE "AQ_USER_ROLE""
IMP-00015: following statement failed because the object already exists:
"REVOKE "AQ_USER_ROLE" FROM SYSTEM"
IMP-00017: following statement failed with ORACLE error 439:
"CREATE ROLE "GLOBAL_AQ_USER_ROLE" IDENTIFIED GLOBALLY "
IMP-00003: ORACLE error 439 encountered
ORA-00439: feature not enabled: Enterprise User Security
IMP-00015: following statement failed because the object already exists:
"CREATE ROLE "OEM_MONITOR""
IMP-00015: following statement failed because the object already exists:
"REVOKE "OEM_MONITOR" FROM SYSTEM"
IMP-00015: following statement failed because the object already exists:
"CREATE ROLE "HS_ADMIN_ROLE""
IMP-00015: following statement failed because the object already exists:
"REVOKE "HS_ADMIN_ROLE" FROM SYSTEM"
IMP-00015: following statement failed because the object already exists:
"CREATE ROLE "XDBADMIN""
IMP-00015: following statement failed because the object already exists:
"REVOKE "XDBADMIN" FROM SYSTEM"
IMP-00015: following statement failed because the object already exists:
"CREATE ROLE "AUTHENTICATEDUSER""
IMP-00015: following statement failed because the object already exists:
"REVOKE "AUTHENTICATEDUSER" FROM SYSTEM"
IMP-00017: following statement failed with ORACLE error 1917:
"GRANT UNLIMITED TABLESPACE TO "A00""
IMP-00003: ORACLE error 1917 encountered
ORA-01917: user or role 'A00' does not exist
IMP-00017: following statement failed with ORACLE error 1917:
"GRANT CREATE PROCEDURE TO "D00""
IMP-00003: ORACLE error 1917 encountered
ORA-01917: user or role 'D00' does not exist
IMP-00017: following statement failed with ORACLE error 1917:
"GRANT EXECUTE ANY PROCEDURE TO "D00""
IMP-00003: ORACLE error 1917 encountered
ORA-01917: user or role 'D00' does not exist
IMP-00017: following statement failed with ORACLE error 1917:
"GRANT CREATE TRIGGER TO "D00""
IMP-00003: ORACLE error 1917 encountered
ORA-01917: user or role 'D00' does not exist
IMP-00017: following statement failed with ORACLE error 1917:
"GRANT CREATE SNAPSHOT TO "D00""
IMP-00003: ORACLE error 1917 encountered
ORA-01917: user or role 'D00' does not exist
IMP-00017: following statement failed with ORACLE error 1917:
"GRANT CREATE TYPE TO "D00""
IMP-00003: ORACLE error 1917 encountered
ORA-01917: user or role 'D00' does not exist
IMP-00017: following statement failed with ORACLE error 1917:
"GRANT "CONNECT" TO "A00""
IMP-00003: ORACLE error 1917 encountered
ORA-01917: user or role 'A00' does not exist
IMP-00017: following statement failed with ORACLE error 1917:
"GRANT "DBA" TO "A00""
IMP-00003: ORACLE error 1917 encountered
ORA-01917: user or role 'A00' does not exist
IMP-00017: following statement failed with ORACLE error 1917:
"GRANT "CONNECT" TO "D00""
IMP-00003: ORACLE error 1917 encountered
ORA-01917: user or role 'D00' does not exist
IMP-00017: following statement failed with ORACLE error 1918:
"ALTER USER "D00" DEFAULT ROLE ALL"
IMP-00003: ORACLE error 1918 encountered
ORA-01918: user 'D00' does not exist
IMP-00017: following statement failed with ORACLE error 1918:
"ALTER USER "A00" DEFAULT ROLE ALL"
IMP-00003: ORACLE error 1918 encountered
ORA-01918: user 'A00' does not exist
IMP-00017: following statement failed with ORACLE error 1918:
"ALTER USER "A00" QUOTA UNLIMITED ON "TEMP" QUOTA UNLIMITED ON "A00""
IMP-00003: ORACLE error 1918 encountered
ORA-01918: user 'A00' does not exist
IMP-00017: following statement failed with ORACLE error 1918:
"ALTER USER "D00" QUOTA UNLIMITED ON "TEMP" QUOTA UNLIMITED ON "D00""
IMP-00003: ORACLE error 1918 encountered
ORA-01918: user 'D00' does not exist
IMP-00015: following statement failed because the object already exists:
"CREATE SEQUENCE "MVIEW$_ADVSEQ_GENERIC" MINVALUE 1 MAXVALUE 4294967295 INCR"
"EMENT BY 1 START WITH 1 CACHE 50 NOORDER NOCYCLE"
IMP-00015: following statement failed because the object already exists:
"CREATE SEQUENCE "MVIEW$_ADVSEQ_ID" MINVALUE 1 MAXVALUE 4294967295 INCREMENT"
" BY 1 START WITH 1 CACHE 20 NOORDER NOCYCLE"
IMP-00015: following statement failed because the object already exists:
"CREATE SEQUENCE "LOGMNR_SEQ$" MINVALUE 1 MAXVALUE 9999999999999999999999999"
"99 INCREMENT BY 1 START WITH 1 CACHE 20 ORDER NOCYCLE"
IMP-00015: following statement failed because the object already exists:
"CREATE SEQUENCE "LOGMNR_UIDS$" MINVALUE 1 MAXVALUE 999999999999999999999999"
"999 INCREMENT BY 1 START WITH 100 CACHE 20 ORDER NOCYCLE"
IMP-00015: following statement failed because the object already exists:
"CREATE SEQUENCE "REPCAT$_FLAVORS_S" MINVALUE -2147483647 MAXVALUE 214748364"
"7 INCREMENT BY 1 START WITH 1 NOCACHE NOORDER NOCYCLE"
IMP-00015: following statement failed because the object already exists:
"CREATE SEQUENCE "REPCAT$_FLAVOR_NAME_S" MINVALUE 1 MAXVALUE 999999999999999"
"999999999999 INCREMENT BY 1 START WITH 1 NOCACHE NOORDER NOCYCLE"
IMP-00015: following statement failed because the object already exists:
"CREATE SEQUENCE "REPCAT$_REPPROP_KEY" MINVALUE 1 MAXVALUE 99999999999999999"
"9999999999 INCREMENT BY 1 START WITH 1 CACHE 20 NOORDER NOCYCLE"
IMP-00015: following statement failed because the object already exists:
"CREATE SEQUENCE "REPCAT_LOG_SEQUENCE" MINVALUE 1 MAXVALUE 99999999999999999"
"9999999999 INCREMENT BY 1 START WITH 1 CACHE 20 NOORDER NOCYCLE"
IMP-00015: following statement failed because the object already exists:
"CREATE SEQUENCE "REPCAT$_REFRESH_TEMPLATES_S" MINVALUE 1 MAXVALUE 999999999"
"999999999999999999 INCREMENT BY 1 START WITH 1 CACHE 20 NOORDER NOCYCLE"
IMP-00015: following statement failed because the object already exists:
"CREATE SEQUENCE "REPCAT$_USER_AUTHORIZATIONS_S" MINVALUE 1 MAXVALUE 9999999"
"99999999999999999999 INCREMENT BY 1 START WITH 1 CACHE 20 NOORDER NOCYCLE"
IMP-00015: following statement failed because the object already exists:
"CREATE SEQUENCE "REPCAT$_TEMPLATE_REFGROUPS_S" MINVALUE 1 MAXVALUE 99999999"
"9999999999999999999 INCREMENT BY 1 START WITH 1 CACHE 20 NOORDER NOCYCLE"
IMP-00015: following statement failed because the object already exists:
"CREATE SEQUENCE "REPCAT$_TEMPLATE_OBJECTS_S" MINVALUE 1 MAXVALUE 9999999999"
"99999999999999999 INCREMENT BY 1 START WITH 1 CACHE 20 NOORDER NOCYCLE"
IMP-00015: following statement failed because the object already exists:
"CREATE SEQUENCE "REPCAT$_TEMPLATE_PARMS_S" MINVALUE 1 MAXVALUE 999999999999"
"999999999999999 INCREMENT BY 1 START WITH 1 CACHE 20 NOORDER NOCYCLE"
IMP-00015: following statement failed because the object already exists:
"CREATE SEQUENCE "REPCAT$_USER_PARM_VALUES_S" MINVALUE 1 MAXVALUE 9999999999"
"99999999999999999 INCREMENT BY 1 START WITH 1 CACHE 20 NOORDER NOCYCLE"
IMP-00015: following statement failed because the object already exists:
"CREATE SEQUENCE "REPCAT$_TEMPLATE_SITES_S" MINVALUE 1 MAXVALUE 999999999999"
"999999999999999 INCREMENT BY 1 START WITH 1 CACHE 20 NOORDER NOCYCLE"
IMP-00015: following statement failed because the object already exists:
"CREATE SEQUENCE "REPCAT$_TEMP_OUTPUT_S" MINVALUE 1 MAXVALUE 999999999999999"
"999999999999 INCREMENT BY 1 START WITH 1 CACHE 20 NOORDER NOCYCLE"
IMP-00015: following statement failed because the object already exists:
"CREATE SEQUENCE "REPCAT$_RUNTIME_PARMS_S" MINVALUE 1 MAXVALUE 9999999999999"
"99999999999999 INCREMENT BY 1 START WITH 1 CACHE 20 NOORDER NOCYCLE"
IMP-00015: following statement failed because the object already exists:
"CREATE SEQUENCE "TEMPLATE$_TARGETS_S" MINVALUE 1 MAXVALUE 99999999999999999"
"9999999999 INCREMENT BY 1 START WITH 1 CACHE 20 NOORDER NOCYCLE"
IMP-00015: following statement failed because the object already exists:
"CREATE SEQUENCE "REPCAT$_EXCEPTIONS_S" MINVALUE 1 MAXVALUE 9999999999999999"
"99999999999 INCREMENT BY 1 START WITH 1 CACHE 20 NOORDER NOCYCLE"
. importing WMSYS's objects into WMSYS
. importing A00's objects into A00
"ALTER SESSION SET CURRENT_SCHEMA= "A00""
IMP-00003: ORACLE error 1435 encountered
ORA-01435: user does not exist
IMP-00000: Import terminated unsuccessfully
Now what I'm reading is:
-the script removes all privileges to user SYSTEM but even though the import fails, after I execute the import I'm no longer able to log in as SYSTEM
-I'm trying to import the *.dmp on a Windows XP 32bit virtual machine, and I think the export has been created on a Windows Vista machine (don't know x86 or x64), but what I'm not understanding is where in the log says "error in creating database file '/home/app/oracle/oradata/ANA/indx01.dbf'". Here it seems a unix path...
-almost everywhere Oracle says it can't create users/tables/indexes because they already exist.. This is a fresh install, or at least it was when I first tried importing. After the first fail I tried to log in as SYSTEM, couldn't so I deleted Oracle XE and reinstalled from scratch, so I think it's a fresh install. Am I doing something wrong? Is there a way to recreate SYSTEM privileges without deleting and reinstalling everything?
Thank you in advance for your help
EDIT: just received the export log, I've omitted the tables names:
Connected to: Oracle9i Enterprise Edition Release 9.2.0.8.0 - Production
JServer Release 9.2.0.8.0 - Production
Export done in UTF8 character set and AL16UTF16 NCHAR character set
About to export the entire database ...
. exporting tablespace definitions
. exporting profiles
. exporting user definitions
. exporting roles
. exporting resource costs
. exporting rollback segment definitions
. exporting database links
. exporting sequence numbers
. exporting directory aliases
. exporting context namespaces
. exporting foreign function library names
. exporting PUBLIC type synonyms
. exporting private type synonyms
. exporting object type definitions
. exporting system procedural objects and actions
. exporting pre-schema procedural objects and actions
. exporting cluster definitions
. about to export SYSTEM's tables via Conventional Path ...
. about to export OUTLN's tables via Conventional Path ...
. about to export DBSNMP's tables via Conventional Path ...
. about to export WMSYS's tables via Conventional Path ...
. about to export ANONYMOUS's tables via Conventional Path ...
. about to export A00's tables via Conventional Path ...
. about to export D00's tables via Conventional Path ...
. exporting synonyms
. exporting views
. exporting referential integrity constraints
. exporting stored procedures
. exporting operators
. exporting indextypes
. exporting bitmap, functional and extensible indexes
. exporting posttables actions
. exporting triggers
. exporting materialized views
. exporting snapshot logs
. exporting job queues
. exporting refresh groups and children
. exporting dimensions
. exporting post-schema procedural objects and actions
. exporting user history table
. exporting default and system auditing options
. exporting statistics
Export terminated successfully without warnings.
To identify which tablespaces you need to create, you need to find out which tables and indexes are needed, and then see which tablespaces those are built against. The first thing you need to find out is which schemas (users) you need to recreate. From the export log that looks like A00, D00 or both.
You can get the DDL for the tables and indexes, which will include the tablespaces they are built in - by running imp with the INDEXFILE parameter, something like:
imp 'system/root AS SYSDBA' file=c:\export.dmp full=n rows=n fromuser=A00 touser=A00 indexfile=c:\indexfile.sql
This will give you a text file with the DDL for the tables and indexes, but with the table creation commands commented out with rem. You can view that file in notepad or some other text editor, and search for all the TABLESPACE references. You just need all the distinct values. In your case it may be that all the A00-owned objects are in the A00 tablespace, but you'll need to check.
Once you have that information the you can manually create the tablespace(s) you've identified in your new database with the same name(s). You will also need to create the user you're importing to, and make sure it can create objects; in your original import log you have quota unlimited set for A00 on tablespace A00, for example, but also look at the grant commands it was attempting.
Once they are built you can run the import again as:
imp 'system/root AS SYSDBA' file=c:\export.dmp full=n rows=y fromuser=A00 touser=A00 log=import.log
The tables, indexes etc. should then build OK, and the data will be imported into them.
You should read up on the import command and parameters to understand what these examples will do, and to decide if any others are needed to modify how the import behaves, based on what your end goal is.
Maybe this export is from a Linux machine ? Because the path of the tablespace: '/home/app/oracle/oradata/*' seems incorrect in a Windows machine. You can create first the tablespaces and import the dmp after. Just a thought.
Try the following steps:
Create Tablespace TOOLS manually
Use FROM_USER/TO_USER parameters in imp to import only this user's schema data.
Importing SYSTEM and other tablespaces from Oracle 9 to Oracle 11 will break a lot of system related tables/objects that live in that tablespace.
open command prompt (here GLOBAL is username and password)
import 11g files only to 11g DB and 10g files only to 10g.
> IMP GLOBAL/GLOBAL
password:global
it will give some error ORA-0107
again it will ask for logon username:GLOBAL
Password:global
Import Data Only (yes/no):no
Import file:EXPDAT.DMP > C:\Downloads\global_tables.dmp (location of dump file)
Enter insert buffer size (minimum is 8192) 30720>
30720
List contents of import file only (yes/no): no >
no
Ignore create error due to object existence (yes/no): no >
no
Import grants (yes/no): yes >
yes
Import table data (yes/no): yes >
yes
Import entire export file (yes/no): no >
yes

Resources