Execute a procedure with a list of array in sql server 2008

HI all,
I have a procedure which has a list of values passed as an array . How can i execute my procedure with array list? how to implement this?Please help me.
Thanks in advance
Deepa

Hi Deepa,
basically Microsoft SQL Server does not support arrays as data types for procedures. What you can do is creating a type which represents a table definition. This type can than be used in a procedure as the following demo will show:
The first script creates the environment which will be used for the execution
-- 1. create the table as a type in the database
CREATE TYPE OrderItems AS TABLE
ItemId int PRIMARY KEY CLUSTERED
GO
-- 2. demo table for demonstration of results
CREATE TABLE dbo.CustomerOrders
Id int NOT NULL IDENTITY (1, 1) PRIMARY KEY CLUSTERED,
CustomerId int NOT NULL,
ItemId int
GO
-- 3. Insert a few records in demo table
INSERT INTO dbo.CustomerOrders
(CustomerId, ItemId)
VALUES
(1, 1),
(2, 1),
(3, 3),
(1, 3);
GO
-- 4. Create the procedure which accepts the table variable
CREATE PROC dbo.OrderedItemsList
@Orders AS OrderItems READONLY
AS
SET NOCOUNT ON;
SELECT o.*
FROM dbo.CustomerOrders AS O INNER JOIN @Orders AS T_O
ON (o.ItemId = T_O.ItemId);
SET NOCOUNT OFF;
GO
The above script creates the table data type and a demo table with a few demo data. The procedure will accept the table data type as parameter. Keep in mind that table variable parameters have to be READONLY as parameter for procedures!
The second script demonstrates the usage of the above scenario
When the environment has been created the usage is a very simple one as you can see from the next script...
-- 1. Fill the variable table with item ids
DECLARE @o AS OrderItems;
INSERT INTO @o (ItemId)
VALUES
(1), (3);
-- 2. Get the list of customers who bought these items
EXEC dbo.OrderedItemsList @Orders = @o;
MCM - SQL Server 2008
MCSE - SQL Server 2012
db Berater GmbH
SQL Server Blog (german only)

Similar Messages

  • Problem with full backup with copy only in maintenance plan sql server 2008

    Hello
    I am starter DBA for sql server in general
    I have problem related to backup with maintenance plan in sql server 2008 and 2008 r2
    I created maintenance plan to take full back up  with copy only option checked, but when I check the back up in backupset table is_copy_only column it shows 0 for databases that I run job for.
    I did the same steps on sql server 2012 and I checked backupset table is_copy_only column it shows 1 for databases that I run job for .so it works as it should be
    Note: all the servers I mention here are production servers 

    Copy-only Backup  by using GUI ( SSMS) in SQL Server 2008 but it was not available in  Maintenance Plan "Back
    Up Database Task". Now in SQL Server 2012 It is included in "Back Up Database
    Task". 
    http://sqlage.blogspot.in/2013/06/dba-maintenance-plan-back-up-database.html

  • How can I execute a Procedure with OUT variable is %ROWTYPE on SQL Prompt

    Hi,
    I have a procedure with OUT variable is %ROWTYPE
    How can I execute the following procedure on SQL prompt.
    (without creating anonymous block)
    CREATE OR REPLACE PROCEDURE zz_sp_EMP(VEMPNO IN EMP.EMPNO%TYPE,
    V_REC IN OUT EMP%ROWTYPE)
    AS
    BEGIN
    SELECT * INTO V_REC FROM EMP WHERE EMPNO = VEMPNO;
    END;
    Thanks & Regards,
    Naresh

    as previous posters said: it's not possible to do this without declaring a variable in the anonymous block.
    With anonymous block it would look like this (had to change it a bit, since i'm using hr-schema on oracle XE):
    declare
    l_rec EMPLOYEES%ROWTYPE;
    begin
    zz_sp_EMP(VEMPNO => 100, V_REC => l_rec);
    DBMS_OUTPUT.PUT_LINE ( 'first_name = ' || l_rec.first_name );
    DBMS_OUTPUT.PUT_LINE ( 'last_name = ' || l_rec.last_name );
    end;
    first_name = Steven
    last_name = King

  • Reporting with Report Builder 3.0 and SQL Server 2008 R2

    Hi everyone
    I'm trying really hard to find books about Report Builder 3.0 or SQL Server 2008 R2
    I found the following books on the "learn" site, sadly they do not cover Report Builder 3.0 or SQL Server 2008 R2 since there all too old.
    Microsoft® SQL Server® 2008 Analysis Services Step by Step
    Microsoft® SQL Server® 2008 MDX Step by Step
    Microsoft® SQL Server® 2008 Reporting Services Step by Step
    What are good books (like the ones above) for the newest system?

    Hello wishmasterIN,
    Thank you to post your question on TechNet forum.
    Based on my experience, the books are always delayed to the new technology, since the author need time to summarize and analyze the new features in the new product or technology, write it down and publish it. If you want to have a quick learning about the
    new technology, MSDN library is a good place. It can be a cookbook for you. It contains some detail steps for tools, such as Report Builder or BIDS. It also contains many new features introduction. It is always very useful for you to understand the new features.
    In addition, it is based on web and many links make you can jump to the other technical point freely. The most important is all of these is free and all the information will be updated if the new feature is released.
    In short, if you want to learn the latest technology about Microsoft product, MSDN is a good choice. I hope my introduction is helpful to you.
    Regards,
    Edward
    Edward Zhu
    TechNet Community Support

  • Update SQL Server 2008 R2 CLUSTER To SP1 With TFS 2010

    Hi,
    I have Cluster SQL Server 2008 R2 configured to store  Team Foundation Server 2010 DBs
    I want to Update this Cluster to SP1 to support Sharepoint DBs 
    So i want to see if this update can impact my TFS DBs 
    Thnx
    vote if you think useful

    Hello,
    I which way is this "Database Design" related, the Topic of this forum?
    You can install the SP 1 without any harm to your TFS 2010 database; we host them on SQL Server 2012 and also this work.
    But instead of the old SP1 you should go with the last SP 3 for SQL Server 2008 R2.
    Olaf Helper
    [ Blog] [ Xing] [ MVP]
    thank you for your reply
    I want to test it in a lab environment
    vote if you think useful

  • How to write a shell script to execute a procedure with out parameter

    Hi,
    How to write a shell script to execute a procedure with out parameter.
    here is my procedure
    PROCEDURE sample(invar1 VARCHAR2,
    invar2 VARCHAR2,
    invar3 VARCHAR2,
    invar4 VARCHAR2,
    ecode out number);
    Any example really helpfull
    Thanks in advance

    Or if we're passing values in, maybe something like:
    Test procedure:
    CREATE OR REPLACE PROCEDURE p (myin IN VARCHAR2, myout OUT VARCHAR2)
    AS
    BEGIN
        myout :=
            CASE myin
                WHEN 'A' THEN 'APPLE'
                WHEN 'B' THEN 'BANANA'
                ELSE 'STARFRUIT'
            END;
    END;Shell script:
    #!/bin/bash
    my_shell_variable=$1
    unset ORACLE_PATH
    sqlplus -s un/pw@db <<-EOF
    set feedback off pause off
    set pagesize 0
    set autoprint off
    VAR out varchar2(30)
    VAR myin varchar2(30)
    exec :myin := '${my_shell_variable}'
    BEGIN
      p(:myin, :out);
    END;
    print out
    exit
    EOFTest:
    /Users/williamr: xx A
    APPLE
    /Users/williamr: xx B
    BANANA
    /Users/williamr: xx
    STARFRUITObviously in a real script you would not hardcode the password or let it show in a "ps" listing.
    Message was edited by:
    William Robertson

  • Getting error code 1 when calling SSIS package from a stored procedure (SQL Server 2008 R2)

    Hello,
    I am trying to execute a SSIS package from SQL Server 2008 R2 stored procedure but getting error code 1 (as per my knowledge, error code description is as below:
    0 The package executed successfully.
    1 The package failed.
    3 The package was canceled by the user.
    4 The utility was unable to locate the requested package. The package could not be found.
    5 The utility was unable to load the requested package. The package could not be loaded.
    6 The utility encountered an internal error of syntactic or semantic errors in the command line.
    Details:
    I have a stored procedure named "Execute_SSIS_Package" (see below sp) which executes 'Import_EMS_Response' SSIS package (when I execute this package directly from SQL Server BID it works fine it means package itself is correct) and calling
    it from SQL as:- EXEC Execute_SSIS_Package 'Import_EMS_Response'.
    Here I receives error code 1.
    Can anyone help me to resolve this issue please?
    Thanks in advance!
    CREATE PROCEDURE [dbo].[Execute_SSIS_Package]
     @strPackage nvarchar(100)
    AS
    BEGIN
     -- SET NOCOUNT ON added to prevent extra result sets from
     -- interfering with SELECT statements.
     SET NOCOUNT ON;
     DECLARE @cmd VARCHAR(8000)
     DECLARE @Result int
     DECLARE @Environment VARCHAR(100)
        SELECT @Environment = Waarde
     FROM  Sys_Settings
     WHERE Optie = 'Omgeving'
     --print @Environment
     SET @strPackage = '"\W2250_NGSQLSERVER\BVT\' + @Environment + '\' + @strPackage + '"'
     SET @cmd = 'dtexec /SQL ' + @strPackage +  ' /SERVER "w2250\NGSQLSERVER"  /Decrypt "BVT_SSIS" /CHECKPOINTING OFF /REPORTING E'
     --print @cmd
     EXECUTE @Result = master..xp_cmdshell @cmd, NO_OUTPUT
     --print @Result
    END

    It has something to do with the security.
    E.g. cmdshell is not enabled or the caller has not rights over the package.
    There could be a syntax error, too.
    I suggest you make the package runnable off a SQL Agent job then trigger the job from the stored proc with
    sp_start_job <job name>
    Arthur
    MyBlog
    Twitter

  • Is DTS supported in SQL server 2008 R2 with Compatibility level 100?

    We have a DTS package which executes one stored procedure.
    We have recently switched SQL server compatibility level from 80 to 100. 
    On Compatibility level 80 it was working fine.
    When i switched the level to 100, and executes DTS it shows successfully executed but stored procedure doenot really executed.
    When i execute stored procedure in query analyzer it executed successfully and results were as expected.
    Please let me know Is DTS supported in SQL server 2008 R2 with Compatibility level 100?

    We have just implemented DTS packages on SQL2008R2 using the Backward Compatibility Tools (serarch for SQLServer2005_BC.msi)
    You need the files:
    SQLServer2005_BC.msi or SQLServer2005_BC_x64.msi
    and SQLServer2005_DTS.msi
    After you install these, perform the following -
    1) To integrate DTS Designer with SSMS:
    Copy the files SEMSFC.DLL, SQLGUI.DLL, and SQLSVC.DLL
    from %ProgramFiles%\Microsoft SQL Server\80\Tools\Binn
    to %ProgramFiles%\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE
    Copy the files SEMSFC.RLL, SQLGUI.RLL, and SQLSVC.RLL
    from %ProgramFiles%\Microsoft SQL Server\80\Tools\Binn\Resources\1033
    to %ProgramFiles%\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\Resources\1033
    2) To integrate DTS Designer with BIDS:
    Copy the files SEMSFC.DLL, SQLGUI.DLL, and SQLSVC.DLL
    from %ProgramFiles%\Microsoft SQL Server\80\Tools\Binn
    to %ProgramFiles%\Microsoft Visual Studio 9.0\Common7\IDE
    Copy the files SEMSFC.RLL, SQLGUI.RLL, and SQLSVC.RLL
    from %ProgramFiles%\Microsoft SQL Server\80\Tools\Binn\Resources\1033
    to %ProgramFiles%\Microsoft Visual Studio 9.0\Common7\IDE\Resources\1033
    T

  • Sql server services give error the remote procedure call failed [0x800706be] in sql server 2008

    sql server services give error the remote procedure call failed [0x800706be] in sql server 2008.
    To resolve this issue, I executed the following mofcomp command in command prompt to re-register the *.mof files:
    mofcomp.exe "C:\Program Files (x86)\Microsoft SQL Server\100\Shared\sqlmgmproviderxpsp2up.mof".
    but it does not work.
    Plz give the exact soln to solve this error.

    sql server services give error the remote procedure call failed [0x800706be] in sql server 2008.
    To resolve this issue, I executed the following mofcomp command in command prompt to re-register the *.mof files:
    mofcomp.exe "C:\Program Files (x86)\Microsoft SQL Server\100\Shared\sqlmgmproviderxpsp2up.mof".
    but it does not work.
    Plz give the exact soln to solve this error.
    So when you tried starting SQL server service it gave the error right  ?  or when you click on SQL server services in SQL server configuration manager(SSCM) you get this error. Can you be more clear.  As far as I read your question it has something
    to do with permission. Close SSCM window and this time  right click on SQL server configuration manager and select run as administrator and check if you can see SQL server services
    Please mark this reply as answer if it solved your issue or vote as helpful if it helped so that other forum members can benefit from it
    My Technet Articles

  • OGG-00868 SQL Server 2008 has problem with ODBC in  the EXTRACT process

    Hello Everyone
    I want to replicate tables between MS SQLServer 2008 and Oracle 10g
    I have Windows XP / MS SQLServer 2008 and Oracle Database 10g R 10.2.0.1.0 running  on Red Hat Linux
    I followed the steps from the white paper (http://www.oracle.com/technetwork/articles/datawarehouse/oracle-sqlserver-goldengate-460262.html)
    and Installed Oracle Golden Gate Version 11.2.1.0.1 (for Linux) and the  Version 11.2.1.0.1 32bits (for Windows XP)
    I followed all steps of the white paper without problem and I could do the initial load in
    the Oracle Database from SQL Server sucessfully.
    But when I tried to set and start the Extract process from SQL SERVER
    a error was generated in the file c:\gg\dirrpt\MSEXT.rpt and the process is ABENDING
    GGSCI >  info all
    Program     Status      Group       Lag at Chkpt  Time Since Chkpt
    MANAGER     RUNNING
    EXTRACT     STOPPED     MSEXT       00:00:00      03:22:29
    2013-08-25 11:59:41  ERROR   OGG-00868  Executing statement for select operation Database error 213 ([Microsoft][SQL Server Native Client 10.0][SQL Server]Column name or number of supplied values does not match table definition.
    [Microsoft][SQL Server Native Client 10.0][SQL Server]DBCC execution completed. If DBCC printed error messages, contact your system administrator.
    [Microsoft][SQL Server Native Client 10.0][SQL Server]Column name or number of supplied values does not match table definition.
    [Microsoft][SQL Server Native Client 10.0][SQL Server]DBCC execution completed. If DBCC printed error messag).
    2013-08-25 11:59:41  ERROR   OGG-01668  PROCESS ABENDING.
    If somebody has a clue or faced something similar please let me how could solve it.
    Thanks
    Juan

    Hello mb_ogg,
    Yes, I had created a Data Source  HR Driver= SQL Server (second Tab System DSN) and I also had tried with
    the driver SQL Server Native Client 10.0 but I faced the same error.
    The database by default is EMP
    Below is my configuration
    Microsoft SQL Server ODBC Driver Version 03.85.1117
    Data Source Name: HR
    Data Source Description:
    Server: JUAN-XP
    Database: EMP
    Language: (Default)
    Translate Character Data: Yes
    Log Long Running Queries: No
    Log Driver Statistics: No
    Use Integrated Security: Yes
    Use Regional Settings: No
    Prepared Statements Option: Drop temporary procedures on disconnect
    Use Failover Server: No
    Use ANSI Quoted Identifiers: Yes
    Use ANSI Null, Paddings and Warnings: Yes
    Data Encryption: No
    I also clicked on the button "Test Data Source" with the below messages:
    Microsoft SQL Server ODBC Driver Version 03.85.1117
    Running connectivity tests...
    Attempting connection
    Connection established
    Verifying option settings
    Disconnecting from server
    TESTS COMPLETED SUCCESSFULLY!
    Then I went to Database Properties (Right Click) /Oprtion  and Recovery model field has Full value
    I also made a Backup (Backup Type = Full)
    The Backups was made to Disk:  C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\Backup\EMP.bak
    Today I repeated the same steps and I got the same error (I Copied at the end):
    I also have the follow question:
    Is necessary define the location of the backup of MS SQL Server to say to GG where it can get it?
    GSCI (juan-xp) 1> DBLOGIN SOURCEDB HR
    2013-08-27 21:16:32  INFO    OGG-03036  Database character set identified as win
    dows-1252. Locale: en_US.
    2013-08-27 21:16:32  INFO    OGG-03037  Session character set identified as wind
    ows-1252.
    Successfully logged into database.
    GGSCI (juan-xp) 3> ADD TRANDATA HRSCHEMA.EMP
    Logging of supplemental log data is enabled for table hrschema.emp
    GGSCI (juan-xp) 4> EDIT PARAMS DEFGEN
    GGSCI (juan-xp) 5> exit
    C:\gg>defgen paramfile c:\gg\dirprm\defgen.prm
          Oracle GoldenGate Table Definition Generator for SQL Server
         Version 11.2.1.0.2 OGGCORE_11.2.1.0.2T3_PLATFORMS_120724.2205
       Windows (optimized), Microsoft SQL Server on Jul 25 2012 03:37:58
    Copyright (C) 1995, 2012, Oracle and/or its affiliates. All rights reserved.
                        Starting at 2013-08-27 21:18:23
    Operating System Version:
    Microsoft Windows XP Professional, on x86
    Version 5.1 (Build 2600: Service Pack 2)
    Process id: 3236
    **            Running with the following parameters                  **
    defsfile c:\gg\dirdef\emp.def
    Source Context :
      SourceModule            : [defgen.main]
      SourceID                : [defgen/defgen.c]
      SourceFunction          : [create_defgen_file]
      SourceLine              : [808]
    2013-08-27 21:18:23  ERROR   OGG-00037  DEFSFILE file c:\gg\dirdef\emp.def alrea
    dy exists.
    2013-08-27 21:18:23  ERROR   OGG-01668  PROCESS ABENDING.
    C:\gg>defgen paramfile c:\gg\dirprm\defgen.prm
          Oracle GoldenGate Table Definition Generator for SQL Server
         Version 11.2.1.0.2 OGGCORE_11.2.1.0.2T3_PLATFORMS_120724.2205
       Windows (optimized), Microsoft SQL Server on Jul 25 2012 03:37:58
    Copyright (C) 1995, 2012, Oracle and/or its affiliates. All rights reserved.
                        Starting at 2013-08-27 21:19:03
    Operating System Version:
    Microsoft Windows XP Professional, on x86
    Version 5.1 (Build 2600: Service Pack 2)
    Process id: 3312
    **            Running with the following parameters                  **
    defsfile c:\gg\dirdef\emp.def
    sourcedb hr
    2013-08-27 21:19:05  INFO    OGG-03036  Database character set identified as win
    dows-1252. Locale: en_US.
    2013-08-27 21:19:05  INFO    OGG-03037  Session character set identified as wind
    ows-1252.
    table hrschema.emp;
    Retrieving definition for hrschema.emp
    Definitions generated for 1 table in c:\gg\dirdef\emp.def
    C:\gg>ggsci
    Oracle GoldenGate Command Interpreter for SQL Server
    Version 11.2.1.0.2 OGGCORE_11.2.1.0.2T3_PLATFORMS_120724.2205
    Windows (optimized), Microsoft SQL Server on Jul 25 2012 02:57:42
    Copyright (C) 1995, 2012, Oracle and/or its affiliates. All rights reserved.
    GGSCI (juan-xp) 1> start manager
    MGR is already running.
    GGSCI (juan-xp) 2> info all
    Program     Status      Group       Lag at Chkpt  Time Since Chkpt
    MANAGER     RUNNING
    GGSCI (juan-xp) 3> ADD EXTRACT MSEXT, TRANLOG, BEGIN NOW
    EXTRACT added.
    GGSCI (juan-xp) 4> ADD RMTTRAIL /u01/app/oracle/gg/dirdat/ms, EXTRACT MSEXT
    RMTTRAIL added.
    GGSCI (juan-xp) 5> EDIT MSEXT
    ERROR: Invalid command.
    GGSCI (juan-xp) 6> edit params msext
    GGSCI (juan-xp) 7> START EXTRACT MSEXT
    Sending START request to MANAGER ('GGSMGR') ...
    EXTRACT MSEXT starting
    GGSCI (juan-xp) 8> show all
    Parameter settings:
    SET SUBDIRS    ON
    SET DEBUG      OFF
    Current directory: C:\gg
    Using subdirectories for all process files
    Editor:  notepad
    Reports (.rpt)                 C:\gg\dirrpt
    Parameters (.prm)              C:\gg\dirprm
    Replicat Checkpoints (.cpr)    C:\gg\dirchk
    Extract Checkpoints (.cpe)     C:\gg\dirchk
    Process Status (.pcs)          C:\gg\dirpcs
    SQL Scripts (.sql)             C:\gg\dirsql
    Database Definitions (.def)    C:\gg\dirdef
    GGSCI (juan-xp) 9> info all
    Program     Status      Group       Lag at Chkpt  Time Since Chkpt
    MANAGER     RUNNING
    EXTRACT     STOPPED     MSEXT       00:00:00      00:02:34
    GGSCI (juan-xp) 10> EDIT MSEXT
    Report MSEXT.rpt with same error
                   Oracle GoldenGate Capture for SQL Server
         Version 11.2.1.0.2 OGGCORE_11.2.1.0.2T3_PLATFORMS_120724.2205
       Windows (optimized), Microsoft SQL Server on Jul 25 2012 03:49:54
    Copyright (C) 1995, 2012, Oracle and/or its affiliates. All rights reserved.
                        Starting at 2013-08-27 21:30:26
    Operating System Version:
    Microsoft Windows XP Professional, on x86
    Version 5.1 (Build 2600: Service Pack 2)
    Process id: 2452
    Description:
    **            Running with the following parameters                  **
    2013-08-27 21:30:26  INFO    OGG-03035  Operating system character set identified as windows-1252. Locale: en_US, LC_ALL:.
    EXTRACT MSEXT
    SOURCEDB HR
    2013-08-27 21:30:28  INFO    OGG-03036  Database character set identified as windows-1252. Locale: en_US.
    2013-08-27 21:30:28  INFO    OGG-03037  Session character set identified as windows-1252.
    TRANLOGOPTIONS MANAGESECONDARYTRUNCATIONPOINT
    RMTHOST OCM, MGRPORT 7809
    RMTTRAIL /u01/app/oracle/gg/dirdat/ms
    TABLE HRSCHEMA.EMP;
    2013-08-27 21:30:28  INFO    OGG-01815  Virtual Memory Facilities for: COM
        anon alloc: MapViewOfFile  anon free: UnmapViewOfFile
        file alloc: MapViewOfFile  file free: UnmapViewOfFile
        target directories:
        C:\gg\dirtmp.
    CACHEMGR virtual memory values (may have been adjusted)
    CACHESIZE:                                1G
    CACHEPAGEOUTSIZE (normal):                4M
    PROCESS VM AVAIL FROM OS (min):        1.57G
    CACHESIZEMAX (strict force to disk):   1.41G
    Database Version:
    Microsoft SQL Server
    Version 10.00.1442
    ODBC Version 03.52.0000
    Driver Information:
    SQLSRV32.DLL
    Version 03.85.1117
    ODBC Version 03.52
    Source Context :
      SourceModule            : [ggvam.param]
      SourceID                : [../gglib/ggvam/cvamparams.cpp]
      SourceFunction          : [com_goldengate_vam::validateIfSqlServer]
      SourceLine              : [1955]
    2013-08-27 21:30:28  ERROR   OGG-00868  Executing statement for select operation Database error 213 ([Microsoft][ODBC SQL Server Driver][SQL Server]Column name or number of supplied values does not match table definition.
    [Microsoft][ODBC SQL Server Driver][SQL Server]DBCC execution completed. If DBCC printed error messages, contact your system administrator.
    [Microsoft][ODBC SQL Server Driver][SQL Server]Column name or number of supplied values does not match table definition.
    [Microsoft][ODBC SQL Server Driver][SQL Server]DBCC execution completed. If DBCC printed error messages, contact your system admi).
    2013-08-27 21:30:28  ERROR   OGG-01668  PROCESS ABENDING.
    Thanks
    Juan

  • Check Stored Procedures after Migration from MS SQL Server 2008 to Oracle11

    I successfully migrated my application database (azteca) from MS SQL Server 2008 to Oracle 11g R2. After migration, I found there are few stored procedures are not valid. How do I check these invalid stored procedures and find what is wrong with them by using SQL Developer? Thanks for your help.
    Kevin

    Hi Kevin,
    You posted quite a bit today, so perhaps you have already worked this out. If not...
    1. View -> Reports -> Data Dictionary Reports -> All Objects -> Invalid Objects [for a specific schema name]
    2. Next, for each invalid stored procedure listed in (1)...
    a. Open in the code editor from the Connections navigator tree
    b. Click on the Compile icon (two gears meshed together) in code editor tool bar.
    c. Look in the Compiler log pane for errors.
    d. Correct the errorsOf course, success in addressing any errors depends on your skill level dealing with Oracle PL/SQL.
    Also, it may be helpful to read over section *3.2 Stored Procedures* in the supplementary migration guide:
    http://docs.oracle.com/cd/E35137_01/doc.32/e18462/trig_stored_proc.htm#CHDEIGBC
    Regards,
    Gary
    SQL Developer Team

  • Creating the report in BI Publisher with SQL SERVER 2008

    Dear Team,
    I want to create report on BI Publisher....i am able to create report with the help of oracle database ...but i dont'nt know how to create DATA MODEL in sql server 2008 ...
    plz tell me the wright way....
    Thanks,
    Him..

    Hi Jin Chen,
    Thank you for your response. I have disabled all the Symantec End Point Protection Service, but problem persists..
    Further, I have checked through the ULS Log in SharePoint, there is more error reported there:
    11/03/2010 15:19:48.44 ReportingServicesService.exe (0x3510)  
    0x4064
    Windows SharePoint Services   Database                      
    6f8g Unexpected
    Unexpected query execution failure, error code 282. Additional error information from SQL Server is included below. "The 'proc_GetTpWebMetaDataAndListMetaData' procedure attempted to return a status of NULL, which is not allowed. A status of 0 will be
    returned instead." Query text (if available): "{?=call proc_GetTpWebMetaDataAndListMetaData(?,'F77D6A37-F8D2-492C-911C-923C8A135DEB',?,NULL,1,?,?,6187)}"
    11/03/2010 15:19:51.46 ReportingServicesService.exe (0x3510)  
    0x4064
    Windows SharePoint Services   General                      
    8e2s Medium  
    Unknown SPRequest error occurred. More information: 0x80020009
    11/03/2010 15:19:51.69 ReportingServicesService.exe (0x3510)  
    0x1EEC
    Windows SharePoint Services   General                      
    8e2s Medium  
    Unknown SPRequest error occurred. More information: 0x80020009
    Do you have any idea based on the error above?

  • SQL Server 2008 KB2977321 Failed with Error code 1642

    As part of application of security patches via windows update, sql server KB2977321 was applied along with a number of OS security patches. 
    Prior to applying the patches, I stopped the agent, engine, reporting, analysis and full text services.
    The Sql server build prior to windows update was (for both instances):
    ProductVersion           
    ProductLevel               
    Edition
    10.0.5500.0                 
    SP3            
    Standard Edition (64-bit)
    After the update process, my main instance is showing (the second instance is not in use yet and I have left it in its stopped state)
    Microsoft SQL Server 2008 (SP3) - 10.0.5520.0 (X64)
    Jul 11 2014 16:11:50
    Copyright (c) 1988-2008 Microsoft Corporation
    Standard Edition (64-bit) on Windows NT 6.1 <X64> (Build 7601: Service Pack 1) (VM)
    In the Administrative Logs after the OS patches were applied (and all were reported as successful by windows update), I found the following errors listed:
    Log Name:     
    Application
    Source:       
    MsiInstaller
    Date:         
    11/18/2014 7:16:45 PM
    Event ID:     
    1024
    Task Category: None
    Level:        
    Error
    Keywords:     
    Classic
    User:         
    SYSTEM
    Computer:     
    SJCDB3.intranet.co.st-johns.fl.us
    Description:
    Product: Microsoft SQL Server 2008 Database Engine Services - Update '{9145CF54-462E-4A28-8FB5-A44C93AD3716}' could not be installed. Error code 1642. Windows Installer can create logs to help troubleshoot
    issues with installing software packages. Use the following link for instructions on turning on logging support: http://go.microsoft.com/fwlink/?LinkId=23127
    Event Xml:
    <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
      <System>
    <Provider Name="MsiInstaller" />
    <EventID Qualifiers="0">1024</EventID>
    <Level>2</Level>
    <Task>0</Task>
    <Keywords>0x80000000000000</Keywords>
    <TimeCreated SystemTime="2014-11-19T00:16:45.000000000Z" />
    <EventRecordID>1764186</EventRecordID>
    <Channel>Application</Channel>
    <Computer>SJCDB3.intranet.co.st-johns.fl.us</Computer>
    <Security UserID="S-1-5-18" />
      </System>
      <EventData>
    <Data>Microsoft SQL Server 2008 Database Engine Services</Data>
    <Data>{9145CF54-462E-4A28-8FB5-A44C93AD3716}</Data>
    <Data>1642</Data>
    <Data>(NULL)</Data>
    <Data>(NULL)</Data>
    <Data>(NULL)</Data>
    <Data>
    </Data>
    <Binary>7B38373544383436332D313135422D343444322D414432352D3731454337453833423843437D207B39313435434635342D343632452D344132382D384642352D4134344339334144333731367D2031363432</Binary>
      </EventData>
    </Event>
    In the C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Log\20141118_191448\Detail.txt file I found the following around the time the error was reported
    2014-11-18 19:16:30 Slp: Baseline Package Id sql_engine_core_inst_Cpu64 - The highest patch version is 10.3.5500.0
    2014-11-18 19:16:30 Slp: Patch Id KB2977321_sql_engine_core_inst_Cpu64 - NotInstalled on the baseline msi package sql_engine_core_inst_Cpu64. 
    Detail description of this patch package is: PatchId=KB2977321_sql_engine_core_inst_Cpu64 PatchVersion=10.3.5520.0 BaselinePackageId=sql_engine_core_inst_Cpu64 BaselineVersion=10.3.5500.0; PatchFileName=sql_engine_core_inst.msp PatchCode={9145CF54-462E-4A28-8FB5-A44C93AD3716}
    2014-11-18 19:16:30 Slp: Patch Id: KB2977321_sql_engine_core_inst_Cpu32 - The baseline msi is not installed. 
    The patch package is ignored.
    2014-11-18 19:16:30 Slp: Patch Id: KB2977321_sql_engine_core_inst_Cpu32 - Detail description of this patch package is: PatchId=KB2977321_sql_engine_core_inst_Cpu32 PatchVersion=10.3.5520.0 BaselinePackageId=sql_engine_core_inst_Cpu32
    BaselineVersion=10.3.5500.0; PatchFileName=sql_engine_core_inst.msp PatchCode={9145CF54-462E-4A28-8FB5-A44C93AD3716}
    2014-11-18 19:16:30 Slp: Baseline Package Id sql_rs_Cpu64 - The highest patch version is 10.3.5500.0
    2014-11-18 19:16:30 Slp: Patch Id KB2977321_sql_rs_Cpu64 - NotInstalled on the baseline msi package sql_rs_Cpu64. 
    Detail description of this patch package is: PatchId=KB2977321_sql_rs_Cpu64 PatchVersion=10.3.5520.0 BaselinePackageId=sql_rs_Cpu64 BaselineVersion=10.3.5500.0; PatchFileName=sql_rs.msp PatchCode={2296F7DD-2D3D-4802-B61A-AE7460EFB767}
    2014-11-18 19:16:30 Slp: Patch Id: KB2977321_sql_rs_Cpu32 - The baseline msi is not installed. 
    The patch package is ignored.
    2014-11-18 19:16:30 Slp: Patch Id: KB2977321_sql_rs_Cpu32 - Detail description of this patch package is: PatchId=KB2977321_sql_rs_Cpu32 PatchVersion=10.3.5520.0 BaselinePackageId=sql_rs_Cpu32 BaselineVersion=10.3.5500.0;
    PatchFileName=sql_rs.msp PatchCode={2296F7DD-2D3D-4802-B61A-AE7460EFB767}
    2014-11-18 19:16:30 Slp: Baseline Package Id sql_is_Cpu64 - The highest patch version is 10.3.5500.0
    2014-11-18 19:16:30 Slp: Patch Id KB2977321_sql_is_Cpu64 - NotInstalled on the baseline msi package sql_is_Cpu64. 
    Detail description of this patch package is: PatchId=KB2977321_sql_is_Cpu64 PatchVersion=10.3.5520.0 BaselinePackageId=sql_is_Cpu64 BaselineVersion=10.3.5500.0; PatchFileName=sql_is.msp PatchCode={E870296C-24CC-4D82-BB59-CD136692E2BD}
    2014-11-18 19:16:30 Slp: Baseline Package Id sql_bids_Cpu64 - The highest patch version is 10.3.5500.0
    2014-11-18 19:16:30 Slp: Patch Id KB2977321_sql_bids_Cpu64 - NotInstalled on the baseline msi package sql_bids_Cpu64. 
    Detail description of this patch package is: PatchId=KB2977321_sql_bids_Cpu64 PatchVersion=10.3.5520.0 BaselinePackageId=sql_bids_Cpu64 BaselineVersion=10.3.5500.0; PatchFileName=sql_bids.msp PatchCode={EA407FA6-C2D1-4D3D-9227-B9E06DDDEFD0}
    2014-11-18 19:16:30 Slp: Baseline Package Id sql_ssms_Cpu64 - The highest patch version is 10.3.5500.0
    2014-11-18 19:16:30 Slp: Patch Id KB2977321_sql_ssms_Cpu64 - NotInstalled on the baseline msi package sql_ssms_Cpu64. 
    Detail description of this patch package is: PatchId=KB2977321_sql_ssms_Cpu64 PatchVersion=10.3.5520.0 BaselinePackageId=sql_ssms_Cpu64 BaselineVersion=10.3.5500.0; PatchFileName=sql_ssms.msp PatchCode={8A81B870-E8F0-415D-AC80-13BEAA3EC8C8}
    2014-11-18 19:16:30 Slp: Baseline Package Id: sql_common_core_Cpu64 - No patches are found by SQL Discovery on the installed package whose ProductCode is {5340A3B5-3853-4745-BED2-DD9FF5371331}
    2014-11-18 19:16:30 Slp: Patch Id KB2977321_sql_common_core_Cpu64 - NotInstalled on the baseline msi package sql_common_core_Cpu64. 
    Detail description of this patch package is: PatchId=KB2977321_sql_common_core_Cpu64 PatchVersion=10.3.5520.0 BaselinePackageId=sql_common_core_Cpu64 BaselineVersion=10.3.5500.0; PatchFileName=sql_common_core.msp PatchCode={CF023E0F-3A19-4DBF-BCA3-0F664B447EDB}
    The instance came up successfully and seems to be operating normally. Was there an error or was the KB installed correctly as the result of the windows update process indicated? 
    Is there a way I can verify this? 

    I did some research on this particular KB article and it seems to be related to Master Data Services which I am not using.  The KB was pushed automatically and I am not sure that it was a required update in our situation. I'd like to understand exactly
    what caused the error message before initiating a repair as this is a production and not a test environment.  Everything appears to be functioning properly and I have received direction from Microsoft in the past that information in some logs identified
    as level 'error' are in fact to be ignored.  I checked the windows update and this KB shows 'Successful' rather than failed or cancelled.
    I would also like more information on why sql server services should not be stopped prior to allowing the OS patches to be applied.   I have received messages in the past that stopping the services before service packs are applied
    prevent the necessity for a reboot of the machine.  I've never heard before that it is a best practice not to stop Sql service prior to applying patches.  Once the services are stopped, I have our infrastructure admin start a VM snapshot on
    the machine then kick off the windows update process. When done, I reboot the machine, test out Sql Server processes and then if all goes well give the ok to release the VM snapshot.  I've supported various databases for 12 years, Sql Server for 5
    years and this is the first time I've heard stopping the service manually can cause problems.  If that is the case, I will certainly change how I do things....
    I did run the discovery report and the results follow:
    Microsoft SQL Server 2008 Setup Discovery Report
    Product
    Instance
    Instance ID
    Feature
    Language
    Edition
    Version
    Clustered
    Sql Server 2008
    MSSQLSERVER
    MSSQL10.MSSQLSERVER
    Database Engine Services
    1033
    Standard Edition
    10.3.5520.0
    No
    Sql Server 2008
    MSSQLSERVER
    MSSQL10.MSSQLSERVER
    SQL Server Replication
    1033
    Standard Edition
    10.3.5520.0
    No
    Sql Server 2008
    MSSQLSERVER
    MSSQL10.MSSQLSERVER
    Full-Text Search
    1033
    Standard Edition
    10.3.5500.0
    No
    Sql Server 2008
    MSSQLSERVER
    MSAS10.MSSQLSERVER
    Analysis Services
    1033
    Standard Edition
    10.3.5500.0
    No
    Sql Server 2008
    MSSQLSERVER
    MSRS10.MSSQLSERVER
    Reporting Services
    1033
    Standard Edition
    10.3.5520.0
    No
    Sql Server 2008
    EVAULT
    MSSQL10.EVAULT
    Database Engine Services
    1033
    Standard Edition
    10.3.5520.0
    No
    Sql Server 2008
    Management Tools - Basic
    1033
    Standard Edition
    10.3.5520.0
    No
    Sql Server 2008
    Management Tools - Complete
    1033
    Standard Edition
    10.3.5500.0
    No
    Sql Server 2008
    Client Tools Connectivity
    1033
    Standard Edition
    10.3.5500.0
    No
    Sql Server 2008
    Client Tools Backwards Compatibility
    1033
    Standard Edition
    10.3.5500.0
    No
    Sql Server 2008
    Client Tools SDK
    1033
    Standard Edition
    10.3.5500.0
    No
    Sql Server 2008
    Integration Services
    1033
    Standard Edition
    10.3.5520.0
    No

  • Temporarily disable Digital Signature Checks to Install MS SQL Server 2008 with no Internet Access

    I am attempting to install a licensed copy of MS SQL Server 2008 in a Private Enclave that does NOT have Internet access on a Win2008 R2 SP1 server (that is VM - thus I can't reboot and press F8 to select "Disable Driver Signature Enforcement"
    ). The installation fails with an error of the vc_red.cab file being found either corrupt or a bad digital signature.  The file is good, but the signature has an expiration of 2011.   I understand that a DOTNET SDK v1.1 program called setreg.exe
    will enable disabling the digital signature check, but I am not permitted to use that program. 
    I might be permitted to use the "Signtool.exe" utility, but it is not clear what command sequences are necessary to disable and then re-enable the Digital Signature checks.
    I saw a thread that recommended using the command:
    bcdedit.exe /set nointegritychecks ON
    However, the comments indicated that this might not have worked.
    Are there Registry settings I can use with regedit to make the necessary changes to be able to install the application?  I anticipate running into this problem with other software when I do not have Internet connectivity.   I already tried
    downloading the Microsoft CRL files; updated the lists on the Server; and rebooted.  This did not solve my problem.  

    Hi,
    As far as I know, it is not recommended to disable digital signature check.
    Since we are not familair with installing MS SQL server, please also refer to SQL forums below to see if experts there have more insights regarding the matter.
    https://social.technet.microsoft.com/Forums/sqlserver/en-US/home
    Best Regards,
    Amy
    Please remember to mark the replies as answers if they help and un-mark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact [email protected]

  • IS there a way to view all the queries executed against a table in sql server 2008 R2

    Hi,
    We would like  to see if a table is getting updated or deleted from external source. Hence we want to know how to see list of queries run against a particular table in sql server 2008 R2.
    Thanks,
    Preetha

    Hi,
    We would like  to see if a table is getting updated or deleted from external source. Hence we want to know how to see list of queries run against a particular table in sql server 2008 R2.
    Thanks,
    Preetha
    Audit, Trigger and custom profiler can be used.
    Balmukund Lakhani
    Please mark solved if I've answered your question, vote for it as helpful to help other users find a solution quicker
    This posting is provided "AS IS" with no warranties, and confers no rights.
    My Blog |
    Team Blog | @Twitter
    | Facebook
    Author: SQL Server 2012 AlwaysOn -
    Paperback, Kindle

Maybe you are looking for

  • Re-download of Mavericks - App Store issue

    Hi! Just got my shiny new Retina MacBook Pro, which came with Mavericks on it. I want to create a USB recovery disk with Diskmaker X, the way it has been outlined on several webpages. When locating Mavericks in App Store and clicking Download, I am n

  • How to retrieve iPhone tracking information from iPhone.

    Does anyone know how to get the tracking information off of the iPhone?  I am trying to get this information as I am fighting a parking ticket I received while my car was valet'd, but have no other record of being at the bar on the night in question

  • Photoshop Elements 13 won't open

    I installed Photoshop Elements 13 but it won't open and I am not getting an error message so I don't know what to fix.  Photoshop tells me that sign in is required, so I sign in: Then I accept the license agreement: Then, nothing happens, the applica

  • How can I get source of JMF?

    is there any way to get source of JMF? I can get J2SE source easily unlike JMF somebody please tell me how to get this.

  • How to import CD movie into imovie

    i just made a CD on imovie on my friends Imac. I came home to play it on mine but when i click to play it (by clikcing the CD) it gives me an error reading saying it does not have the support to play it. maybe i could play it by importing it to imovi