Antichat снова доступен.
Форум Antichat (Античат) возвращается и снова открыт для пользователей.
Здесь обсуждаются безопасность, программирование, технологии и многое другое.
Сообщество снова собирается вместе.
Новый адрес: forum.antichat.xyz
 |
|

13.08.2007, 16:16
|
|
Познающий
Регистрация: 08.09.2005
Сообщений: 38
Провел на форуме: 324316
Репутация:
44
|
|
мда чето не сложилось,
вобщем мои ход действий таков,
сделал экспорт с главного сервера,
Код:
Connected to: Oracle8i Enterprise Edition Release 8.1.7.0.0 - Production
With the Partitioning option
JServer Release 8.1.7.0.0 - Production
Export done in CL8MSWIN1251 character set and CL8MSWIN1251 NCHAR character set
About to export specified users ...
. exporting pre-schema procedural objects and actions
. exporting foreign function library names for user DB_ARH
. exporting object type definitions for user DB_ARH
About to export DB_ARH's objects ...
. exporting database links
. exporting sequence numbers
. exporting cluster definitions
. about to export DB_ARH's tables via Conventional Path ...
. . exporting table ADD_FIELD_DATA 0 rows exported
. . exporting table ADD_FIELD_LIST 0 rows exported
. . exporting table AFFILIATE 0 rows exported
. . exporting table APPLY 6700 rows exported
. . exporting table APPLY_INV 94 rows exported
. . exporting table A_CONTROL 0 rows exported
. . exporting table A_DATA_SOURCE 6 rows exported
. . exporting table A_FIELD 1450 rows exported
. . exporting table A_JOB 0 rows exported
. . exporting table A_JOB_STATUS 0 rows exported
. . exporting table A_LOG 1076 rows exported
. . exporting table A_MODIFY_LOG 1757 rows exported
. . exporting table A_PROFILE 732 rows exported
. . exporting table A_SCRIPT 0 rows exported
. . exporting table A_SCRIPT_BODY 0 rows exported
. . exporting table A_SERVER_INSTANCE 1 rows exported
. . exporting table A_TABLE 57 rows exported
. . exporting table A_TABLE_SEQ 61 rows exported
. . exporting table A_VERSION 1 rows exported
. . exporting table BANK 4499 rows exported
. . exporting table BILL 12 rows exported
. . exporting table BRUNCH_RTI 91 rows exported
. . exporting table BSO_LCARD 4259 rows exported
. . exporting table BSO_LIC 149 rows exported
. . exporting table CAR 14681 rows exported
. . exporting table DOC 691 rows exported
. . exporting table DOC_BODY 1472 rows exported
. . exporting table DOC_BODY_ARCHIVE 0 rows exported
. . exporting table DOC_BOOKMARK 0 rows exported
. . exporting table DOC_CELL 0 rows exported
. . exporting table DOC_ITEM 1553 rows exported
. . exporting table DOC_MODEL 109 rows exported
. . exporting table DUPLICATE 0 rows exported
. . exporting table HISTORY_LCARD 49305 rows exported
. . exporting table HISTORY_LIC 12318 rows exported
. . exporting table H_APPLY_TYPE 12 rows exported
. . exporting table H_CAR_TYPE 35 rows exported
. . exporting table H_DOC_ITEM_TYPE 12 rows exported
. . exporting table H_FS 33 rows exported
. . exporting table H_INV_DOC 30 rows exported
. . exporting table H_LEVEL 14 rows exported
. . exporting table H_LIC_ACTIVITY 22 rows exported
. . exporting table H_LINK_APPLY_ACTIV 51 rows exported
. . exporting table H_LINK_APPLY_TOVAR 18 rows exported
. . exporting table H_OKVED 1 rows exported
. . exporting table H_OPF 39 rows exported
. . exporting table H_PERSONAL_CATEGORY 14 rows exported
. . exporting table H_PRIVELEGES 6 rows exported
. . exporting table H_STATUS 17 rows exported
. . exporting table H_TOVAR 10 rows exported
. . exporting table LCARD 25836 rows exported
. . exporting table LIC 6480 rows exported
. . exporting table LINK_APPLY_DOC 625 rows exported
. . exporting table LINK_APPLY_LCARD 667 rows exported
. . exporting table LINK_LIC_ACTIV_CAR 10441 rows exported
. . exporting table LINK_TABLE_FIELD 0 rows exported
. . exporting table LINK_USERS_ORG_UNIT 0 rows exported
. . exporting table LINK_USER_CONTROL 0 rows exported
. . exporting table MESSAGE 10 rows exported
. . exporting table MODEL_ITEM 828 rows exported
. . exporting table ORG_UNIT 2869 rows exported
. . exporting table PLANT 5756 rows exported
. . exporting table PLANT_CAR 14679 rows exported
. . exporting table PLANT_PERSON 147 rows exported
. . exporting table PLANT_TEMP 11394 rows exported
. . exporting table ROAD_EVENTS 108 rows exported
. . exporting table SCHET 112 rows exported
. . exporting table SCHET_DETAIL 219 rows exported
. . exporting table SERVER_LIST 0 rows exported
. . exporting table SQL_SCRIPT 0 rows exported
. . exporting table USERS 27 rows exported
. . exporting table USER_ACCESS 0 rows exported
. . exporting table V_PLANT_DIR 1 rows exported
. exporting synonyms
. exporting views
. exporting stored procedures
. exporting operators
. exporting referential integrity constraints
. exporting triggers
. exporting indextypes
. exporting bitmap, functional and extensible indexes
. exporting posttables actions
. exporting snapshots
. exporting snapshot logs
. exporting job queues
. exporting refresh groups and children
. exporting dimensions
. exporting post-schema procedural objects and actions
. exporting statistics
Export terminated successfully without warnings.
Далее взял комп (тестовая машина) на которой стояла база месячной давности и залил туда дамп через import.cmd
Код:
IMP-00058: ORACLE error 1017 encountered
ORA-01017: invalid username/password; logon deniedUsername:
IMP-00058: ORACLE error 1017 encountered
ORA-01017: invalid username/password; logon deniedUsername:
IMP-00058: ORACLE error 1017 encountered
ORA-01017: invalid username/password; logon denied
IMP-00005: all allowable logon attempts failed
IMP-00000: Import terminated unsuccessfully
как видно из лога он ругается на пользователя, как результат база пустая и пользователей нет.
дальше воспользовался своим батником (из первого поста) для импорта базы и все стало ок =)
кстати как вариант у меня сеичас идея хоть и глупая и ламерская до безобразия но она работает,
сначало запускаю import.cmd он бахает все а потом запускаю батник из первого поста и вуаля все готова =)
P.s. это не вариант а временное решение =)
тут лежат логи
http://slil.ru/24731693
Последний раз редактировалось MegaZLO; 13.08.2007 в 16:26..
|
|
|

13.08.2007, 17:00
|
|
Познавший АНТИЧАТ
Регистрация: 12.05.2007
Сообщений: 1,235
Провел на форуме: 2238549
Репутация:
1318
|
|
Ну что же... Давайте разберём ситуацию... Экспорт прошёл нормально, без всяких проблем... Проблемы возникли на шаге импорта... Причём походу на стадии инициализации схемы DB_ARH, т.е. при выполнении команды (в import.cmd):
sqlplus "/ as sysdba" @recreate_schema.sql >> db_arh_import.log
В чём причина? Однозначно ответить не могу, дело в том, что вызов sqlplus "/ as sysdba" возможен только из под той, учётной записи, которой устанавливался Oracle. Если у вас нету возможности зайти под ней, попробуйте заменить этот вызов на
sqlplus sys/change_on_install@rtidb @recreate_schema.sql >> db_arh_import.log
Это должно сработать...
|
|
|

14.08.2007, 09:22
|
|
Познающий
Регистрация: 08.09.2005
Сообщений: 38
Провел на форуме: 324316
Репутация:
44
|
|
ага именно sys change_on_intall
спасибо седня проверю
|
|
|

14.08.2007, 10:18
|
|
Познающий
Регистрация: 08.09.2005
Сообщений: 38
Провел на форуме: 324316
Репутация:
44
|
|
вот лог
Код:
IMP-00058: ORACLE error 1017 encountered
ORA-01017: invalid username/password; logon deniedUsername:
Connected to: Oracle8i Enterprise Edition Release 8.1.7.0.0 - Production
With the Partitioning option
JServer Release 8.1.7.0.0 - Production
Export file created by EXPORT:V08.01.07 via conventional path
Warning: the objects were exported by DB_ARH, not by you
import done in CL8MSWIN1251 character set and CL8MSWIN1251 NCHAR character set
. importing DB_ARH's objects into DB_ARH
IMP-00017: following statement failed with ORACLE error 1435:
"ALTER SCHEMA = "DB_ARH""
IMP-00003: ORACLE error 1435 encountered
ORA-01435: user does not exist
далее строчки повторяются дофига раз
Import terminated successfully with warnings.
вот сам батник
Код:
@echo off
cls
echo.
echo ----------------------------------------------------------------------
echo Copyright (C): 2007, DaMaGeLaB, groundhog mailto:groundhog@cccp.su
echo Special realize for MegaZLO
echo ----------------------------------------------------------------------
echo.
echo Today is [%date%]
echo.
echo Ready to import schema 'DB_ARH'. Schema 'DB_ARH' about to be dropped...
set /p temp=Press ENTER to continue or CTRL+C to exit...
echo.
echo Recreating schema 'DB_ARH'...
@sqlplus sys/change_on_install@rtidb @recreate_schema.sql >> db_arh_import.log
echo.
echo Ready to import data to schema 'DB_ARH'...
set /p temp=Press ENTER to continue or CTRL+C to exit...
echo.
echo Importing data to schema 'DB_ARH'...
@imp userid=db_arh/1@rtidb file=db_arh.dmp fromuser=db_arh touser=db_arh log=db_arh_import.log
echo.
echo ----------------------------------------------------------------------
echo [!] Import done. See log file for errors and additional information.
echo ----------------------------------------------------------------------
echo.
set /p temp=Press ENTER to continue...
echo.
может мне кажется все дело в запросах из фаиила recreate_schema.sql
как вариант запихать в него это
Код:
DROP USER db_arh;
CREATE USER db_arh IDENTIFIED BY "1"
DEFAULT TABLESPACE USERS
QUOTA UNLIMITED ON USERS QUOTA UNLIMITED ON TEMP;
GRANT CREATE ANY TABLE TO db_arh;
GRANT DELETE ANY TABLE TO db_arh;
GRANT DROP ANY TABLE TO db_arh;
GRANT INSERT ANY TABLE TO db_arh;
GRANT SELECT ANY SEQUENCE TO db_arh;
GRANT SELECT ANY TABLE TO db_arh;
GRANT UNLIMITED TABLESPACE TO db_arh;
GRANT UPDATE ANY TABLE TO db_arh;
GRANT "DBA" TO db_arh;
GRANT "CONNECT" TO db_arh;
GRANT "JAVA_ADMIN" TO db_arh;
GRANT "JAVADEBUGPRIV" TO db_arh;
GRANT "JAVA_DEPLOY" TO db_arh;
GRANT "JAVAIDPRIV" TO db_arh;
GRANT "JAVASYSPRIV" TO db_arh;
GRANT "JAVAUSERPRIV" TO db_arh;
как думаете?
|
|
|

14.08.2007, 10:45
|
|
Познавший АНТИЧАТ
Регистрация: 12.05.2007
Сообщений: 1,235
Провел на форуме: 2238549
Репутация:
1318
|
|
Давайте попробуем... Я на текущем шаге могу только одно сказать, проблемы начинаются в момент пересоздания схемы DB_ARH, о чём свидетельствует:
IMP-00058: ORACLE error 1017 encountered
ORA-01017: invalid username/password; logon deniedUsername:
То есть скрипт создания схемы не выполняется, и далее импорт пытается фигачить в несуществующую схему... Вы бы не могли попробовать руками выполнить команду:
@sqlplus sys/change_on_install@rtidb @recreate_schema.sql >> db_arh_import.log
И отписать как он ругнётся?
|
|
|

14.08.2007, 11:08
|
|
Познающий
Регистрация: 08.09.2005
Сообщений: 38
Провел на форуме: 324316
Репутация:
44
|
|
Код:
@echo off
cls
echo.
echo ----------------------------------------------------------------------
echo Copyright (C): 2007, DaMaGeLaB, groundhog mailto:groundhog@cccp.su
echo Special realize for MegaZLO
echo ----------------------------------------------------------------------
echo.
echo Today is [%date%]
echo.
echo Ready to import schema 'DB_ARH'. Schema 'DB_ARH' about to be dropped...
set /p temp=Press ENTER to continue or CTRL+C to exit...
echo.
echo Recreating schema 'DB_ARH'...
@sqlplus sys/change_on_install@rtidb @recreate_schema.sql >> db_arh_import.log
echo.
echo ----------------------------------------------------------------------
echo [!] Import done. See log file for errors and additional information.
echo ----------------------------------------------------------------------
echo.
set /p temp=Press ENTER to continue...
echo.
с использованием вашег исходного фаила recreate_schema.sql
лог
Код:
SQL*Plus: Release 8.1.7.0.0 - Production on Втн Авг 14 11:02:59 2007
(c) Copyright 2000 Oracle Corporation. All rights reserved.
Connected to:
Oracle8i Enterprise Edition Release 8.1.7.0.0 - Production
With the Partitioning option
JServer Release 8.1.7.0.0 - Production
User dropped.
create user DB_ARH identified by 1
*
ERROR at line 1:
ORA-00988: missing or invalid password(s)
grant connect, resource to DB_ARH
*
ERROR at line 1:
ORA-01917: user or role 'DB_ARH' does not exist
grant unlimited tablespace to DB_ARH
*
ERROR at line 1:
ORA-01917: user or role 'DB_ARH' does not exist
alter user DB_ARH default tablespace USERS
*
ERROR at line 1:
ORA-01918: user 'DB_ARH' does not exist
Disconnected from Oracle8i Enterprise Edition Release 8.1.7.0.0 - Production
With the Partitioning option
JServer Release 8.1.7.0.0 - Production
p.s. как я понял в recreate_schema.sql закралась коварная ошибка
Последний раз редактировалось MegaZLO; 14.08.2007 в 11:14..
|
|
|

14.08.2007, 11:46
|
|
Познавший АНТИЧАТ
Регистрация: 12.05.2007
Сообщений: 1,235
Провел на форуме: 2238549
Репутация:
1318
|
|
Блин... В восьмёрке надо пасс в кавычки заключать...
create user DB_ARH identified by "1";
Я просто делал это на девятке и всё нормально проходило... Исправьте этот момент плиз...
|
|
|

14.08.2007, 11:59
|
|
Познающий
Регистрация: 08.09.2005
Сообщений: 38
Провел на форуме: 324316
Репутация:
44
|
|
разгадка близка =)
Код:
Export file created by EXPORT:V08.01.07 via conventional path
IMP-00013: only a DBA can import a file exported by another DBA
IMP-00000: Import terminated unsuccessfully
p.s. может добавить это и не мучаться ?
Код:
GRANT CREATE ANY TABLE TO db_arh;
GRANT DELETE ANY TABLE TO db_arh;
GRANT DROP ANY TABLE TO db_arh;
GRANT INSERT ANY TABLE TO db_arh;
GRANT SELECT ANY SEQUENCE TO db_arh;
GRANT SELECT ANY TABLE TO db_arh;
GRANT UNLIMITED TABLESPACE TO db_arh;
GRANT UPDATE ANY TABLE TO db_arh;
GRANT "DBA" TO db_arh;
GRANT "CONNECT" TO db_arh;
GRANT "JAVA_ADMIN" TO db_arh;
GRANT "JAVADEBUGPRIV" TO db_arh;
GRANT "JAVA_DEPLOY" TO db_arh;
GRANT "JAVAIDPRIV" TO db_arh;
GRANT "JAVASYSPRIV" TO db_arh;
GRANT "JAVAUSERPRIV" TO db_arh;
Последний раз редактировалось MegaZLO; 14.08.2007 в 12:04..
|
|
|

14.08.2007, 12:40
|
|
Познавший АНТИЧАТ
Регистрация: 12.05.2007
Сообщений: 1,235
Провел на форуме: 2238549
Репутация:
1318
|
|
Я думаю достаточно будет добавить строчку
Это неправильно исходя из соображений безопасности, но это исправит ситуацию...  Похожу что вы делали экспорт из под системного аккаунта, следовательно импорт может сделать пользователь с правами DBA...
|
|
|

14.08.2007, 14:07
|
|
Познающий
Регистрация: 08.09.2005
Сообщений: 38
Провел на форуме: 324316
Репутация:
44
|
|
огроменное спасибо !!!
все работает наа ура, теперь хоть в командировки ездить не придеться =)
|
|
|
|
 |
|
|
Здесь присутствуют: 1 (пользователей: 0 , гостей: 1)
|
|
|
|