Compiling different schema Synonym through Procedure

Hi,
I have created a user with DBA access called DBA_USER.
I want to compile invalid synonym present in another schema through a procedure present in this schema.
What system privilege should I grant for this.
DBA_USER>
CREATE OR REPLACE PROCEDURE TEST_COMPILE AS
BEGIN
EXECUTE IMMEDIATE 'ALTER SYNONYM SCOTT.EMP_TAB_SYNONYM COMPILE';
END;
DBA_USER>EXEC TEST_COMPILE;
ERROR at line 1:
ORA-01031: insufficient privileges
ORA-06512: at "DBA_USER.TEST_COMPILE", line 3
ORA-06512: at line 1
Note: I faced same problem with compiling procs/packages. After physically granting
"ALTER ANY PROCEDURE" to DBA_USER it got resolved. I could not able to find a similar one for Synonyms.
Thanks
Balaji Chellappa

Justin,
Granting "CREATE ANY SYNONYM" does not solves the problem.
Here is the SQL Script
==============================
SQL> SHOW USER
USER is "DBAAUX"
SQL> GRANT CREATE ANY SYNONYM TO DBAAUX;
Grant succeeded.
SQL> GRANT DROP ANY SYNONYM TO DBAAUX;
Grant succeeded.
SQL> CREATE SYNONYM SFA.DD FOR DUAL;
Synonym created.
SQL> SELECT * FROM SFA.DD;
D
X
SQL> DROP SYNONYM SFA.DD;
Synonym dropped.
SQL> -- Now trying the same through PL SQL
SQL> begin
2 execute immediate 'CREATE SYNONYM SFA.DD FOR DUAL';
3 end;
4 /
PL/SQL procedure successfully completed.
SQL> SELECT * FROM SFA.DD;
D
X
SQL> -- Compiling the same
SQL> ALTER SYNONYM SFA.DD COMPILE;
ALTER SYNONYM SFA.DD COMPILE
ERROR at line 1:
ORA-01031: insufficient privileges
SQL> begin
2 execute immediate 'ALTER SYNONYM SFA.DD COMPILE';
3 end;
4 /
begin
ERROR at line 1:
ORA-01031: insufficient privileges
ORA-06512: at line 2
SQL> spool off
=================================================
Thanks
Balaji Chellappa

Similar Messages

  • Connecting to a different schema within a stored procedure

    Hi Peopl,
    I have a Stored proce "TestProc" which is a part of schema "test1"... Now within this proc i need to connect to a different schema "test2", fetch some data from its tables and disconnect from the same, but not from the original schema "test1". Both the schemas are located on the same database server so i guess no different network connection. I hope u guys got my question... if not tell me... How shud i approach this requirement....

    This would all be handled within the same session, so there is no extra connect or disconnect involved here.
    The user 'test2' needs to grant the appropriate privileges directly to 'test1'. These grants must be direct and not through a role. If the procedure is just selecting data from test2, then test2 needs to:
    test2>grant select on tablea to test1;where tablea represents a table in the test2 schema. There would be a separate grant for each table in test2 accessed by test1.
    The code in test1 can refer to the table in test2 as test2.tablea, or you can create a private synonym in test1:
    test1>create synonym tablea for test2.tablea;so every reference to tablea does not need to be qualified with the 'test2.' prefix.

  • Stored Procedure executes on two different schemas in Oracle 8i

    Can I Create a Stored Procedure that access table from two different schemas?
    For Example I have created this Stored Procedure on SCHEMA_ONE
    CREATE OR REPLACE PROCEDURE SP_DEMO IS
    BEGIN
    INSERT INTO SCHEMA_ONE.COUNTRY_ONE(COUNTRY_NAME)
    SELECT COUNTRY_NAME
    FROM SCHEMA_TWO.COUNTRY_TWO
    END SP_DEMO;
    and when I execute it I am getting error message as :
    Error: PLS-00201: identifier 'SCHEMA_TWO.COUNTRY_TWO' must be declared
    is that possible? If yes then what I need to do for that?
    Please assist me.

    hi john
    How are you?
    please have a view there and correct me if m wrong.
    insufficient privileges
    Khurram Siddiqui
    [email protected]                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Calling procedure dynamically, from different schema, permissions issue

    Hi,
    I have a 'master_user' schema that needs to run DDL on a 'secondary_user' schema.
    There appears to be some kind of permissions subtlety that I'm missing. Here are the simplified steps to create, test and troubleshoot:
    Secondary schema has a procedure defined:
    -- Run as SYSTEM (at build time)
    CREATE OR REPLACE PROCEDURE secondary_user.execute_immediate(p_sql_statement IN VARCHAR2)
    IS
    BEGIN
        EXECUTE IMMEDIATE p_sql_statement;
    END;
    GRANT EXECUTE ON secondary_user.execute_immediate TO master_user;
    I then want to call this procedure from master_user to execute DDL dynamically in secondary_user.
    - Run as master_user
    BEGIN
        EXECUTE IMMEDIATE ' BEGIN secondary_user.execute_immediate(''DROP TABLE test1''); END;';
    END;
    ERROR at line 1:
    ORA-00942: table or view does not exist
    ORA-06512: at SECONDARY_USER.EXECUTE_IMMEDIATE", line 5
    ORA-06512: at line 1
    ORA-06512: at line 2
    TROUBLESHOOTING SO FAR:
    Now I can call this procedure directly:
    -- As master_user
    EXEC secondary_user.execute_immediate('drop table test1')
    PL/SQL procedure successfully completed.
    I can call the wrapped procedure as different users:
    -- As secondary_user
    BEGIN
        EXECUTE IMMEDIATE ' BEGIN secondary_user.execute_immediate(''DROP TABLE test1''); END;';
    END;
    PL/SQL procedure successfully completed.
    -- As SYSTEM
    BEGIN
        EXECUTE IMMEDIATE ' BEGIN secondary_user.execute_immediate(''DROP TABLE test1''); END;';
    END;
    PL/SQL procedure successfully completed.
    Can you shed any light on this behaviour? The master_user clearly has permission to run the procedure, but it cannot see it from within an anonymous block. However SYSTEM can so what permission does SYSTEM have that master_user does not?
    Much appreciated,
    Si

    Something doesn't add up:
    SCOTT@orcl > create user secondary_user
      2  identified by secondary_user
      3  default tablespace users
      4  quota unlimited on users
      5  /
    User created.
    SCOTT@orcl > grant create session to secondary_user
      2  /
    Grant succeeded.
    SCOTT@orcl > create user master_user
      2  identified by master_user
      3  default tablespace users
      4  quota unlimited on users
      5  /
    User created.
    SCOTT@orcl > grant create session to master_user
      2  /
    Grant succeeded.
    SCOTT@orcl > CREATE OR REPLACE PROCEDURE secondary_user.execute_immediate(p_sql_statement IN VARCHAR2)
      2
      3  IS
      4
      5  BEGIN
      6
      7      EXECUTE IMMEDIATE p_sql_statement;
      8
      9  END;
    10
    11  /
    Procedure created.
    SCOTT@orcl > GRANT EXECUTE ON secondary_user.execute_immediate TO master_user;
    Grant succeeded.
    SCOTT@orcl >
    SCOTT@orcl > create table secondary_user.test1(n number)
      2  /
    Table created.
    SCOTT@orcl > connect master_user@orcl
    Enter password:
    Connected.
    MASTER_USER@orcl > BEGIN
      2
      3      EXECUTE IMMEDIATE ' BEGIN secondary_user.execute_immediate(''DROP TABLE test1''); END;';
      4
      5  END;
      6
      7  /
    PL/SQL procedure successfully completed.
    MASTER_USER@orcl >
    Make sure table secondary_user.test1 exists when you run SP. And, as you can see, neither secondary_user nor master_user have any privs besides create session.
    SY.

  • Query to list the synonyms in one schema to different schema

    Hi
    How can i check the list of synonyms in one schema pointing to different schemas?
    Also query to list the table , foreign key constraint and reference table..
    Thanks

    Manikandan wrote:
    Hi
    How can i check the list of synonyms in one schema pointing to different schemas?
    Also query to list the table , foreign key constraint and reference table..
    Thanks
    1) DBA_SYNONYMS or ALL_SYNONYMS
    2) You can check DBA_CONSTRAINTS and DBA_CONS_COLUMNS.
    Aman....

  • Applying Streams changes to a different schema

    We're trying to setup a Streams environment between two DBs 9.2.0.3.
    We have two different schemas, one in each DB, called TEST_HQ and TEST_CO, and both of them contain the same objects, tables, and procedures. What we're interested in is to apply DML/DDL changes to the destination DB even if the schema has a different name, but same structure.
    Right now CAPTURE and PROPAGATE processes are working fine, while the apply process is unable to perform any change. We've also tried creating a new schema in the destination DB called TEST_HQ, just like in the source schema, adding synonyms to the real tables contained within TEST_CO, but this is hitting ORA-23416 'missing primary key'.
    Any help or hint will be greatly appreciated!
    Thanks in advance!
    Max

    Thanks for your reply!
    Actually there is a primary key, but Streams seems to ignore it. I've also tried the SET_KEY_COLUMNS way plus supplementary logging on the source DB, but this didn't help at all. I think this is happenening because the tables are not in the TEST_HQ schema, there are only synonyms to the real tables contained in TEST_CO.
    Is there any other easy way to get Streams working between two different schemas?
    Thanks again for your help!!
    Max

  • SQL Query Template to a different schema

    Hi all
    I am on MII 12.2, connecting to Oracle through a data source which references user/schema "Foo"
    I would like to perform queries involving tables from schema "Bar" .
    As a consequence, when I need to access Bar tables I must reference them like "Foo.<TableName>"
    If I use an SQL query with mode Command I can freely write the prefix but no return is allowed
    If I use mode = FixedQuery(With Output) I can't prefix "Foo." because the editor prevents me from freely entering SQL code
    How can I do this? Thanks regards
    Vincenzo

    Thanks for your reply!
    Actually there is a primary key, but Streams seems to ignore it. I've also tried the SET_KEY_COLUMNS way plus supplementary logging on the source DB, but this didn't help at all. I think this is happenening because the tables are not in the TEST_HQ schema, there are only synonyms to the real tables contained in TEST_CO.
    Is there any other easy way to get Streams working between two different schemas?
    Thanks again for your help!!
    Max

  • Package Error!  join to tables in different schemas

    Hi
    I get an error whwn I want to put my query into package
    I have two tables in different schemas and I joined them and it works when I compile it
    but in the SP it doesn't works
    Is anbody help me? please
    Table1 in Schema1
    Table2 in Schema2
    TableID is the column which I join two tables (Table1.TableID=Table2.TableID)
    User1 has Select grant to both tables (it works when I run the query but in the sp which is in the package it doesn't work)
    Package1 in Schema1

    query is working
    but when I put that query in to package, Package is giving error like "table or view does not exist"
    Table1 in Schema1
    Table2 in Schema2
    TableID is the column which I join two tables (Table1.TableID=Table2.TableID)
    User1 has Select grant to both tables (it works when I run the query but in the sp which is in the package it doesn't work)
    Package1 in Schema1
    Select * from Schema1.Table1
    Inner join Schema2.Table2 on Table1.TableID=Table2.TableID
    is working in editor but
    CREATE OR REPLACE PACKAGE Schema1.PCKG_packagename AS
    PROCEDURE SP_procedurename
    Select * from Schema1.Table1
    Inner join Schema2.Table2 on Table1.TableID=Table2.TableID;
    END SP_procedurename;
    END PCKG_packagename ;
    is not working
    Must I give grant to Package?
    Edited by: 874779 on 25.Tem.2011 03:37
    Edited by: 874779 on 25.Tem.2011 03:51

  • ORA -04062 when running forms aginst a different schema

    Hello,
    I am getting this error (ORA -04062 signature of 'procedure' has been changed)when I try to run my form aginst my test- schema (different from my development schema). I get rid of the error if I compile the form against the test schema. In the production environment I have to run this form against multiple schemas, so recompilation is not a possible solution.
    Has anybody else come across this problem.
    null

    Thanks John for your reply !
    I think my problem is close to the second thing you mention as a possible cause. I found out that I had used a parameter of type table%ROWTYPE in call to a pacakged procedure. When I defined a "TYPE MyRec IS RECORD" record type in my pacakge specification and used that as the type for the parameter my form seems to work against my test schema without recompilation. Unfortunately the table is pretty large so my package specification does not look so neat anymore. And I lost the dynamics associated with the %ROWTYPE attribute.
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by John Alexander ([email protected]):
    That's a well-known bug. Its worse with a v7 database, but still can occur with 8/8i.
    A couple of things to look for:
    1) REMOTE_DEPENDENCIES_MODE is SIGNATURE instead of TIMESTAMP in init.ora.
    2) Forms that call stored procedures with a large parameter list (about 55 or more) can get a run-time error ORA-4062 if running on a different schema than where it was compiled.
    3) You can also hit a snag if you are calling a dbms_XX package within the form. Instead, call it within a db procedure, which you can call from the form.
    John Alexander
    St. Petersburg, FL www.SummitSoftwareDesign.com <HR></BLOCKQUOTE>
    null

  • Change schema runtime in procedure

    Hello friends,
    I have one query in procedure. I have same table with same structure and name in more than 10 schema. I want to access these table records dynamically using procedure.
    I want to change schema name in procedure.
    Please check below PL/SQL code i have wrote.
    declare
         cursor c1 IS
         select deptno,dname,loc from &schema..dept;
    begin
         for rec in c1
         loop
              dbms_output.put_line(rec.deptno || ' ' || rec.dname || ' ' || rec.loc);
         end loop;
    end;
    I want same functionality using procedure. Please check procedure code below:
    create or replace procedure diff_schema (schema_name IN varchar2)
    Declare
         cursor c1 IS
         select deptno,dname,loc from schema_name.dept;
    AS
    begin
         for rec in c1
         loop
              dbms_output.put_line(rec.deptno || ' ' || rec.dname || ' ' || rec.loc);
         end loop;
    end;
    but it returns error.
    Please help me to solve this issue.
    Pradip Patel

    BluShadow wrote:
    Venkadesh wrote:
    Agree..
    Hope this work.
    create or replace procedure r_test (p_schema in varchar2)
    is
    v_rc sys_refcursor;
    v_all emp%rowtype;
    begin
    open v_rc for 'select * from '||p_schema||'.emp';
    loop
    fetch v_rc into v_all;
    exit when v_rc%notfound;
    dbms_output.put_line(v_all.ename);
    end loop;
    close v_rc;
    end;
    That still assumes that the emp table exists in the schema in which the procedure is compiled because you have:
    v_all emp%rowtype;Essentially what the OP is asking for indicates that whereve the procedure is defined is going to need to know the structure of the tables it's going to use otherwise everything about it would need to be dynamic.
    We have a process on one of our databases that has a similar setup, where there are several schema's all containing the same table structure, but different data, and we need a central setup of code that can process each of those as required.
    For us we looked at it from a different perspective. Rather than having the central procedure try and access all the other schemas, for which it would need to know which schemas it has to access etc. and because sometimes some of those schemas should be excluded from the process if they have had an issue with their data being populated (it's a regular job to repopulate them and determine changes on them etc. - a bit of an ETL task really), we leave it up to the individual schemas to determine when the processing is necessary (i.e. when they each know their own data is ready to be processed). The advantage of that is that the central procedure's those schemas use all use the AUTHID CURRENT_USER, so the central schema just has a blank copy of the tables so the code can compile, but when the other schemas call the procedure, they are running the code against their own tables because of the AUTHID setting. It avoids any dynamic coding, or any (mis/ab)use of ref cursors, and it gives the flexibility that each schema is in control of it's own destiny, and other schemas can be added or removed as necessary without having to have some central control mechanism to know which schemas need processing.Thank you Blu,i'm learning lot of things from you...you are a champion

  • Adadmin Compile APPS schema never complete & it running for infinite time

    Hi,
    When I am trying to compile apps schema from adadmin --> compile apps schema, It never complete & it is not compiling invalid objects, I tried to manually run the adutlrcmp.sql through SQL, also the same problem the scripts is stuck (hang) in the UTL_RECOMP.RECOMP_PARALLEL proceure.
    Please note the following:
    1- That I am able to compile invalid objects manually through Toad Or through alter package.
    2- The compile apps schema was running successfully & very fast in the past.
    What should I do? how can I resolve this issue ?
    Your quick feed back is very much appreciated.
    Marwan

    Hi Hussein,
    The following is the adadmin log for the compile apps schema:
    AD code level : [B.1]
    Connecting to SYSTEM......Connected successfully.
    Connecting to APPS......Connected successfully.
    sqlplus -s APPS/***** @/u03/applprod/prod/apps/apps_st/appl/ad/12.0.0/sql/adutlrcmp.sql APPLSYS ***** APPS ***
    ** ***** 0 0 NONE FALSE
    Arguments are:
    AOL_schema = APPLSYS, AOL_password = *****,
    Schema_to_compile = APPS, Schema_to_compile_pw = *****,
    SYSTEM_password = *****, Total_workers = 0, Logical_worker_num = 0
    Object_type_to_not_compile = NONE
    Use_stored_dependencies = FALSE
    Connected.
    Running utl_recomp.recomp_parallel(0), if it exists
    no rows selected
    Elapsed: 00:00:00.17
    PL/SQL procedure successfully completed.
    Elapsed: 00:00:00.00
    STATUS_MESSAGE
    Running UTL_RECOMP.RECOMP_PARALLEL...
    declare
    ERROR at line 1:
    ORA-01013: user requested cancel of current operation
    An error occurred while running a SQL*Plus script.
    As you can see the :
    STATUS_MESSAGE
    Running UTL_RECOMP.RECOMP_PARALLEL...
    Is stucking & you wait for a long long time & it never ends So I canceled it manually.
    And when checking the database locks the following appears:
    OWNER OBJECT_NAME
    APPLSYS FND_CONCURRENT_QUEUES
    APPLSYS FND_CONCURRENT_REQUESTS
    Regards,
    Marwan

  • Accessing tables from different schema in CDS and AMDP

    Hi All,
    We are working on a HANA system which has several schema replicated from SAP R/3/Non SAP systems. We have BW 7.4 SP9 deployed on the same system and accessing the HANA views using latest BW virtual objects such as Open ODS , Composite providers etc.
    We are also using the BW system for few ABAP based data processing developments. We are currently accessing HANA views in ABAP programs by creating dictionary views based on external HANA views.
    We would like to however use recent possibilities of CDS and AMDP for better life cycle management of ABAP based solutions. The open SAP course on this subject was of very good help. Thanks a lot "open SAP team" for that. I would however have few open questions,
    As I understand AMDP gives us full flexibility of writing sql procedures within ABAP development environment, but can we access tables from different schema into AMDP code. If yes, then sample code would help.
    If the answer of first question is yes, then how do we manage transports between development and production systems where the schema names would be different. Currently in open HANA developments, such transport is manged using Schema mapping.
    Can I also use different schema tables in CDS views.
    We are updating few tables in ABAP dictionary after applying processing logic in ABAP program as detailed in step 1. With the new approach using AMDP, can we directly update database schema tables which will give us an optimization advantage.
    New ABAP HANA program interfaces are quite promising and we would like to use them to optimize many data intensive applications.
    Thanks & Regards,
    Anil

    Hi Anil,
    I can only answer 1. and 2. (and would be interested into 3. as well):
    1.
    Yes you can access tables from a different schema and also HANA views. In this case no 'using' is needed.
    Examples:
        RESULT = SELECT
        FROM
              "SAP_ECC"."T441V" AS t,
              "_SYS_BIC"."tmp.package/AFPO" AS a.
        WHERE ...
    2. In this case, if you need schema mapping: You could use HANA (projection) views which just forward to a different schema, also see example.
    Best regards,
    Christoph

  • Create trigger on view belong to different schema of same db

    Hi Guru's,
    I have two different schema in the same DB.
    Example : schema1 and schema2
    I have one view on schema1 and i have grant select to schema2 and create synonym for that view.
    Now i need to create trigger on synonym which created from view in schema1 and insert the data into different table from trigger when insert happen on view.
    first of all , is it possible?
    if its possible then do i need to give create any trigger on view to schema2.
    Or is there any other we can get this done..
    Many thanks.

    Hi,
    user590978 wrote:
    Hi Guru's,
    I have two different schema in the same DB.
    Example : schema1 and schema2
    I have one view on schema1 and i have grant select to schema2 and create synonym for that view.
    Now i need to create trigger on synonym I'm not sure I understand you.
    Triggers operate on tables and views (but I'll just say "table" from now on). It doesn't matter if the statement that caused the trigger to fire used the actual table name or a synonym.
    which created from view in schema1 and insert the data into different table from trigger when insert happen on view.
    first of all , is it possible?I'm not sure I understand you here, either.
    It is possible to have a trigger on a view in schema1, which INSERTs data into a table. That table can be in any schema, just so long as the trigger owner has privilges on INSERT into it.
    if its possible then do i need to give create any trigger on view to schema2.It's very dangerous, and usually a terrible idea, to grant the CREATE ANY privileges to users.
    Schema2 needs the CREATE ANY TRIGGER system privilege only to create a trigger in another schema, such as schema1. There's probably no reason to do that. Let schmea1 create the objects in its own schema.
    Post a test script that shows what you want to do. Include CREATE TABLE, CREATE VIEW, CREATE TRIGGER, CONNECT and INSERT statements, and the results you want (the contents of tables where the trigger INSERTed data). If you don't know how to code something, post the closest thing you can, and explain what you really want to do in that place.

  • Altering index unuseable from a different schema.

    I'm sure I'm overlooking something.
    I was recently tasked with taking an existing ETL process that was in several different schemas and centralize it so the controlling procedures and functions are all in one schema, and the tables that are being loaded are in various schemas.
    We're using a dirrect load, with insert (/* append*/) which is much fast than any other method we've found to load the tables. The trouble I'm having is in disabling the indexes. It's used to be that the procedure that altered the indexes was owned by the same schema that owned the indexes. That was working fine.
    So,
    Schema 'A' owns the table and indexes.
    Schema 'B' owns the procedure that will alter the indexes to set them to unuseable.
    Schema B has been granted GRANT ALTER, INSERT, SELECT, UPDATE, DELETE to all tables in Schema 'A'
    I am logged in a Schema 'B' and I run the following command...
    ALTER INDEX A.PROC_DETAILS_ENC_ID_IDX UNUSABLE
    I get ....
    Index altered.
    However if I run the same thing in a function, I get ...
    ORA-01418: specified index does not exist
    That seems odd to me that I can run it from toad, but not in a function?

    user12221955 wrote:
    That seems odd to me that I can run it from toad, but not in a function?Check role-based vs direct grant privileges. PL/SQL does not like role-based privileges and tends to ignore them while running. Directly granted privileges are not so affected. Directly grant the privileges you want to the PL/SQL procedure owner.

  • Transfer a binary file stored in a table field in oracle to another table different schema in oracle

    I would like to know if it is possible to use ssis to transfer a binary file of a datatype of long raw in a field in one table in oracle to a new table in a different schema of a datatype blob in oracle? The binary file is a Crystal reports executable
    which is used in a application that I support. I are trying to consolidate data fields over many schemas into one main schema to simplify the support issues.

    Hi r_peterser,
    SQL Server Integration Services maps DT_IMAGE data type to LONG RAW and BLOB in Oracle. So, you can directly use an OLE DB Source or Oracle Source adapter to extract the LONG RAW column from the Oracle database, and then load the data to the BLOB column
    of the Oracle table through an OLE DB Destination or Oracle Destination adapter.
    Reference:
    http://technet.microsoft.com/en-us/library/ms141036.aspx 
    Regards,
    Mike Yin
    If you have any feedback on our support, please click
    here
    Mike Yin
    TechNet Community Support

Maybe you are looking for

  • Error when performing uploading a file in a thread worker.

    Could anyone give me some suggestions? I am trying to get the ajax file upload to work in Netbeans Visual Web Pack. I pass the Upload component in the start() method, and perform uploading in the run() method. I get the following errors: WARNING: Can

  • Setting Report Page Size in Ecplise Designer 1.0

    Hello all, I am trying to use Crystal Reports for Eclipse V1.0, and when using the ReportDesigner, I can't find a way to set the size of the report page I am laying out.  by default, it seems to be an 8.5 x 11 inch page, but it defaults to Landscape

  • How to read a file containing bitmap message in binary format

    Dear all, Can anybody tell me how to read bitmap message which stored data in binary format? The messages are stores like this : A file contain some messages along with these bitmaps in square zeroes. I want to again convert it into ASCII.

  • Changing Account question

    Hi, I have a problem with my itunes account. My girlfriend bought me my ipod and put it under her account. I recently got a new computer and tried listening to songs and such but she already has her account authorized on 5 computers. However, what I

  • New computer it won't reconize it!

    I just got a new computer and i moved all my music files etc over to the itunes program. But now it won't reconize my ipod! Help!!