Home Microsoft SQL Server DigiMailing iRN Contact
    Keyword



sys.sp_ORAChangeTableSpace

  No additional text.


Syntax


-- Name:
--		sp_ORAChangeTableSpace

-- Description:
--		Set article log table space

-- Inputs:
--		@publisher		== name of Oracle publisher
--		@publication_id	== id of publication
--		@article_id		== id of article
--		@tablespace		== name of article log tablespace

-- Returns:
--		Return code (0 for success, 1 for failure)

-- Security:
--		internal stored procedure


CREATE PROCEDURE sys.sp_ORAChangeTableSpace
(
	@publisher		sysname,
	@publication_id	int,
	@article_id		int,
	@tablespace		nvarchar(386)
)
AS
BEGIN
	DECLARE @retcode	int
	DECLARE	@table_id	int
	
    -- Get the article information.
    SELECT	@table_id	= iha.table_id
    FROM	IHarticles iha
    WHERE	iha.publication_id	= @publication_id
      AND	iha.article_id		= @article_id

	-- Define sp_ORAremotequery support table
	create table #hquery
	(
		seq	int identity(2,1),
		cmd	nvarchar(4000)
	)

	-- Send request to Oracle to move article log to specified table space
	INSERT INTO #hquery (cmd) VALUES (N'{call HREPL.AlterTableLog(')
	INSERT INTO #hquery (cmd) VALUES (CONVERT(NVARCHAR(255), @table_id) + N',')
	INSERT INTO #hquery (cmd) VALUES (QUOTENAME(@tablespace, '''') + N')}')
	
	EXEC @retcode = sys.sp_IHquery @publisher

	IF  (@@error <> 0 OR @retcode <> 0 )
	BEGIN
		RAISERROR (21736, 16, -1)
		RETURN (1)
	END

	RETURN (0)
END

 
Last revision 2008RTM
See also

  sp_MSdrop_repltran (Procedure)
sp_MSrepl_changearticle (Procedure)
       



News

  Query a named instance
Sybase+ASE+silent+install
SQL 2008 R2
Deprecated procedures in SQL2008
Reporting Services item-level role definitions
Create all your missing indexes
Converting datetime field
Start MSSQL Server Profiler at time
Replicating MSSQL Server views
Exploring Microsoft Sharepoint
The OLE DB provider "SQLNCLI10" for linked server indicates.
Mobile solar charger
Oracle to SQL Server replication
Cannot insert the value NULL into column
Undocumented Microsoft SQL Server 2008
VMware
Zoekmachine optimalisatie
SQL Servers hidden objects
FckEditor
Flash in Ajax
De hype die AJAX heet
Barcode scannen
MySQL; Gratis, makkelijk en snel!
PHP
sIFR; de combinatie tussen HTML en Flash