Conversion of SQL Server 2005 script to PL/SQL

I want to conver the below script into PL/SQL
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[AuditLog]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[AuditLog](
     [GroupID] [int] NOT NULL,
     [ID] [int] NOT NULL,
     [TableName] [varchar](25) NOT NULL,
     [FieldName] [varchar](25) NOT NULL,
     [FieldType] [varchar](25) NULL,
     [OldValue] [text] NOT NULL,
     [NewValue] [text] NOT NULL,
     [ChangedOn] [timestamp] NOT NULL,
     [ChangedBy] [int] NOT NULL,
CONSTRAINT [PK_AuditLog_ID] UNIQUE NONCLUSTERED
     [ID] ASC
)WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[UserRights]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[UserRights](
     [UserID] [int] NULL,
     [MenuName] [varchar](25) NULL,
     [IsEnabled] [int] NULL,
CONSTRAINT [PK_UserRights_UserID] UNIQUE NONCLUSTERED
     [UserID] ASC
)WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[GradeMaster]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[GradeMaster](
     [ID] [int] NULL,
     [Name] [varchar](25) NULL,
     [Description] [varchar](25) NULL,
     [From] [float] NULL,
     [To] [float] NULL,
CONSTRAINT [PK_GradeMaster_ID] UNIQUE NONCLUSTERED
     [ID] ASC
)WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[CostGroup]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[CostGroup](
     [ID] [int] NOT NULL,
     [Name] [varchar](25) NOT NULL,
CONSTRAINT [PK_CostGroup_ID] UNIQUE NONCLUSTERED
     [ID] ASC
)WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ToIndex]') AND type in (N'FN', N'IF', N'TF', N'FS', N'FT'))
BEGIN
execute dbo.sp_executesql @statement = N'
** Function dbo.ToIndex
CREATE FUNCTION [dbo].[ToIndex](@string_to_index VARCHAR(1024))
RETURNS VARCHAR(1024)
AS
BEGIN
DECLARE @temp VARCHAR(1024)
DECLARE @ivar VARCHAR(1024)
DECLARE @tmps VARCHAR(1)
SET @temp = ''''
SET @ivar = UPPER(@string_to_index)
DECLARE @i INTEGER
SET @i = 1
WHILE (@i <= LEN(@string_to_index))
BEGIN
SET @tmps = SUBSTRING(@ivar, @i, 1)
IF (ASCII(@tmps) >= 48 AND ASCII(@tmps) <= 57) OR (ASCII(@tmps) >= 65 AND ASCII(@tmps) <= 90)
BEGIN
SET @temp = @temp + @tmps
END
SET @i = @i + 1
END
RETURN @temp
END
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[MasterID]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[MasterID](
     [TableID] [int] NOT NULL,
     [TableName] [varchar](25) NOT NULL,
     [NextID] [int] NULL DEFAULT ((1)),
CONSTRAINT [PK_MasterID_TableID] UNIQUE NONCLUSTERED
     [TableID] ASC
)WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[UserList]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[UserList](
     [ID] [int] NOT NULL,
     [Name] [varchar](25) NOT NULL,
     [Password] [varchar](25) NOT NULL,
     [FullName] [varchar](25) NULL,
CONSTRAINT [PK_UserList_ID] UNIQUE NONCLUSTERED
     [ID] ASC
)WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Product]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[Product](
     [GroupID] [int] NOT NULL,
     [ID] [int] NOT NULL,
     [Name] [varchar](50) NOT NULL,
     [GrossMargin] [float] NULL DEFAULT ((0)),
     [RMC] [float] NULL DEFAULT ((0)),
     [Packing] [float] NULL DEFAULT ((0)),
     [Overhead] [float] NULL DEFAULT ((0)),
     [Others] [float] NULL DEFAULT ((0)),
     [TotalCost] [float] NULL DEFAULT ((0)),
     [DPRate] [float] NULL DEFAULT ((0)),
     [CreatedOn] [datetime] NULL DEFAULT (getdate()),
     [CreatedBy] [int] NULL DEFAULT ((1)),
     [UpdatedOn] [datetime] NULL DEFAULT (getdate()),
     [UpdatedBy] [int] NULL DEFAULT ((1)),
CONSTRAINT [PK_Product_GroupID_ID] UNIQUE NONCLUSTERED
     [GroupID] ASC,
     [ID] ASC
)WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[RawMaterial]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[RawMaterial](
     [GroupID] [int] NOT NULL,
     [ID] [int] NOT NULL,
     [Name] [varchar](50) NOT NULL,
     [CurPrice] [float] NULL,
     [OldPrice] [float] NULL,
     [CreatedOn] [datetime] NULL,
     [CreatedBy] [int] NULL,
     [UpdatedOn] [datetime] NULL,
     [UpdatedBy] [int] NULL,
CONSTRAINT [PK_RawMaterial_GroupID_ID] UNIQUE NONCLUSTERED
     [GroupID] ASC,
     [ID] ASC
)WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Recipe]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[Recipe](
     [GroupID] [int] NOT NULL,
     [ID] [int] NOT NULL,
     [WEFDate] [datetime] NOT NULL,
     [ProductID] [int] NOT NULL,
     [RawMaterialID] [int] NOT NULL,
     [Seq] [int] NOT NULL,
     [Quantity] [float] NOT NULL,
     [RMCost] [float] NOT NULL,
     [CreatedOn] [datetime] NULL,
     [CreatedBy] [int] NULL,
     [UpdatedOn] [datetime] NULL,
     [UpdatedBy] [int] NULL,
CONSTRAINT [PK_Recipe_GroupID_Seq_ProductID_RawMaterialID] UNIQUE NONCLUSTERED
     [GroupID] ASC,
     [Seq] ASC,
     [ProductID] ASC,
     [RawMaterialID] ASC
)WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[spCalcGM]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'-- =============================================
-- Author:          Mohammed Haris
-- Create date: 24-12-2006
-- Description:     RMC Calculator
-- =============================================
CREATE PROCEDURE [dbo].[spCalcGM]
     -- Add the parameters for the function here
     @GroupID int,
     @ProductID int,
     @RM_ID int,
     @Price int = 0
AS
BEGIN
     --SET NOCOUNT ON
     -- Declare the return variable here
     DECLARE @Result               float
     DECLARE @SumCurPrice0     float
     DECLARE @SumCurPrice     float
     DECLARE @SumOldPrice     float
     DECLARE @SumQuantity     float
     DECLARE @SumRMC               float
     DECLARE @PTotalCost          float
     DECLARE @PDPRate          float
     -- Add the T-SQL statements to compute the return value here
     SELECT     @SumCurPrice0 = SUM(Recipe.Quantity * RawMaterial.CurPrice)
     FROM     RawMaterial INNER JOIN
               Recipe ON RawMaterial.ID = Recipe.RawMaterialID
     WHERE     (Recipe.ProductID = @ProductID)
          AND (Recipe.RawMaterialID <> @RM_ID)
          AND (Recipe.GroupID = @GroupID)
     /*IF ISNULL(@SumCurPrice0)*/
          SET @SumCurPrice = ISNULL(@SumCurPrice0, 0)
     /*ELSE
          SET @SumCurPrice = @SumCurPrice0*/
     IF @Price = 0
          SELECT     @SumOldPrice = SUM(Recipe.Quantity * RawMaterial.CurPrice)
          FROM     RawMaterial INNER JOIN
                    Recipe ON RawMaterial.ID = Recipe.RawMaterialID
          WHERE     (Recipe.ProductID = @ProductID)
               AND (Recipe.RawMaterialID = @RM_ID)
               AND (Recipe.GroupID = @GroupID)
     ELSE
          SELECT     @SumOldPrice = SUM(Recipe.Quantity * RawMaterial.OldPrice)
          FROM     RawMaterial INNER JOIN
                    Recipe ON RawMaterial.ID = Recipe.RawMaterialID
          WHERE     (Recipe.ProductID = @ProductID)
               AND (Recipe.RawMaterialID = @RM_ID)
               AND (Recipe.GroupID = @GroupID)
     SELECT     @SumQuantity = SUM(Recipe.Quantity)
     FROM     Recipe
     WHERE     (Recipe.ProductID = @ProductID)
          AND (Recipe.GroupID = @GroupID)
     SELECT     @SumRMC = (@SumCurPrice + @SumOldPrice) / @SumQuantity
     SELECT     @PTotalCost = (Product.Packing + Product.Overhead + Product.Others),
               @PDPRate = Product.DPRate
     FROM     Product
     WHERE     (Product.ID = @ProductID) AND (Product.GroupID = @GroupID)
     SELECT     @PTotalCost = @PTotalCost + @SumRMC
     SELECT     @Result = (@PDPRate - @PTotalCost) / @PDPRate
     SELECT
          @SumCurPrice0 AS SumCurPrice0,
          @SumCurPrice AS SumCurPrice,
          @SumOldPrice AS SumOldPrice,
          @SumQuantity AS SumQuantity,
          @SumRMC AS SumRMC
     -- Return the result of the function
     RETURN @Result
END
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[sp_UpdateTotalCostAndGMForAllProducts]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'CREATE PROCEDURE
     [dbo].[sp_UpdateTotalCostAndGMForAllProducts]
AS
BEGIN
     UPDATE Product
          SET Product.TotalCost = Product.RMC + Product.Packing + Product.Overhead + Product.Others
     UPDATE Product
          SET Product.GrossMargin = (Product.DPRate - Product.TotalCost) / Product.DPRate
END
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[sp_UpdateTotalCostAndGMForProduct]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'CREATE PROCEDURE
     [dbo].[sp_UpdateTotalCostAndGMForProduct] (@ProductID int)
AS
BEGIN
     UPDATE Product
          SET Product.TotalCost = Product.RMC + Product.Packing + Product.Overhead + Product.Others
          WHERE Product.ID = @ProductID
     UPDATE Product
          SET Product.GrossMargin = (Product.DPRate - Product.TotalCost) / Product.TotalCost
          WHERE Product.ID = @ProductID
END
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[CalcGM]') AND type in (N'FN', N'IF', N'TF', N'FS', N'FT'))
BEGIN
execute dbo.sp_executesql @statement = N'-- =============================================
-- Author:          Mohammed Haris
-- Create date: 24-12-2006
-- Description:     RMC Calculator
-- =============================================
CREATE FUNCTION [dbo].[CalcGM]
     -- Add the parameters for the function here
     @GroupID int,
     @ProductID int,
     @RM_ID int,
     @Price int = 0
RETURNS float
AS
BEGIN
     --SET NOCOUNT ON
     -- Declare the return variable here
     DECLARE @Result               float
     DECLARE @SumCurPrice     float
     DECLARE @SumOldPrice     float
     DECLARE @SumQuantity     float
     DECLARE @SumRMC               float
     DECLARE @PTotalCost          float
     DECLARE @PDPRate          float
     -- Add the T-SQL statements to compute the return value here
     SELECT     @SumCurPrice = SUM(Recipe.Quantity * RawMaterial.CurPrice)
     FROM     RawMaterial INNER JOIN
               Recipe ON RawMaterial.ID = Recipe.RawMaterialID
     WHERE     (Recipe.ProductID = @ProductID)
          AND (Recipe.RawMaterialID <> @RM_ID)
          AND (Recipe.GroupID = @GroupID)
     SET @SumCurPrice = ISNULL(@SumCurPrice, 0)
     IF @Price = 0
          SELECT     @SumOldPrice = SUM(Recipe.Quantity * RawMaterial.CurPrice)
          FROM     RawMaterial INNER JOIN
                    Recipe ON RawMaterial.ID = Recipe.RawMaterialID
          WHERE     (Recipe.ProductID = @ProductID)
               AND (Recipe.RawMaterialID = @RM_ID)
               AND (Recipe.GroupID = @GroupID)
     ELSE
          SELECT     @SumOldPrice = SUM(Recipe.Quantity * RawMaterial.OldPrice)
          FROM     RawMaterial INNER JOIN
                    Recipe ON RawMaterial.ID = Recipe.RawMaterialID
          WHERE     (Recipe.ProductID = @ProductID)
               AND (Recipe.RawMaterialID = @RM_ID)
               AND (Recipe.GroupID = @GroupID)
     SELECT     @SumQuantity = SUM(Recipe.Quantity)
     FROM     Recipe
     WHERE     (Recipe.ProductID = @ProductID)
          AND (Recipe.GroupID = @GroupID)
     SELECT     @SumRMC = (@SumCurPrice + @SumOldPrice) / @SumQuantity
     SELECT     @PTotalCost = (Product.Packing + Product.Overhead + Product.Others),
               @PDPRate = Product.DPRate
     FROM     Product
     WHERE     (Product.ID = @ProductID) AND (Product.GroupID = @GroupID)
     SELECT     @PTotalCost = @PTotalCost + @SumRMC
     SELECT     @Result = (@PDPRate - @PTotalCost) / @PDPRate
     -- Return the result of the function
     RETURN @Result
END
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[sp_RMCostImplication]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'CREATE PROCEDURE [dbo].[sp_RMCostImplication]
     @GroupID int = 1,
     @RM_ID int = 1
AS
BEGIN
     -- SET NOCOUNT ON added to prevent extra result sets from
     -- interfering with SELECT statements.
     SET NOCOUNT ON;
     -- Insert statements for procedure here
     SELECT Product.Name, Product.DPRate, RawMaterial.Name AS RMName,
          RawMaterial.CurPrice,
          dbo.CalcGM(@GroupID, Product.ID, @RM_ID, 0)*100 AS CurGM,
          RawMaterial.OldPrice,
          dbo.CalcGM(@GroupID, Product.ID, @RM_ID, 1)*100 AS OldGM
     FROM Product INNER JOIN
          Recipe ON Product.ID = Recipe.ProductID INNER JOIN
          RawMaterial ON Recipe.RawMaterialID = RawMaterial.ID
     WHERE (Product.GroupID = @GroupID) AND (RawMaterial.ID = @RM_ID)
     ORDER BY Product.Name
END
END
GO
IF NOT EXISTS (SELECT * FROM sys.foreign_keys WHERE object_id = OBJECT_ID(N'[dbo].[FK_Product_GroupID]') AND parent_object_id = OBJECT_ID(N'[dbo].[Product]'))
ALTER TABLE [dbo].[Product] WITH CHECK ADD CONSTRAINT [FK_Product_GroupID] FOREIGN KEY([GroupID])
REFERENCES [dbo].[CostGroup] ([ID])
GO
ALTER TABLE [dbo].[Product] CHECK CONSTRAINT [FK_Product_GroupID]
GO
IF NOT EXISTS (SELECT * FROM sys.foreign_keys WHERE object_id = OBJECT_ID(N'[dbo].[FK_RawMaterial_GroupID]') AND parent_object_id = OBJECT_ID(N'[dbo].[RawMaterial]'))
ALTER TABLE [dbo].[RawMaterial] WITH CHECK ADD CONSTRAINT [FK_RawMaterial_GroupID] FOREIGN KEY([GroupID])
REFERENCES [dbo].[CostGroup] ([ID])
GO
ALTER TABLE [dbo].[RawMaterial] CHECK CONSTRAINT [FK_RawMaterial_GroupID]
GO
IF NOT EXISTS (SELECT * FROM sys.foreign_keys WHERE object_id = OBJECT_ID(N'[dbo].[FK_Recipe_GroupID_ProductID]') AND parent_object_id = OBJECT_ID(N'[dbo].[Recipe]'))
ALTER TABLE [dbo].[Recipe] WITH CHECK ADD CONSTRAINT [FK_Recipe_GroupID_ProductID] FOREIGN KEY([GroupID], [ProductID])
REFERENCES [dbo].[Product] ([GroupID], [ID])
GO
ALTER TABLE [dbo].[Recipe] CHECK CONSTRAINT [FK_Recipe_GroupID_ProductID]
GO
IF NOT EXISTS (SELECT * FROM sys.foreign_keys WHERE object_id = OBJECT_ID(N'[dbo].[FK_Recipe_GroupID_RawMaterialID]') AND parent_object_id = OBJECT_ID(N'[dbo].[Recipe]'))
ALTER TABLE [dbo].[Recipe] WITH CHECK ADD CONSTRAINT [FK_Recipe_GroupID_RawMaterialID] FOREIGN KEY([GroupID], [RawMaterialID])
REFERENCES [dbo].[RawMaterial] ([GroupID], [ID])
GO
ALTER TABLE [dbo].[Recipe] CHECK CONSTRAINT [FK_Recipe_GroupID_RawMaterialID]
Edited by: yogeshyl on Jul 28, 2009 4:50 PM

Dear yogeshyl!
OK, Let's try this step by step. I assume that you want to use Oracle in a version above 9i R2.
-- Please change the size x to a value that fits your needs. Every tablespace needs a datafile.
-- Please change <path_and_filename>.dbf to something like C:\oracle\oradata\ORCL\primary01.dbf.
CREATE TABLESPACE primary
DATAFILE '<path_and_filename>.dbf' SIZE x M;
CREATE USER object_owner
IDENTIFIED BY password
DEFAULT TABLESPACE primary
TEMPORARY TABLESPACE temp
QUOTA unlimited ON primary;
DROP TABLE object_owner.auditlog;
CREATE TABLE object_owner.auditlog
GroupID           NUMBER NOT NULL,
ID                NUMBER NOT NULL CONSTRAINT pk_auditlog_id PRIMARY KEY,
table_name        VARCHAR2(25) NOT NULL,
field_name        VARCHAR2(25) NOT NULL,
field_type        VARCHAR2(25) NULL,
old_value         VARCHAR2(4000) NOT NULL,
new_value         VARCHAR2(4000) NOT NULL,
changed_on        TIMESTAMP NOT NULL,
changed_by        NUMBER NOT NULL
DROP TABLE object_owner.userrights;
CREATE TABLE object_owner.userrights
UserID       NUMBER NULL CONSTRAINT pk_userrights_userid PRIMARY KEY,
MenuName     VARCHAR2(25),
IsEnabled    NUMBER
DROP TABLE object_owner.grademaster;
CREATE TABLE object_owner.grademaster
ID          NUMBER NULL CONSTRAINT pk_grademaster_id PRIMARY KEY,
Name        VARCHAR2(25),
Description VARCHAR2(25),
source      NUMBER,
destination NUMBER
DROP TABLE object_owner.costgroup;
CREATE TABLE object_owner.costgroup(
ID          NUMBER NOT NULL CONSTRAINT pk_costgroup_id PRIMARY KEY,
Name        VARCHAR2(25) NOT NULL
DROP TABLE object_owner.masterid;
CREATE TABLE object_owner.masterid
TableID     NUMBER NOT NULL CONSTRAINT pk_masterid_table_id PRIMARY KEY,
TableName   VARCHAR2(25) NOT NULL,
NextID      NUMBER DEFAULT ((1))
DROP TABLE object_owner.user_list;
CREATE TABLE object_owner.userlist
ID       NUMBER NOT NULL CONSTRAINT pk_userlist_id PRIMARY KEY,
Name     VARCHAR2(25) NOT NULL,
Password VARCHAR2(25) NOT NULL,
FullName VARCHAR2(25)
DROP TABLE object_owner.product;
CREATE TABLE dbo.Product
GroupID        NUMBER NOT NULL,
ID             NUMBER NOT NULL,
Name           VARCHAR2(50) NOT NULL,
GrossMargin    NUMBER DEFAULT ((0)),
RMC            NUMBER DEFAULT ((0)),
Packing        NUMBER DEFAULT ((0)),
Overhead       NUMBER DEFAULT ((0)),
Others         NUMBER DEFAULT ((0)),
TotalCost      NUMBER DEFAULT ((0)),
DPRate         NUMBER DEFAULT ((0)),
CreatedOn      DATE DEFAULT SYSDATE,
CreatedBy      NUMBER DEFAULT ((1)),
UpdatedOn      DATE DEFAULT SYSDATE,
UpdatedBy      NUMBER DEFAULT ((1)),
CONSTRAINT pk_product_groupid_id PRIMARY KEY (id, groupid);
DROP TABLE object_owner.rawmaterial;
CREATE TABLE object_owner.rawmaterial(
GroupID NUMBER NOT NULL,
ID        NUMBER NOT NULL,
Name      VARCHAR2(50) NOT NULL,
CurPrice  NUMBER,
OldPrice  NUMBER,
CreatedOn DATE,
CreatedBy NUMBER,
UpdatedOn DATE,
UpdatedBy NUMBER,
CONSTRAINT pk_rawmaterial_groupid_id PRIMARY KEY (groupid, id)
DROP TABLE object_owner.recipe;
CREATE TABLE object_owner.recipe
GroupID NUMBER NOT NULL,
ID            NUMBER NOT NULL,
WEFDate       DATE NOT NULL,
ProductID     NUMBER NOT NULL,
RawMaterialID NUMBER NOT NULL,
Seq           NUMBER NOT NULL,
Quantity      NUMBER NOT NULL,
RMCost        NUMBER NOT NULL,
CreatedOn     DATE,
CreatedBy     NUMBER,
UpdatedOn     DATE,
UpdatedBy     NUMBER,
CONSTRAINT pk_r_gid_pid_rawmaterial_id PRIMARY KEY (GroupID, Seq, productid, rawmaterialID)
CREATE OR REPLACE FUNCTION object_owner.to_index(p_string_to_index IN VARCHAR2) RETURN VARCHAR2
IS
l_temp VARCHAR2(1024);
l_ivar   VARCHAR2(1024);
l_tmps VARCHAR2(1);
BEGIN
  l_ivar := UPPER(p_string_to_index);
  FOR i IN 1..LENGTH(p_string_to_index) LOOP
    l_tmps := SUBSTR(l_ivar, i, 1);
    IF ((ASCII(l_tmps) BETWEEN 48 AND 57) OR (ASCII(l_tmps) BETWEEN 65 AND 90)) THEN
      l_temp := l_temp || l_tmps;
    END IF;
END LOOP;
  RETURN l_temp;
END;
ALTER TABLE object_owner.product
DROP CONSTRAINT fk_product_groupid;
ALTER TABLE object_owner.product
ADD CONSTRAINT fk_product_groupid FOREIGN KEY (groupid)
REFERENCES object_owner.costgroup(id);
ALTER TABLE object_owner.rawmaterial
DROP CONSTRAINT fk_rawmaterial_groupid;
ALTER TABLE object_owner.rawmaterial
ADD CONSTRAINT fk_rawmaterial_groupid FOREIGN KEY (groupid)
REFERENCES object_owner.costgroup(id);
ALTER TABLE object_owner.recipe
DROP CONSTRAINT fk_recipe_groupid_productid ;
ALTER TABLE object_owner.recipe
ADD CONSTRAINT fk_recipe_groupid_productid FOREIGN KEY (groupid, productid)
REFERENCES object_owner.product(groupid, id);
ALTER TABLE object_owner.recipe
DROP CONSTRAINT fk_recipe_groupid_rmatid;
ALTER TABLE object_owner.recipe
ADD CONSTRAINT fk_recipe_groupid_rmatid FOREIGN KEY (groupid, rawmaterialid)
REFERENCES object_owner.rawmaterial (groupid, id);Yours sincerely
Florian W.
Edited by: Florian W. on 28.07.2009 13:22
Edited by: Florian W. on 28.07.2009 13:29
Edited by: Florian W. on 28.07.2009 13:40
Edited by: Florian W. on 28.07.2009 13:58
Edited by: Florian W. on 28.07.2009 14:10
Edited by: Florian W. on 28.07.2009 14:21

Similar Messages

  • Restoring a SQL Server 2005 DB to a SQL Server 2014 install, is there any way to prevent it from being upgraded

    Does anyone know if there is a flag I can use to prevent a SQL Server 2005 database from being upgraded to SQL 2014 when it is restored to a 2014 instance?
    Don't ask why, I just need to know if this is possible or if 2005/8 DB's are required to be upgraded if they are going to run on SQL 2012/2014 instances. The documentation seems to say this is so, I just want to verify that.

    First: You cannot directly restore a 2005 database to
    2014. MS supports migration over 3 SQL Server version steps; means you can restore 2005 to 2008/2008R2/2012, but not to 2014. You have to do a migration step between.
    Olaf I was looking for this today, because I'm working with a new customer that have SQL 2005 and I have SQL 2014. And needed to restore a backup form the production server in my test server.
    When I read what you write I think, oh no!! I have to install SQL 2012 in my server. But that it's not an option for me, and I say let me try to restore the DB first in 2014 and if not work install 2012.
    You can restore a 2005 database to 2014 directly, and it works.
    For reference the version number in the servers 2005 (9.0.4035 SP3) and 2014 (12.0.2000 RTM)
    This is not related in any way to the original question that you answered (the file format will be upgraded to the new motor, that is sure).
    I put this lines because in the future there will be some people searching about if possible to restore a 2005 DB to 2014, and like me will read your lines and think it's not possible and that can make a decision to buy 2012 and not 2014 to that new server they
    will migrate.
    Don't forget to mark the best replies as answers!

  • Linked Server error: Login Failed for user 'NT AUTHORITY\ANONYMOUS LOGON' between sql server 2005 32 bit and sql server 2012 64 bit

    Hi All,
    Here the linked server is created between sql server 2012 64 bit and sql server 2005 32 bit. I am getting the below error  when i try to access linked server from third server. I have created linked from Instance 1 to Instance 2. When i access it from
    instance 3 i am getting the below error. SPN setting has been done between these 2 servers. Also the option 'Trust the delegate' is enabled for the both the service account. 
    'Login Failed for user 'NT AUTHORITY\ANONYMOUS LOGON' 
    Appreciate your quick response. 
    Vikas.M.S

    Hello,
    Please read the following resources:
    http://www.databasejournal.com/features/mssql/article.php/3696506/Setting-Up-Delegation-for-Linked-Servers.htm
    http://social.msdn.microsoft.com/Forums/sqlserver/en-US/ea26de43-4c6b-4991-86d7-e1578f107c92/linked-server-login-failed-for-user-nt-authorityanonymous-logon?forum=sqldataaccess
    Hope this helps.
    Regards,
    Alberto Morillo
    SQLCoffee.com

  • MS-SQL Server 2005 SP1 vs MS-SQL Native Client 2008 or 2012

    Hello,
    I woud like to know if it's possible to use on a computer Windows Seven, the MS-SQL Native Client 2008 or 2012, and connect it on a MS-SQL Server 2005 (under Windows 2003 enterprise).
    Regards,

    Hello,
    Yes, the SQL Server Native client is backward compatible, means you can use Client 2008 or higher to connect to a SQL Server 2005.
    With some limitations the client is also forward compatible, means you can use a client 2005 to connect to SQL Server 2008 and higher; but the client isn't aware of new server features.
    Olaf Helper
    [ Blog] [ Xing] [ MVP]

  • SQL Server 2005 Endpoints

    Hello,
    I am trying to fetch data from SQL Server 2005, bypassing
    IIS. SQL 2005 Endpoints require a username and password and don't
    support anonymous access. How can I send a username and password
    for authentication? This is the Flex 2 Beta 2 code I am using to
    call the service:
    <mx:WebService id="zoban" wsdl="
    http://zoban/Library?WSDL">
    <mxperation name="GetBooks">
    <mx:request>
    <Text>{kaka.text}</Text>
    </mx:request>
    </mxperation>
    Well, this does not work. If I point my browser to the
    service I get the username popup - prompt.
    Can I squeeze in something like <mx:username> and
    <mxassword> in the flex code?
    Best!

    WELL NEXT WAS UR QUESTION OF using a query string parameter
    pART 2 Passing request data into Flex applications
    You can pass request data to Flex applications by using a
    query string parameter or defining flashVars properties in the HTML
    wrapper. When you use query string parameters, Flex converts them
    to flashVars variables and passes them to the application.
    Inside the Flex application, you access flashVars properties
    and query string parameters exactly the same way, but the way that
    you pass them to the Flex application is different:
    * The flashVars properties: You explicitly define the
    flashVars properties in the HTML wrapper that points to the Flex
    application.
    * Query string parameters: You attach query string parameters
    to the URL in the browser's target window and the Flex Enterprise
    Services 2.0 converts them to flashVars variables.
    Changing either the query string parameter or the flashVars
    property does not trigger a recompilation of the Flex application
    if you are using the Flex Enterprise server.
    To use flashVars or query string parameters inside your MXML
    file, you access the Application.application.parameters object. The
    parameters property points to a dynamic object that stores each
    parameter as a name-value pair. You can access variables on the
    parameters object by specifying parameters.variable_name. As with
    any variable, you can bind the parameters object's properties to a
    display control or modify the value and return it to another
    function.
    The following example defines the myName and myHometown
    variables and binds them to the text of Label controls:
    <mx:Application xmlns:mx="
    http://www.macromedia.com/2005/mxml"
    creationComplete="initVars()">
    <mx:Script><![CDATA[
    // Declare bindable properties in Application scope.
    [Bindable]
    private var myName:String;
    [Bindable]
    private var myHometown:String;
    // Assign values to new properties.
    private function initVars():void {
    myName = Application.application.parameters.myName;
    myHometown = Application.application.parameters.myHometown;
    ]]></mx:Script>
    <mx:VBox>
    <mx:HBox>
    <mx:Label text="Name: "/>
    <mx:Label text="{myName}" fontWeight="bold"/>
    </mx:HBox>
    <mx:HBox>
    <mx:Label text="Hometown: "/>
    <mx:Label text="{myHometown}" fontWeight="bold"/>
    </mx:HBox>
    </mx:VBox>
    </mx:Application>
    When a user requests this application with the myName and
    myHometown parameters defined, Flex displays their values in the
    Label controls. The following URL passes the name Nick and the
    hometown San Francisco to the Flex application:
    http://localhost:8100/flex/myApp.swf?myName=Nick&myHometown=San%20Francisco
    To view all the flashVars properties, you can iterate over
    the parameters object, as the following example shows:
    for (var i:String in Application.application.parameters) {
    ta1.text += i + ":" + Application.application.parameters +
    "\n";
    Flex does not recompile the application if the request
    variables have changed. As a result, if you dynamically set the
    values of the flashVars properties or query string parameters, you
    do not force a recompilation.
    Query string parameters must be URL encoded. The format of
    the string is a set of name-value pairs separated by an ampersand
    (&. You can escape special and nonprintable characters with a
    percent symbol (%) followed by a two-digit hexadecimal value. You
    can represent a single blank space using the plus sign (+).
    The encoding for flashVars properties and query string
    parameters is the same as the page. Internet Explorer provides
    UTF-16-compliant strings on the Windows platform. Netscape sends a
    UTF-8-encoded string to Flash Player.
    Most browsers support a flashVars String or query string up
    to 64 KB (65535 bytes) in length. They can include any number of
    name-value pairs.

  • SQL Server 2005 SP2 install on Vista

    Hi,
    I have all updates for Vista, tried to install SQL Server 2005 SP2, the following log file:
    Microsoft SQL Server 2005 9.00.3042.00
    ==============================
    OS Version      : Professional  (Build 6000)
    Time            : Wed Mar 26 12:20:54 2008
    USER-PC : To change an existing instance of Microsoft SQL Server 2005 to a different edition of SQL Server 2005, you must run SQL Server 2005 Setup from the command prompt and include the SKUUPGRADE=1 parameter.
    Machine         : USER-PC
    Product         : Microsoft SQL Server Setup Support Files (English)
    Product Version : 9.00.3042.00
    Install         : Successful
    Log File        : C:\Program Files\Microsoft SQL Server\90\Setup Bootstrap\LOG\Files\SQLSetup0002_USER-PC_SQLSupport_1.log
    Machine         : USER-PC
    Product         : Microsoft SQL Server Native Client
    Product Version : 9.00.3042.00
    Install         : Successful
    Log File        : C:\Program Files\Microsoft SQL Server\90\Setup Bootstrap\LOG\Files\SQLSetup0002_USER-PC_SQLNCLI_1.log
    Machine         : USER-PC
    Product         : Microsoft SQL Server VSS Writer
    Product Version : 9.00.3042.00
    Install         : Successful
    Log File        : C:\Program Files\Microsoft SQL Server\90\Setup Bootstrap\LOG\Files\SQLSetup0002_USER-PC_SqlWriter_1.log
    Machine         : USER-PC
    Product         : Microsoft SQL Server Setup Support Files (English)
    Product Version : 9.00.3042.00
    Install         : Successful
    Log File        : C:\Program Files\Microsoft SQL Server\90\Setup Bootstrap\LOG\Files\SQLSetup0002_USER-PC_SQLSupport_2.log
    Machine         : USER-PC
    Product         : Microsoft SQL Server Native Client
    Product Version : 9.00.3042.00
    Install         : Successful
    Log File        : C:\Program Files\Microsoft SQL Server\90\Setup Bootstrap\LOG\Files\SQLSetup0002_USER-PC_SQLNCLI_2.log
    Machine         : USER-PC
    Product         : Microsoft SQL Server 2005 Express Edition
    Product Version : 9.00.1399.06
    Install         : Successful
    Log File        : C:\Program Files\Microsoft SQL Server\90\Setup Bootstrap\LOG\Files\SQLSetup0002_USER-PC_SQL.log
    Machine         : USER-PC
    Product         : Workstation Components, Books Online and Development Tools
    Warning         : Warning 28123.Warning: SQL Server Setup cannot install this feature because a different edition of this feature is already installed. For more information, see 'Version and Edition Upgrades' in SQL Server Books Online.
    Machine         : USER-PC
    Product         : Microsoft SQL Server 2005 Tools Express Edition
    Product Version : 9.00.1399.06
    Install         : Successful
    Log File        : C:\Program Files\Microsoft SQL Server\90\Setup Bootstrap\LOG\Files\SQLSetup0002_USER-PC_Tools.log
     Setup succeeded with the installation, inspect the log file completely for status on all the components.
    Time            : Wed Mar 26 12:23:51 2008
    ==============================================================
    When I try to start SQL Server it times out. SQL Server Express is running ok.
    Can you help me get this started?
    Thank you,
    Lucy

    This is the previous errorlog:
    2008-04-09 11:47:06.27 Server      Microsoft SQL Server 2005 - 9.00.3054.00 (Intel X86)
     Mar 23 2007 16:28:52
     Copyright (c) 1988-2005 Microsoft Corporation
     Enterprise Evaluation Edition on Windows NT 6.0 (Build 6000: )
    2008-04-09 11:47:06.27 Server      (c) 2005 Microsoft Corporation.
    2008-04-09 11:47:06.27 Server      All rights reserved.
    2008-04-09 11:47:06.27 Server      Server process ID is 240.
    2008-04-09 11:47:06.27 Server      Authentication mode is WINDOWS-ONLY.
    2008-04-09 11:47:06.27 Server      Logging SQL Server messages in file 'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\LOG\ERRORLOG'.
    2008-04-09 11:47:06.27 Server      This instance of SQL Server last reported using a process ID of 4180 at 4/5/2008 11:17:36 AM (local) 4/5/2008 6:17:36 PM (UTC). This is an informational message only; no user action is required.
    2008-04-09 11:47:06.27 Server      Registry startup parameters:
    2008-04-09 11:47:06.27 Server        -d C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\master.mdf
    2008-04-09 11:47:06.27 Server        -e C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\LOG\ERRORLOG
    2008-04-09 11:47:06.27 Server        -l C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\mastlog.ldf
    2008-04-09 11:47:06.32 Server      SQL Server is starting at normal priority base (=7). This is an informational message only. No user action is required.
    2008-04-09 11:47:06.32 Server      Detected 2 CPUs. This is an informational message; no user action is required.
    2008-04-09 11:47:06.50 Server      Using dynamic lock allocation.  Initial allocation of 2500 Lock blocks and 5000 Lock Owner blocks per node.  This is an informational message only.  No user action is required.
    2008-04-09 11:47:06.55 Server      Attempting to initialize Microsoft Distributed Transaction Coordinator (MS DTC). This is an informational message only. No user action is required.
    2008-04-09 11:47:06.64 Server      The Microsoft Distributed Transaction Coordinator (MS DTC) service could not be contacted.  If you would like distributed transaction functionality, please start this service.
    2008-04-09 11:47:06.64 Server      Database mirroring has been enabled on this instance of SQL Server.
    2008-04-09 11:47:06.64 spid4s      Starting up database 'master'.
    2008-04-09 11:47:06.80 spid4s      4 transactions rolled forward in database 'master' (1). This is an informational message only. No user action is required.
    2008-04-09 11:47:06.82 spid4s      0 transactions rolled back in database 'master' (1). This is an informational message only. No user action is required.
    2008-04-09 11:47:06.82 spid4s      Recovery is writing a checkpoint in database 'master' (1). This is an informational message only. No user action is required.
    2008-04-09 11:47:07.06 spid4s      SQL Trace ID 1 was started by login "sa".
    2008-04-09 11:47:07.10 spid4s      Starting up database 'mssqlsystemresource'.
    2008-04-09 11:47:07.13 spid4s      The resource database build version is 9.00.3042. This is an informational message only. No user action is required.
    2008-04-09 11:47:07.34 spid4s      Server name is 'USER-PC'. This is an informational message only. No user action is required.
    2008-04-09 11:47:07.34 spid9s      Starting up database 'model'.
    2008-04-09 11:47:07.53 spid9s      Clearing tempdb database.
    2008-04-09 11:47:08.11 Server      A self-generated certificate was successfully loaded for encryption.
    2008-04-09 11:47:08.11 Server      Server is listening on [ 'any' <ipv6> 1433].
    2008-04-09 11:47:08.11 Server      Server is listening on [ 'any' <ipv4> 1433].
    2008-04-09 11:47:08.17 Server      Server local connection provider is ready to accept connection on [ \\.\pipe\SQLLocal\MSSQLSERVER ].
    2008-04-09 11:47:08.17 Server      Server named pipe provider is ready to accept connection on [ \\.\pipe\sql\query ].
    2008-04-09 11:47:08.17 Server      Server is listening on [ ::1 <ipv6> 1434].
    2008-04-09 11:47:09.12 spid9s      Starting up database 'tempdb'.
    2008-04-09 11:47:09.47 spid12s     The Service Broker protocol transport is disabled or not configured.
    2008-04-09 11:47:09.47 spid12s     The Database Mirroring protocol transport is disabled or not configured.
    2008-04-09 11:47:09.53 spid12s     Service Broker manager has started.
    2008-04-09 11:51:06.92 Server      CPU time stamp frequency has changed from 1662000 to 199683 ticks per millisecond. The new frequency will be used.
    2008-04-09 11:55:07.29 Server      The time stamp counter of CPU on scheduler id 1 is not synchronized with other CPUs.
    2008-04-09 11:55:07.29 Server      CPU time stamp frequency has changed from 199683 to 136029 ticks per millisecond. The new frequency will be used.
    2008-04-09 12:23:09.84 Server      CPU time stamp frequency has changed from 136029 to 586928 ticks per millisecond. The new frequency will be used.
    2008-04-09 12:59:13.12 Server      The time stamp counter of CPU on scheduler id 1 is not synchronized with other CPUs.
    2008-04-09 13:07:13.85 Server      CPU time stamp frequency has changed from 586928 to 824822 ticks per millisecond. The new frequency will be used.
    2008-04-09 13:47:17.50 Server      CPU time stamp frequency has changed from 824822 to 140502 ticks per millisecond. The new frequency will be used.
    2008-04-09 14:07:19.33 Server      The time stamp counter of CPU on scheduler id 1 is not synchronized with other CPUs.
    2008-04-09 15:07:24.80 Server      The time stamp counter of CPU on scheduler id 1 is not synchronized with other CPUs.
    2008-04-09 15:11:25.16 Server      CPU time stamp frequency has changed from 140502 to 1413355 ticks per millisecond. The new frequency will be used.
    2008-04-09 15:15:25.53 Server      CPU time stamp frequency has changed from 1413355 to 161989 ticks per millisecond. The new frequency will be used.
    2008-04-09 15:19:25.89 Server      CPU time stamp frequency has changed from 161989 to 134822 ticks per millisecond. The new frequency will be used.
    2008-04-09 16:23:31.73 Server      The time stamp counter of CPU on scheduler id 1 is not synchronized with other CPUs.
    2008-04-09 17:23:37.20 Server      The time stamp counter of CPU on scheduler id 1 is not synchronized with other CPUs.
    2008-04-09 18:11:41.58 Server      CPU time stamp frequency has changed from 134822 to 154257 ticks per millisecond. The new frequency will be used.
    2008-04-09 18:23:42.67 Server      The time stamp counter of CPU on scheduler id 1 is not synchronized with other CPUs.
    2008-04-09 18:23:42.67 Server      CPU time stamp frequency has changed from 154257 to 134721 ticks per millisecond. The new frequency will be used.
    2008-04-09 18:35:43.79 Server      CPU time stamp frequency has changed from 134721 to 151448 ticks per millisecond. The new frequency will be used.
    2008-04-09 18:43:44.51 Server      CPU time stamp frequency has changed from 151448 to 125134 ticks per millisecond. The new frequency will be used.
    2008-04-09 19:15:47.35 Server      CPU time stamp frequency has changed from 125134 to 182297 ticks per millisecond. The new frequency will be used.
    2008-04-09 19:23:48.08 Server      The time stamp counter of CPU on scheduler id 1 is not synchronized with other CPUs.
    2008-04-09 19:27:48.45 Server      CPU time stamp frequency has changed from 182297 to 120770 ticks per millisecond. The new frequency will be used.
    2008-04-09 19:47:50.27 Server      CPU time stamp frequency has changed from 120770 to 1370171 ticks per millisecond. The new frequency will be used.
    2008-04-09 20:07:52.10 Server      CPU time stamp frequency has changed from 1370171 to 106932 ticks per millisecond. The new frequency will be used.
    2008-04-09 20:23:53.56 Server      The time stamp counter of CPU on scheduler id 1 is not synchronized with other CPUs.
    2008-04-09 20:35:54.65 Server      CPU time stamp frequency has changed from 106932 to 88924 ticks per millisecond. The new frequency will be used.
    2008-04-09 20:51:56.11 Server      CPU time stamp frequency has changed from 88924 to 102106 ticks per millisecond. The new frequency will be used.
    2008-04-09 20:59:56.84 Server      CPU time stamp frequency has changed from 102106 to 118592 ticks per millisecond. The new frequency will be used.

  • I plan to upgrade the SSRS 2005 SP2 enterprise edition in our internal web server to 2005 SP4, the Reporting server database is hosted in another sql server in sql server 2005 SP4. Do I need to do anything on the reporting server database side?

    My question is what the steps do I need to take to upgrade SSRS from 2005 SP2 to SP4.  The web server that host the SSRS is in 2005 SP2, and the OS is in window 2003. 
    Our SSRS report server and report server database are in different servers.  The SSRS in the web server is in 2005 SP2 enterprise edition, the report server database is in sql server 2005 SP4 enterprise edition.
    To upgrade the SSRS in web server from 2005 sp2 to sp4, do I need to backup/restore the encryption key?  Nothing will be changed in the report server database.  We will still pointing to the same database in the current server, all
    I wanted to do is performing a inplace upgrade of SSRS from 2005 SP2 to SP4.  
    Any response will be greate appreciated.  Thank you!
    Li-hui Chen

    Hi Lihui Chen,
    According to your description, you want to install the Services Pack 4 for SQL Server. Right?
    In SQL Server, Services Packs are used for fixing issues of current version product. It's not an Upgrade, you don't have to backup/restore your encryption key. You just need to download the Service Pack 4 on:
    Microsoft SQL Server 2005 Service Pack 4 RTM  . Please make sure you have administrative rights on the computer to install SQL Server 2005 SP4. For more information, see links below:
    How to obtain the latest service pack for SQL Server 2005
    List of the issues that are fixed in SQL Server 2005 Service Pack 4
    SQL Server 2005 SP4, KBA 2463332, Installation Issues
    If you have any question, please feel free to ask.
    Best Regards,
    Simon Hou

  • Error when upgrading from SQL Server 2005 to SQL Server 2014

    Hello everyone,
    Could you help me, i have an error when i try to upgrade my SQL Server 2005 Enterprise Edition to SQL Server 2014 Enterprise Edition,
    All of prerequisits are available and i dont have a problem,
    before the end of migration process, i have this error: The group name could not be found (0x84BB0001)
    File log:
    Feature:                       Database Engine Services
      Status:                        Failed: see logs for details
      Reason for failure:            An error occurred during the setup process of the feature.
      Next Step:                     The upgrade process for SQL Server failed. To continue the upgrade process, use the following information to resolve the error. Next, uninstall SQL Server by using this
    command line: setup /q /action=uninstall /instanceid=MSSQLSERVER /features=SQLENGINE,FULLTEXT,REPLICATION. Then, run SQL Server Setup again.
      Component name:                SQL Server Database Engine Services Instance Features
      Component error code:          0x84BB0001
      Error description:             The group name could not be found.
      Error help link:               http://go.microsoft.com/fwlink?LinkId=20476&ProdName=Microsoft+SQL+Server&EvtSrc=setup.rll&EvtID=50000&ProdVer=12.0.2000.8&EvtType=0x0AD059E6%400x3FAAA006&EvtType=0x0AD059E6%400x3FAAA006
      Feature:                       Full-Text and Semantic Extractions for Search
      Status:                        Failed: see logs for details
      Reason for failure:            An error occurred for a dependency of the feature causing the setup process for the feature to fail.
      Next Step:                     The upgrade process for SQL Server failed. To continue the upgrade process, use the following information to resolve the error. Next, uninstall SQL Server by using this
    command line: setup /q /action=uninstall /instanceid=MSSQLSERVER /features=SQLENGINE,FULLTEXT,REPLICATION. Then, run SQL Server Setup again.
      Component name:                SQL Server Database Engine Services Instance Features
      Component error code:          0x84BB0001
      Error description:             The group name could not be found.
      Error help link:               http://go.microsoft.com/fwlink?LinkId=20476&ProdName=Microsoft+SQL+Server&EvtSrc=setup.rll&EvtID=50000&ProdVer=12.0.2000.8&EvtType=0x0AD059E6%400x3FAAA006&EvtType=0x0AD059E6%400x3FAAA006
      Feature:                       SQL Server Replication
      Status:                        Failed: see logs for details
      Reason for failure:            An error occurred for a dependency of the feature causing the setup process for the feature to fail.
      Next Step:                     The upgrade process for SQL Server failed. To continue the upgrade process, use the following information to resolve the error. Next, uninstall SQL Server by using this
    command line: setup /q /action=uninstall /instanceid=MSSQLSERVER /features=SQLENGINE,FULLTEXT,REPLICATION. Then, run SQL Server Setup again.
      Component name:                SQL Server Database Engine Services Instance Features
      Component error code:          0x84BB0001
      Error description:             The group name could not be found.
      Error help link:               http://go.microsoft.com/fwlink?LinkId=20476&ProdName=Microsoft+SQL+Server&EvtSrc=setup.rll&EvtID=50000&ProdVer=12.0.2000.8&EvtType=0x0AD059E6%400x3FAAA006&EvtType=0x0AD059E6%400x3FAAA006
    Best regards,
    Guiga Hafedh

    There are more detailed logs for the various components. The one of interesting is the one for the engine or possibly the one for full-text.
    These logs are extremely verbose, and the errors are rarely crystal clear, but at least give them a try. If you have problems, find a place to upload them (Dropbox, Skrydrive etc), so that we can look.
    The closest at hand is that "group" that cannot be found is an AD group.
    Erland Sommarskog, SQL Server MVP, [email protected]

  • SQL Server 2005 and 2000

    Hello,
      Is it possible to develop on SQL server 2000. And use the sbo company database in sql server 2005
    Regards,
    Kit

    Yes Kit,
    SQL 2000 is forward compatible with 2005. Thus you can develop in 2000 and migrate to 2005 when need be. The only thing is with the securities in 2005. It works slightly differently in 2005. But that you can sort out with minimal effort when you migrate/implement to 2005. And this will only be an "issue" if you use your own SQL logins/user. Using the standard SBO connections will allow seamless cut-over from 2000 to 2005.

  • Upgrade data base from sql server 2005 to sql server2008

    Hi guys,
    What is the best way for upgrade my SQL Server 2005 data base to SQL 2008?

    It depends on how you want migrate, in-place or side-by-side?
    In-place: Run a backup of all databases and then install the new SQL Server version
    Side-by-side: Install the new SQL Server, backup all database of old SQL Server and restore them on the new one. Then copy all logins from old to new server.
    Olaf Helper
    [ Blog] [ Xing] [ MVP]

  • SQL Server 2005 upgrade & migrate to 2012 method

    Hi,
    The situation is like this:
    Currently I have SQL Server 2005 on an old Windows Server 2003. The target is to let SQL Server 2012 on Windows Server 2012 with the databases migrated over. The new server with Windows Server 2012 was prepared.
    Originally my plan is to install SQL Server 2005 on the new Windows Sever 2012 first, migrate the database from old server to here, then upgrade SQL Server to 2012. Then found out this method cannot be used due to SQL Server 2005 is not compatible with Windows
    Server 2012.
    Alternative suggestions are appreciated.

    SQL Server 2012 supports upgrade from the following versions of SQL Server:
    SQL Server 2005 SP4 or later
    SQL Server 2008 SP2 or later
    SQL Server 2008 R2 SP1 or late
    So please make sure that your existing sql server 2005 is upgraded to SP4 or later.
    Then best way is use side by side.
    Windows Sever 2012 on you new machine and sql server 2012.
    Then use side by side method to migrate your old sql 2005 to new version 2012, ( moving backups and restore, logins, jobs, packages, configurations, maintenance plans,
    linked server details and more. )
    If you use in-place the in case of any issues we cant do anything to bring back the server to old version or fixing the issue may take lot of time. side by side its matter of navigating the connection and changing the connection setting for application and
    putting databases for use ( online from single user or may be from online to online )
    Raju Rasagounder MSSQL DBA

  • Purchase or not ODBC Driver for MS SQL Server 2005

    Hi experts,
    We have Windows Server 2003 R2 Standard with MS SQL SERVER 2005 and our other branch want to access this system's Database at their end.
    other branch is planning to integrate database record to ERP
    Can u confirm whether they have to purchase ODBC driver or not.
    from where i can purchase ODBC driver online.
    Best Regards,
    Pardeep

    Hello,
    The data provider like ODBC and SQL Server Native Client are already integrated in all common MS Windows OS, so in common you don't need to install additional provider.
    But if you want to install and newer version, then you can get it for free from
    Feature Pack for Microsoft SQL Server 2005 SP4 => sqlncli.msi ( = SQL Native Client, which includes ODBC)
    Olaf Helper
    [ Blog] [ Xing] [ MVP]

  • Conversion of code in oracle into code compatible with MS-SQL server-2005

    Hello ,
    i am trying to execute this oracle query in MS -SQL server-2005 and it gives syntax errors. After correcting few i am not able to bug out this error for FOREIGN KEY.
    Here's the code :
    create table saving_deposit
    (ac_no varchar(11)constraint fk_saving_deposit references account_master(ac_no)on delete cascade,
    deposit_amt int,
    deposit_date Date,
    mode_of_deposit varchar(10),
    cheque_no varchar(15),
    draft_no varchar(15 ),
    bank_name varchar(20),
    status_update varchar(15),
    remarks varchar(10));
    And the error Msg 1767, Level 16, State 0, Line 1
    Foreign key 'fk_saving_deposit' references invalid table 'account_master'.
    Msg 1750, Level 16, State 0, Line 1
    Could not create constraint. See previous errors.
    Anyone please help me correct this.
    Thanks in advance .

    >
    i am trying to execute this oracle query in MS -SQL server-2005 and it gives syntax errors.
    After correcting few i am not able to bug out this error for FOREIGN KEY.
    Here's the code :
    create table saving_deposit
    (ac_no varchar(11)constraint fk_saving_deposit references account_master(ac_no)on delete cascade,
    deposit_amt int,
    deposit_date Date,
    mode_of_deposit varchar(10),
    cheque_no varchar(15),
    draft_no varchar(15 ),
    bank_name varchar(20),
    status_update varchar(15),
    remarks varchar(10));Can't test this - don't run Windows - but maybe (it's just a thought really)
    CREATE TABLE Saving_deposit
    ac_no VARCHAR2(11),
    ALTER TABLE ADD CONSTRAINT... <SQL Server syntax>
    I know it shouldn't matter - but who knows?
    Paul...

  • MS SQL Server 2005 Data Conversion Problem

    Hello all,
    I'm using the Microsoft JDBC Driver with SQL Server 2005 and getting an exception from the database server indicating that it is attempting to convert an nvarchar to an int (SQL Error 8114). This is the stack trace and code. I've exhausted all my resources... anybody have an idea?
    com.microsoft.sqlserver.jdbc.SQLServerException: Error converting data type nvarchar to int.
    at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(Unknown Source)
    at com.microsoft.sqlserver.jdbc.IOBuffer.processPackets(Unknown Source)
    at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.getPrepExecResponse(Unknown Source)
    at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.doExecutePreparedStatement (Unknown Source)
    at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement$PreparedStatementExecutionRequest.executeStatement(Unknown Source)
    at com.microsoft.sqlserver.jdbc.CancelableRequest.execute(Unknown Source)
    at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeRequest(Unknown Source)
    at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.execute(Unknown Source)
    at com.boeing.ict.workmonitor.swing.JMainFrame$33.insertIntoDB (JMainFrame.java:986)
    at com.boeing.ict.workmonitor.utils.SafeUDPWorker.respond(SafeUDPWorker.java:65)
    at com.boeing.ict.workmonitor.utils.SafeNetWorker.runWork(SafeNetWorker.java:113)
    at com.boeing.ict.workmonitor.utils.SafeNetWorker.access$000 (SafeNetWorker.java:21)
    at com.boeing.ict.workmonitor.utils.SafeNetWorker$1.run(SafeNetWorker.java:59)
    at java.lang.Thread.run(Unknown Source)
        private void listenToCOTMessages() {
            // the listener has not started yet.
            if (cotMessageWorker == null) {
                cotMessageWorker = new SafeUDPWorker() {
                    public void insertIntoDB(Iterator<NameValuePair> nvPairs) {
                        try {
                            int numParameters = 0;
                            if (isDebugMode()) {
                                System.err.println("Entered insertIntoDB");
                            while (nvPairs.hasNext()) {
                                NameValuePair pair = nvPairs.next();
                                // Aircraft callsign
                                if (pair.getName().equalsIgnoreCase("callsign")) {
                                    cotStatement.setString(1, pair.getValue());
                                    // debug code
                                    System.err.println("{1} " + pair.getValue());
                                    cotStatement.setString(2, pair.getValue());
                                    // debug code
                                    System.err.println("{2} " + pair.getValue());
                                    numParameters++;
                                    if (numParameters > 7)
                                        break;
                                // Aircraft altitude (meters)
                                else if (pair.getName().equalsIgnoreCase("hae")) {
                                    int height = Integer.parseInt(pair.getValue());
                                    height = (int)((height * 39.37) / 12);
                                    cotStatement.setInt(3, height);
                                    // debug code
                                    System.err.println("{3} " + height);
                                    numParameters++;
                                    if (numParameters > 7)
                                        break;
                                // aircraft latitude N/S (+/-)
                                else if (pair.getName().equalsIgnoreCase("lat")) {
                                    String rawLatitude = pair.getValue();
                                    // we have a south latitude
                                    if (rawLatitude.charAt(0) == '-') {
                                        // we need to append an " S"
                                    } else {
                                        rawLatitude = rawLatitude.substring(1) + " S";
                                    cotStatement.setString (4, rawLatitude);
                                    System.err.println("{4} " + rawLatitude);
                                    numParameters++;
                                    if (numParameters > 7)
                                        break;
                                // aircraft longitude E/W (+/-)
                                else if (pair.getName ().equalsIgnoreCase("lon")) {
                                    String rawLongitude = pair.getValue();
                                    // we have a west longitude
                                    if (rawLongitude.charAt (0) == '-') {
                                        rawLongitude = rawLongitude.substring(1) + " W";
                                    cotStatement.setString(5, rawLongitude);
                                    // debug code
                                    System.err.println("{5}" + rawLongitude);
                                    numParameters++;
                                    if (numParameters > 7)
                                        break;
                                // aircraft course
                                else if (pair.getName().equalsIgnoreCase("course")) {
                                    cotStatement.setString(6, pair.getValue());
                                    // debug code
                                    System.err.println("{6} " + pair.getValue());
                                    numParameters++;
                                    if (numParameters > 7)
                                        break;
                                // we have a speed number
                                else if (pair.getName ().equalsIgnoreCase("speed")) {
                                    cotStatement.setInt(7, Integer.parseInt(pair.getValue()));
                                    System.err.println("{7} " + pair.getValue ());
                                    numParameters++;
                                    if (numParameters > 7)
                                        break;
                                else {
                                    continue;
                            // execute the callable statement
                            cotStatement.execute();
                        } catch (SQLException ex) {
                            ex.printStackTrace();
                            // statusPanel.getStatusTextArea().append( ex.getMessage());
                // set the debugging mode
                cotMessageWorker.setDebugMode(debugMode);
                // set the output area for the worker
                cotMessageWorker.setMessageArea(cotTextArea);
                String portField = cotPortTextField.getText();
                // get the port setting from the portTextField
                if (portField.length() != 0) {
                    try {
                        cotMessageWorker.setPort(Integer.parseInt(portField));
                    } catch (NumberFormatException nfe) {
                        cotPortTextField.setBackground(Color.RED);
                cotMessageWorker.setStatusArea(statusPanel.getStatusTextArea());
                // set the java.sql.Statement object to do the data insertion
                if (cotStatement != null)
                    cotMessageWorker.setSqlStatement(cotStatement);
                cotMessageWorker.start();
            } else { // the listener has started
                // there are no errors generated for making multiple resume requests
                cotMessageWorker.resumeRequest();
        }

    Ideas? Not really, there's nothing wrong-looking about your code, but maybe I could ask some dumb questions.
    Has this code never worked, or does it usually work but occasionally this error occurs? Have you just switched to SQL Server 2005 from 2000 and the error started happening?
    Does the table you are inserting to only have those 7 columns, or are there others that are getting default values? Does it contain auto-generated identity columns? Are you sure you're using the right table in the right database?

  • Migration From SQL Server 2005 to Oracle DB through Oracle SQ Dev Problem

    Hi all,
    we are trying to do a full Migration from MS SQL Server 2005 to Oracle DB 9.2 i
    we are using Oracle SQL Developer V 1.5.3,
    the capturing of the DB and the conversion to the oracle model completed succefully
    however when we try to generate the scripts from the converted model
    the script generation hangs on a sequence and no further progress is made (the script generation pop up keeps still on a certain sequence displaying its name, and thats it )
    no error messages are displayed,
    how can we know the reason for this? or atleast find a log for whats happening...
    any suggestions?
    Thank you

    Hi,
    migrating a sequence shouldn't make a problem. I did a quick test. I created this table in SQL Server:
    create table test_seq (col1 int identity(1,1),col2 char(1))
    Then I captured the table, converted the table and generated the script. There was no problem.
    CREATE SEQUENCE succeeded.
    CREATE TABLE succeeded.
    Connected
    TRIGGER test_seq_col1_TRG Compiled.
    As you see, applying the script was also successful.
    I am using Oracle RDBMS 11g, I don't know whether this makes a difference. Do you have any 11g instance available to test it?
    Can you show me one of the sequences that are causing the hang? Is the CREATE SEQUENCE statement already in the generated script, or not? Your table is for sure more complex than my simple example.
    Regards,
    Wolfgang
    Edited by: wkobargs on Jan 13, 2009 3:01 AM

Maybe you are looking for

  • Result Set not updateable!

    Hi everyone. I'm using JDBC 2.0 to write a class in Java that connects to a mySQL database (through the Connector/J driver). When I try to execute the code below it throws an exception that my ResultSet in not updatable. I understand that this might

  • Shopping Cart Item wise PO or PR creation in backend system.

    HI Experts, I have one doubt in the shopping cart,can any one of you tell me the customizing setting for the same. Whenever we create shopping cart either PO or PR is created in backend system as per the requirement of client,there must be some custo

  • KM Layout not render properly

    Hello, We created a new layout in EP6. This layout display km link with image and text. The image and text are centered. But when the server was migrated to NW04 SP15, the layout not render the image and text centered for every link. In the Visible P

  • Help! My Macbook Pro won't start up! Help me ASAP? Thanks

    My MacBook Pro Starts up however I'm only stuck at a page with grey back ground, an apple logo and a loading bar it looks like this. Can Someone please please help me because I have a trip coming this Friday. Thanks:)

  • Illustrator cs4 error: Can't open the illustration. Can't print the illustration.

    Disk full error has occurred while it is printing. Has anyone else experienced this? I am running Illustrator CS4 on a Mac Snow Leopard. The error occurs when attemping to open any eps file on my computer, which are ALL of my Illustrator files, sigh.