Physical files restoration

Hello,
Is it possible to setup a Test server par restoring (copying) the physical files from my production server? We are running Oracle 9i version2. In fact we have moved from one server to another , more powerful server. Now I would to make the old server a test server. I tried by doing en export/import but it is taking too much time.
Please how can go about it and later be able to easly update the old server to the new.
Thanks

bezgodo wrote:
we have change the physical server. So they migrate the oracle database from the old server to the new server. Both servers are running Oracle 9i version 2 and the OS is SUSE 9. The production database is having more datafile today and the file and folders structure are not the same as the old server. SO i want to copy the files from the new server to the old server that will be using as the TEST server.
So could you provide me the steps by steps way to go about it.
The main difference between the two database today is primarly their folder structure and the number of files in different tablespaces
Thanks in advanceDirectory structure can be different both server ,do following steps.
1.Take cold backup from production database .To doing this you need shutting down your database(production).
Before shutting down database you have to identify all files(control,data,log)
sqlplus "/as sysdba"
/*identify controlfiles*/
select name from v$controlfile;
/*identify datafiles*/
select name from v$datafile;
/*identify logfiles*/
select member from v$logfile
shutdown immediate;2.Transfer these files(also you need copy pfile if you do not use pfile then
create that from as pfile as create pfile='pfilelocation' from spfie ) to new server(using rsync or others ways)
3.In new server edit pfile according new directories(change control_files,user and background_dump_dest,etc..)
4.Startup database in new server as:
export ORACLE_SID=<YOURSID>
sqlplus "/as sysdba"
startup mount pfile='pfile_location';
/*Now you need change location datafiles/logfiles to new location*/
alter database rename file <datafile_name_n> to 'new_transferred_location';
alter database rename file <logfile_name_n> to 'new_transferred_location';
alter database open;Other way you can using rman backup database and can restore this in new server as:
1.Backup database in production server as:
rman target /
configure controlfile autobackup on;
shutdown immediate;
startup mount;
backup database;2. then copy generated backup files to new server and:
export ORACLE_SID=<YOURSID>
rman target /
startup nomount;
restore restore spfile to pfile from  'autobackup_location'
/*This bk file was generated first step*/
/*then edit pfile according new directories(change control_files,
user and background_dump_dest,etc..)*/
shutdown immediate;
startup nomount;
restore controlfile from  'autobackup_location';
alter database mount;
catalog start with 'transferred_backup_location';
restore database;
recover database;
alter database open; In additionally Total Questions:  13 (13 unresolved) .If your question has been answered then mark this as answered and mark your correct/helpful post

Similar Messages

  • Filestream Creation Unable to Open Physical File Operating System Error 259

    Hey Everybody,
    I have run out of options supporting a customer that is having an error when creating a database with a file stream.  The error displayed is unable to open physical file operating system error 259 (No more data is available).  We're using a pretty
    standard creation SQL script that we aren't having issues with other customers:
    -- We are going to create our data paths for the filestreams.  
    DECLARE @data_path nvarchar(256);
    SET @data_path = (SELECT SUBSTRING(physical_name, 1, CHARINDEX(N'master.mdf', LOWER(physical_name)) - 1)
                      FROM master.sys.master_files
                      WHERE database_id = 1 AND file_id = 1);
    -- At this point, we should be able to create our database.  
    EXECUTE ('CREATE DATABASE AllTables
    ON PRIMARY
        NAME = AllTables_data
        ,FILENAME = ''' + @data_path + 'AllTables_data.mdf''
        ,SIZE = 10MB
        ,FILEGROWTH = 15%
    FILEGROUP FileStreamAll CONTAINS FILESTREAM DEFAULT
        NAME = FSAllTables
        ,FILENAME = ''' + @data_path + 'AllTablesFS''
    LOG ON
        NAME = AllTables_log
        ,FILENAME = ''' + @data_path + 'AllTables_log.ldf''
        ,SIZE = 5MB
        ,FILEGROWTH = 5MB
    GO
    We are using SQL Server 2014 Express.  File streams were enabled on the installation SQL Server.  The instance was created successfully and we are able to connect to the database through SSMS. The user is using an encrypted Sophos. 
    We have tried the following:
    1. Increasing the permissions of the SQL Server server to have full access to the folders.
    2. Attempted a restore of a blank database and it failed.
    There doesn't seem to be any knowledge base articles on this particular error and I am not sure what else I can do to resolve this.  Thanks in advance for any help!

    Hi Ryan,
    1)SQL Server(any version) can't be installed on encrypted drives. Please see a similar scenario in the following link
    https://ask.sqlservercentral.com/questions/115761/filestream-and-encrypted-drives.html
    2)I don't think there is any problem with permissions on the folder, if the user can create a database in the same folder. Am not too sure. Also see the article by
    Jacob on configuring the FILESTREAM for SQL Server that describes how to configure FILESTREAM access level & creating a FILESTREAM enabled database
    Hope this helps,
    Thanks
    Bhanu 

  • Where are the Physical Files of Portal App (Forms,Reports,etc)

    Hi..
    We are developing our portal using Oracle Portal..
    We use the Portal form,report,link,url,dynamic page etc in our development.
    The case is,
    Our QA want to restrict the access to the file (version control).
    So, they want to do a backup/copy of the development files (form,report,dynamic page etc..) and if there are changes to the portal, they want to use the backup as the development files.
    The problem is,
    we not sure where the files are..
    We don't know where the forms,report,dynamic page are restored and what are they (.jsp?.cvf?.java?.fmb?.rdf?)
    Can anybody help?
    p/s Fyi,we also use jsp..so, we can see the physical files..e.g. index.jsp,login.jsp....but for the portal form,report,link????Where are their physical files?
    Thanks.

    Hi,
    Portal Application components do not have any physical files. It is available as a package in the database. You can see it in the manage component screen. Clicking on the package body link will show you the whole package. You can copy this into a .SQL file and compile it later whenever you want, in the schema where the application is built.
    Hope that helps.
    Thanks,
    Sharmila

  • Detach Database: physical file permission

    Hi All. I am using windows account to login which is Sysadmin of the SQL server.
    when I detach a database, the physical file permission will only have one entry, which is my domain ID with full control.
    it using another windows domain account which is also sysadmin would like to attach the database again: FAILED since access denied....
    how to avoid this happenn ??

    When you detach a DB, the ACLS are reset and the permission is given to the logged in windows account user - the full control on the DB files as expounded here:
    https://msdn.microsoft.com/en-us/library/ms189128.aspx/html. You can circumvent your problem by using "EXECUTE AS Domain\[Attaching User]" before detaching the DB using sp_detach_db
    (this will retain full CONTROL permission to the attaching user)
    However, starting from SQL 2005, you can use a more graceful method of  moving files (on the same server) rather than using the attach/detach as shown below:
    Take the DB offline
    Move the physical files to the new location
    Run the “ALTER DATABASE DBNAME MODIFY FILE (NAME  = logicalfilename, FILENAME =  physicalfilepath” command to provide the new path
    Bring the DB online
    However, if you are moving the DB to another server, then backup/restore will be best (you can use compression (SQL 2008 R2 standard edition or higher supports it) and this will move much faster than uncompressed MDF and LDF files
    Satish Kartan www.sqlfood.com

  • What is a  Logical and Physical file path in sap?

    what is a  Logical and Physical file path in sap?

    Hi,
    Physical file is what you see from the OS level.
    Logical file is what ABAP code can call certain functions to read/write.
    Transaction FILE would link them together. Typically the logical path ends with "<FILENAME>", and the logical file refers to the logical path.
    To extract the physical path from the logical path name
    DATA: lf_mandt TYPE sy-mandt,
            lf_opsys TYPE sy-opsys.
      lf_mandt = sy-mandt.
      lf_opsys = sy-opsys.
    To extract the physical path from the logical path name
      CALL FUNCTION 'FILE_GET_NAME'
        EXPORTING
          client           = lf_mandt
          logical_filename = p_unix
          operating_system = lf_opsys
        IMPORTING
          file_name        = gwa_input
        EXCEPTIONS
          file_not_found   = 1
          OTHERS           = 2.
      IF sy-subrc EQ 0.
      Concatenating the physical path and the input unix file name
        CONCATENATE gwa_input p_file INTO gf_file .
      ENDIF.
    Reward if helpful.
    Regards,
    Ramya

  • Logical and physical file paths

    Hi,
    can anyone elobrate me  on what are logical and physical file
    paths ?

    hi,
    Follow this link
    http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3deb358411d1829f0000e829fbfe/frameset.htm
    File format determination (Required / optional fields and field checks).
    Logical File Path configuration through transaction 'FILE'. A new physical file path should be created on operating system level or an existing one can be used if agreed. The Basis team member should create a new file path at operating system level, if required.
    Hope this helps, Do reward.

  • Error message: "Unable to open the physical file" when trying to attach AdventureWorks database

    I have searched the internet and this forum and have not found an answer...
    I am trying to install the AdventureWorks database into my single instance of MS SQL Server Express 2005.  I am logged into my machine as an administrator and logged into SQL Server 2005 express 'sa'.  I attempt to run the following script:
    exec sp_attach_db @dbname = N'AdventureWorks',
    @filename1 = N'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\AdventureWorks_Data.mdf',
    @filename2 = N'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\AdventureWorks_log.ldf'
    The error message I get back is:
    Msg 5120, Level 16, State 101, Line 1
    Unable to open the physical file "C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\AdventureWorks_Data.mdf". Operating system error 5: "5(Access is denied.)".
    The folder "C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data" and all the files in it are read-write.  I am 100.0000% certain the files "C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\AdventureWorks_Data.mdf" and "C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\AdventureWorks_Log.ldf" exist!  They are the result of running the installation program AdventureWorksDB.msi, which I downloaded from: http://www.codeplex.com/MSFTDBProdSamples/Release/ProjectReleases.aspx?ReleaseId=4004.
    What do I have to do to install the AdventureWorkds database????

    Hello,
    To try to help you, please, could you give some more informations ?
    - the operating system (XP/Vista), the edition ( Pro/Home...) and the service pack
    - usually, the installer installs the both files in C:\Program Files\Microsoft Sql Server\Samples. Is there any change in the location or have you moved the both files ?
    - could you check with the files explorer , that the 2 files are read-write and not read only( find one file, right-click on it, properties and in the 1st tabpage, you should see a checkbox read-only ( if checked , unchecke it ) ?
    - have you Sql Server Management Studio Express Edition ( at least SP1 ) ?
    If no, download it and use it to attach
    in the object explorer,
    click on your instance to expand it
    right click on databases
    in the contextual menu, click on attach
    in the new form,click on add
    you arrive on a second form : find your file , click on it, and OK
    it's the simplest way to attach ( the sp_-attach_db is complicated to type )
    the error messages are sometimes more clear in SSMSEE than in Sqlcmd
    Try also to attach ( thru SSMSEE or Sqlcmd but in using the windows authentification )
    NB: i hope that you are not trying to attach AdventureWorks on a remote instance and on a remote computer ( it would explain access denied )
    We are waiting for your feedback to try to help you more efficiently
    Have a nice day

  • File system error: The record ID is incorrect. Physical file: . Logical file:

    Hi,
    I face this error message when I try to 'process update' a dimention, sometime it works but sometime it failed with the error below:
    Description: File system error: The record ID is incorrect. Physical file: . Logical file: . 
    My environment: Window Server 2008 R2+SQL Server 2008 R2.
    Note: this issue can be resolved by full cube process, but I can't to that every time if it failed, just want to know what happen at backend of SSAS, It block me neary 2 week without any finding, really appreciate that someone can help on this.
    I have do some research with google, I think the root cause here is not TopCount function(It may be a problem with SQL Server2005), also not the size limitation of 4GB size of .astore file.(I check the size of my cube under 'Data\XXX.db\' folder, which only
    have few MB size).
    Thanks,
    Tom

    Hi Tom,
    Here is a microsoft fix
    FIX: "File system error" occurs when you try to run a process update operation on a dimension in Microsoft SQL Server 2008 Analysis Services and in Microsoft SQL Server 2008 R2 Analysis Services
    In your acenario, in order to fix this issue, please apply the latest Cumulative update and Service Pack according to your SQL Server version. Besides, there are two workarounds in that fix, plese try it and check if it works or not.
    http://support.microsoft.com/default.aspx?scid=kb;en-US;2276495
    Regards,
    Charlie Liao
    TechNet Community Support

  • Information about file Id, Logical file name and Physical file name

    Hi All,
    I am testing one program. Selection screen has 3 parameters, File Id, Logical File Name and Physical file name. In Physical File name, i am giving complete file name with path. But it is giving error. Please tell me, what is File id and what all information i need to enter for logical file name and physical file name.
    Thanks
    Puneet Aggarwal

    hi,
    try using this for filename.
    parameters : p_file like rlgrap-filename.
    Thanks,
    Gaurav

  • Difference between logical file path and physical file path

    Hi,
    Can anyone tell me why logical file path is required and why physical file path is required? What exactly is the difference bet them?
    Thanks in advance.
    Regards,
    PS.

    Hi,
    The function module FILE_GET_NAME convert a logical path into its corresponding physical path.
    The advantage of using logical pathes within your applications is obivous:
    If you need to change the physical path you just adjust it within transaction FILE yet no changes are required to your application.
    http://help.sap.com/saphelp_erp2005vp/helpdata/en/25/ab3a57df3b11d189fc0000e829fbbd/frameset.htm
    The file names that you use in ABAP statements for processing files are physical names. This means that they must be syntactically correct filenames for the operating system under which your R/3 System is running. Once you have created a file from an ABAP program with a particular name and path, you can find the same file using the same name and path at operating system level.
    Since the naming conventions for files and paths differ from operating system to operating system, ABAP programs are only portable from one operating system to another if you use the tools described below.
    To make programs portable, the R/3 System has a concept of logical filenames and paths. These are linked to physical files and paths. The links are created in special tables, which you can maintain according to your own requirements. In an ABAP program, you can then use the function module FILE_GET_NAME to generate a physical filename from a logical one.
    Maintaining platform-independent filenames is part of Customizing. For a full description, choose Tools ® Business Engineer ® Customizing, followed by
    Implement. projects ® SAP Reference IMG. On the next screen, choose Basis Components System Administration ® Platform-independent File Names.
    For a more detailed description of the function module FILE_GET_NAME, enter its name on the initial screen of the Function Builder and choose Goto Documentation. On the next screen, choose Function module doc.
    Another way of maintaining platform-independent filenames is to use the Transaction FILE. The following sections provide an overview of the transaction.
    To create a logical filename, choose Logical filename definition, client-independent from the Navigation group box in Transaction FILE, then choose New entries. You define logical filenames
    You can either define a logical filename and link it to a logical path (as displayed here), or you can enter the full physical filename in the Physical file field. In the latter case, the logical filename is only valid for one operating system. The rules for entering the complete physical filename are the same as for the definition of the physical path for the logical file. To display further information and a list of reserved words, choose Help.
    If you link a logical path to a logical file, the logical file is valid for all syntax groups that have been maintained for that logical path. The filename specified under Physical file replaces the reserved word  in the physical paths that are assigned to the logical path. To make the name independent of the operating system, use names that begin with a letter, contain up to 8 letters, and do not contain special characters.
    Save your changes.
    regards,
    Omkar.

  • Diff between logical and physical file path

    Hi ,
    Could you please explain difference between logical and physical file path's and their importance in ABAP.
    Thanks and regards,
    shyla

    Hi
    The function module FILE_GET_NAME convert a logical path into its corresponding physical path.
    The advantage of using logical pathes within your applications is obivous:
    If you need to change the physical path you just adjust it within transaction FILE yet no changes are required to your application.
    http://help.sap.com/saphelp_erp2005vp/helpdata/en/25/ab3a57df3b11d189fc0000e829fbbd/frameset.htm
    The file names that you use in ABAP statements for processing files are physical names. This means that they must be syntactically correct filenames for the operating system under which your R/3 System is running. Once you have created a file from an ABAP program with a particular name and path, you can find the same file using the same name and path at operating system level.
    Since the naming conventions for files and paths differ from operating system to operating system, ABAP programs are only portable from one operating system to another if you use the tools described below.
    To make programs portable, the R/3 System has a concept of logical filenames and paths. These are linked to physical files and paths. The links are created in special tables, which you can maintain according to your own requirements. In an ABAP program, you can then use the function module FILE_GET_NAME to generate a physical filename from a logical one.
    Maintaining platform-independent filenames is part of Customizing. For a full description, choose Tools ® Business Engineer ® Customizing, followed by
    Implement. projects ® SAP Reference IMG. On the next screen, choose Basis Components System Administration ® Platform-independent File Names.
    For a more detailed description of the function module FILE_GET_NAME, enter its name on the initial screen of the Function Builder and choose Goto Documentation. On the next screen, choose Function module doc.
    Another way of maintaining platform-independent filenames is to use the Transaction FILE. The following sections provide an overview of the transaction.
    To create a logical filename, choose Logical filename definition, client-independent from the Navigation group box in Transaction FILE, then choose New entries. You define logical filenames
    You can either define a logical filename and link it to a logical path (as displayed here), or you can enter the full physical filename in the Physical file field. In the latter case, the logical filename is only valid for one operating system. The rules for entering the complete physical filename are the same as for the definition of the physical path for the logical file. To display further information and a list of reserved words, choose Help.
    If you link a logical path to a logical file, the logical file is valid for all syntax groups that have been maintained for that logical path. The filename specified under Physical file replaces the reserved word  in the physical paths that are assigned to the logical path. To make the name independent of the operating system, use names that begin with a letter, contain up to 8 letters, and do not contain special characters.
    Save your changes.

  • Changing of the physical file name of the file after archiving

    Hi all,
    We are in process of archiving  and  completed the process successfully and archived to o:\PRODSID\<filename>.
    When refresh   is happening from Prod to Quality   the archived data will come as O:\PRODSID\<filename> and the archived files will not be accessible since quality system  is not able to find the path with O:\PRODSID\<filename>.
    Is there anyway i can change the physical file name  of the archived files to correct path O:\QUALITYSID\<filename>, i need to change only the SID  only    from PRD to QUALITY.
    Thanks,
    Subhash.G

    Hi Subash,
    Do you want change the Physical File name or the Path from PROD to SID.
    Path :- in the transaction called FILE, double click on Logical Path Definition , select the Logical File and double click on "Assignment on Physical Path to Logical Path" and you can change FILENAME also here
    Thanks,
    Sravanthi

  • Logical file names and Physical file names

    Hi Guys...
         Can you let me know what is the difference between Logical file names and Physical file names?
    Regards,
    Rohit

    Using Logical Files in ABAP Programs http://help.sap.com/saphelp_nw04/helpdata/en/9f/db95e635c111d1829f0000e829fbfe/content.htm
    Creating and Defining Logical Filenames
    http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3df8358411d1829f0000e829fbfe/content.htm

  • Logical & Physical File path

    Hi Gyes,
      In selection screen i will enter <b>logical file path</b>.After executing this program i want <b>physical file path for that particular logical file path</b>(input).Is there any function module is there.
    Thanks and regards,
      Suresh.

    hello,
    Use the function Module
    Call function  FILE_GET_NAME
    CLIENT                          200
    LOGICAL_FILENAME    <enter your logical file name>    
    OPERATING_SYSTEM                WINDOWS NT
    PARAMETER_1
    PARAMETER_2
    PARAMETER_3
    USE_PRESENTATION_SERVER
    WITH_FILE_EXTENSION
    USE_BUFFER
    ELEMINATE_BLANKS                X
    Reward points if helps.
    Thanks,
    Krishna

  • A column in a table has physical file path (I want to get file size of those docs from the OS)

    Experts!!
    I have a table that holds the physical file path of files in one of its columns. It does not give a link, just the physical file path.
    For example,---- C:\bu\test.pdf   and let us say the file size is kb according to the OS.
    Is there any way I can obtain the file size of the files from the physical path?
    for example, the file size of the test.pdf file in the example here using t-SQL?
    Much Appreciation
    ebro

    Hey there... thanks for the response......I found the following as a solution for my problem. But my problem is the SP created using the method needs a directory as a parameter. How can I pass the directory from a table that holds my directory?
    EXEC  [dbo].[GetListOfFileWithSize](@Dir)
    How do I pass the directory from my table?
    http://stackoverflow.com/questions/7952406/get-each-file-size-inside-a-folder-using-sql/7958070#7958070
    ebro

Maybe you are looking for

  • Error: "You are not connected to a company"  in deployment site

    This error only occours in the deployment site, in development I have no such error. In the deployment site all the software is installed in the same machine. This is a WebService developed internally with VStudio .NET,in c# , and we are using SAP BO

  • Solve the query

    Hi all, We r working on SQL queries unable to solve teh below query. "Display the names of the highest paid programmers for each language" The table relating to the query is given below. PNAME DOB DOJ S PROF1 PROF2 SALARY anand 21-APR-66 21-APR-92 m

  • SAP FI/CO Questionaires

    Folks, I have been asked to conduct a project scope and high level requirements definition exercise. Does anybody have a series/list of questionaires for FI/CO? Thanks, TL

  • Lightroom 3 is Exporting Blurry Photographs

    In lightroom 3 on my Macbook Pro, my orignal photograph is clear, in focus, and sharp. After I export the photograph, it turns into a blurry, out of focus, fuzzy photograph... HELP?!? How do I fix this?

  • 1440x1080 scaling down - widescreen?

    Premiere Pro cs4, Hi....working with some video I got.  The size is 1440x1080. I need to scale down for standard definition.  So, when I create my premiere project, do I create a DV-NTSC Widescreen 48kHz sequence?  I tried that and when I scale down