Fail To Drop Schema - Error 15150

Apr 28, 2007

I want to drop a schema but it shows Fail to drop schema - Error 15150.
I found that there is no object under the schema. Any idea? Thanks in advnace

View 4 Replies


ADVERTISEMENT

Drop Proc Fail

Jun 15, 2008

I try to drop a proc:

IF OBJECT_ID('dbo.Notify_Insert') IS NOT NULL
DROP PROC dbo.Notify_Insert
GO

CREATE PROC dbo.Notify_Insert (
@NotifyID UNIQUEIDENTIFIER,
@NotifyTypeID SMALLINT,
@Reporter VARCHAR(200),
@NotifyTime DATETIME
)
AS
SET NOCOUNT ON

DECLARE @Error INT
DECLARE @ErrorMsg VARCHAR(200)
GO

and get Error:

Msg 2812, Level 16, State 62, Procedure Notify_DBError_Insert, Line 20
Could not find stored procedure 'dbo.Notify_Insert'.
The statement has been terminated.

any idea ?


Noam Graizer

View 4 Replies View Related

Drop Schema And Its Objects

May 9, 2007



I want to be able to drop a schema and all its objects if they exist. Can someone help me with such a stored procedure. I see the sql server does not allow dropping schema directly if it contains some objects.

View 10 Replies View Related

Index Fail Error 644

Jan 19, 2006

Guys,
We just got an Error 644 on our DB, the error was:

Could not find the index entry for RID '169bc61301c3950000209e1a0002000000030000' in index page (1:1683508), index ID 0, database 'TR'..

Error: 644, Severity: 21, State: 3

We run dbcc CheckDB on the TR DB with no error:

CHECKDB found 0 allocation errors and 0 consistency errors in database 'TR'.

I read JohnSharp post, and tried the script from Paul:

DBCC CHECKTABLE (sysindexes) WITH NO_INFOMSGS, ALL_ERRORMSGS

it return no erros as well, anyone got any more info on whats this error is?

At the time of this happen, its seems that a process is running, which run some stored proc which will create some temp tables, will that message be relating to some index that created on the tempdb (from the temp tables) rather then the index on the TR DB? Since we can't even tell which table its affected, is there any way to find out?

Thanks.

View 10 Replies View Related

SYSINDEXES Index Fail, Error 644

Jan 16, 2006

A few days ago a sproc stopped working, only noticed it this morning, when checking information to see what's up I get this:

Server: Msg 644, Level 21, State 1, Procedure uspV2InventoryFetch, Line 83
Could not find the index entry for RID '45574f44523738313834202020202020202020202020202020202020202020' in index page (1:11690152), index ID 2, database 'ASOS'.

Connection Broken

I've treid DBCC CHECKDBing all related tables and everything else. Even tried dbreindexing a couple of them too, everything reports as correct. When I looked further at the problem I spotted "index ID 2" in there, on checking this out in sysindexes it seems that the name field of sysindexes where id = 2 is SYSINDEXES and TSYSINDEXES.

I can't seem to do a DBB DBRECINDEX against a system table.

Any help appreciated.

John

View 3 Replies View Related

Fail Component Error Notification

May 4, 2007

I have created a package which forms data from flat file to sql database.I have a data flow where all my data is processed to destination.if the package fails by any chance i want an email notification with the cause of the error.how can i do this.please let me know..

View 6 Replies View Related

SQL 2012 :: Fail Over Clustering Error On Windows 2008

Oct 14, 2014

I have configured two node cluster environment on vmware with windows 2008 r2 os.I want to configure sql clustering over it.but prior to that I ran failover clustering manager on node V1 to create two node cluster(node v1,node v2 and third node as a domain controller with shared storage using iscsi target).After I successfully created cluster with name SqlClus1 I shut down all my vmware.Now when I start them all and see clustering status I get error RPC server not found and Cluster server can not be connected.On my cluster manager page I see cluster events marked as critical for both nodes.and cluster staus down.

View 2 Replies View Related

Unexpected Fail Error Message When Install SQL Server

Jul 28, 2007

I have Visual Web Developer worked on my computer, but I can't make SQL Server work for data-driven. I have uninstalled and install VWD from http://msdn.microsoft.com/vstudio/express/downloads/default.aspx , the same Error message...... "..unexpected fail to install SQL server...", the copy of Summary.txt as below:

-----------------------------------------------------------------------------------------------------------------------------------------------------------

Microsoft SQL Server 2005 Setup beginning at Sat Jul 28 06:54:25 2007
Process ID : 3324
c:8845baf7ee339eaf6setup.exe Version: 2005.90.3042.0
Running: LoadResourcesAction at: 2007/6/28 6:54:24
Complete: LoadResourcesAction at: 2007/6/28 6:54:24, returned true
Running: ParseBootstrapOptionsAction at: 2007/6/28 6:54:24
Loaded DLL:c:8845baf7ee339eaf6xmlrw.dll Version:2.0.3609.0
Complete: ParseBootstrapOptionsAction at: 2007/6/28 6:54:25, returned false
Error: Action "ParseBootstrapOptionsAction" failed during execution. Error information reported during run:
Could not parse command line due to datastore exception.
Source File Name: utillibpersisthelpers.cpp
Compiler Timestamp: Wed Jun 14 16:30:14 2006
Function Name: writeEncryptedString
Source Line Number: 124
----------------------------------------------------------
writeEncryptedString() failed
Source File Name: utillibpersisthelpers.cpp
Compiler Timestamp: Wed Jun 14 16:30:14 2006
Function Name: writeEncryptedString
Source Line Number: 123
----------------------------------------------------------
Error Code: -2146893813
Windows Error Text: Key not valid for use in specified state.

Source File Name: cryptohelpercryptsameusersamemachine.cpp
Compiler Timestamp: Wed Jun 14 16:28:04 2006
Function Name: sqls::CryptSameUserSameMachine:rotectData
Source Line Number: 50

2148073483
Could not skip Component update due to datastore exception.
Source File Name: datastorecachedpropertycollection.cpp
Compiler Timestamp: Wed Jun 14 16:27:59 2006
Function Name: CachedPropertyCollection::findProperty
Source Line Number: 130
----------------------------------------------------------
Failed to find property "InstallMediaPath" {"SetupBootstrapOptionsScope", "", "3324"} in cache
Source File Name: datastorepropertycollection.cpp
Compiler Timestamp: Wed Jun 14 16:28:01 2006
Function Name: SetupBootstrapOptionsScope.InstallMediaPath
Source Line Number: 44
----------------------------------------------------------
No collector registered for scope: "SetupBootstrapOptionsScope"
Running: ValidateWinNTAction at: 2007/6/28 6:54:25
Complete: ValidateWinNTAction at: 2007/6/28 6:54:25, returned true
Running: ValidateMinOSAction at: 2007/6/28 6:54:25
Complete: ValidateMinOSAction at: 2007/6/28 6:54:25, returned true
Running: PerformSCCAction at: 2007/6/28 6:54:25
Complete: PerformSCCAction at: 2007/6/28 6:54:25, returned true
Running: ActivateLoggingAction at: 2007/6/28 6:54:25
Error: Action "ActivateLoggingAction" threw an exception during execution. Error information reported during run:
Datastore exception while trying to write logging properties.
Source File Name: datastorecachedpropertycollection.cpp
Compiler Timestamp: Wed Jun 14 16:27:59 2006
Function Name: CachedPropertyCollection::findProperty
Source Line Number: 130
----------------------------------------------------------
Failed to find property "primaryLogFiles" {"SetupStateScope", "", ""} in cache
Source File Name: datastorepropertycollection.cpp
Compiler Timestamp: Wed Jun 14 16:28:01 2006
Function Name: SetupStateScope.primaryLogFiles
Source Line Number: 44
----------------------------------------------------------
No collector registered for scope: "SetupStateScope"
00D5CFC0Unable to proceed with setup, there was a command line parsing error. : 2
Error Code: 0x80070002 (2)
Windows Error Text: The system cannot find the file specified.

Source File Name: datastorepropertycollection.cpp
Compiler Timestamp: Wed Jun 14 16:28:01 2006
Function Name: SetupBootstrapOptionsScope.InstallMediaPath
Source Line Number: 44

Class not registered.
Failed to create CAB file due to datastore exception
Source File Name: datastorecachedpropertycollection.cpp
Compiler Timestamp: Wed Jun 14 16:27:59 2006
Function Name: CachedPropertyCollection::findProperty
Source Line Number: 130
----------------------------------------------------------
Failed to find property "HostSetup" {"SetupBootstrapOptionsScope", "", "3324"} in cache
Source File Name: datastorepropertycollection.cpp
Compiler Timestamp: Wed Jun 14 16:28:01 2006
Function Name: SetupBootstrapOptionsScope.HostSetup
Source Line Number: 44
----------------------------------------------------------
No collector registered for scope: "SetupBootstrapOptionsScope"
Message pump returning: 2

View 3 Replies View Related

Control Flow Task Error Shouldn't Fail Package

Mar 1, 2007

Hi all,

I have a Send Mail Task in my control flow to notify users that the processing is done. I want to avoid the package to fall in error if the Send Mail task failed.

What is the best practice to do that ?

Should I raise the MaximumErrorCount of theSend Mail Task ? Should I play with ErrorHandler ?

 

View 1 Replies View Related

Error Redirected To Script Component : Package Doesnt Fail.

Apr 18, 2007



I have created a data flow task. In that, in a 'data conversion', if a column fails validation then that row is redirected to a script component, which in turn writes the error to a variable.



But though the error is generated and script component receives the error, package doesnt fail.



Is there any way to set the package result to failure inside the script component? I tried set 'FailPackageOnFailure' to true but doesnt work.



Any help is greatly appreciated.



Thanks,

Don



View 3 Replies View Related

Error Logon Fail With Crystal Repor 11 And Sql Native Language

Apr 26, 2007

Hi, I am using VB6 and sometimes when I try to display a report using cristal report 11 , I get this error "Logon Fail", I am working with SQL 2005 ENTERPRISE EDITION.

I want to know if I need an aditional configuration or something like that.

Thank you.

View 1 Replies View Related

SQL 2012 :: Flat File Import Tasks Fail With Error 0xc02020a1

Aug 25, 2015

The import from Flat File Source fails: Error 0xc02020a1: Data Flow Task 1: Data conversion failed.

The data conversion for column "ArticleName" returned status value 4 and status text "Text was truncated or one or more characters had no match in the target code page.".
(SQL Server Import and Export Wizard)

I have changed the size of the column "ArticleName" (varchar) to max but the error comes up again.

The data i want to import came with multiple flat files. They all could import properly but this one is a problem.

View 1 Replies View Related

Fail To Process Mining Structure With The OLEDB Error: There Is Not Enough Procedure Cache......

Dec 6, 2007

Hi everyone,

I posted a related thread before about this error below when I process a dimension. And seems that the solution by using "ClearCache" can not fingure out the issue when I want to process a mining structure...... .


OLE DB error: OLE DB or ODBC error: There is not enough procedure cache to run this procedure, trigger, or SQL batch. Retry later, or ask your SA to reconfigure SQL Server with more procedure cache.
; Sort failed because there is insufficient procedure cache for the configured number of sort buffers. Please retry the query after configuring lesser number of sort buffers.

Could someone please give me some suggestions?
Your help will be very appreciated:-)


Thanks^_^
Winnie

View 2 Replies View Related

SQL Server 2005 Enterprise Cluster Installation Fail (Error 29503 && 17058)

Jan 10, 2007

When the setup program tries to start the database service (the last step of installation), it indicates an error 29503.

The SQL Server service failed to start. For more information, see the SQL Server Books Online topics, "How to: View SQL Server 2005 Setup Log Files" and "Starting SQL Server Manually."
The error is (17058)

Any help would be appreciated.

View 1 Replies View Related

Error On DROP TABLE

Jul 17, 2007

Hi,

I was trying to drop a table (or alter it in any way) and the Managment Studio Express gave me an error of timeout. So I say something like DROP TABLE myTable, and it takes a while and gives me the error. Does anybody know how to unlock a table?



Thanks

View 3 Replies View Related

Drop Login Error

Aug 18, 2005

Hi

View 4 Replies View Related

Drop All Indexes In A Table, How To Drop All For User Tables In Database

Oct 9, 2006

Hi,I found this SQL in the news group to drop indexs in a table. I need ascript that will drop all indexes in all user tables of a givendatabase:DECLARE @indexName NVARCHAR(128)DECLARE @dropIndexSql NVARCHAR(4000)DECLARE tableIndexes CURSOR FORSELECT name FROM sysindexesWHERE id = OBJECT_ID(N'F_BI_Registration_Tracking_Summary')AND indid 0AND indid < 255AND INDEXPROPERTY(id, name, 'IsStatistics') = 0OPEN tableIndexesFETCH NEXT FROM tableIndexes INTO @indexNameWHILE @@fetch_status = 0BEGINSET @dropIndexSql = N' DROP INDEXF_BI_Registration_Tracking_Summary.' + @indexNameEXEC sp_executesql @dropIndexSqlFETCH NEXT FROM tableIndexes INTO @indexNameENDCLOSE tableIndexesDEALLOCATE tableIndexesTIARob

View 2 Replies View Related

Populate Drop-down List Error

Dec 27, 2004

I have been trying to populate my dropdown list with State names in the USA. The dropdown list populates fine, but when I hit the submit button I receive the following message:

Could not find stored procedure 'Maryland'.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.SqlClient.SqlException: Could not find stored procedure 'Maryland'.

Source Error:


Line 81: Dim sqlCmd As SqlCommand = New SqlCommand(sqlText, sqlConn)
Line 82: sqlCmd.Connection.Open()
Line 83: dr = sqlCmd.ExecuteReader(System.Data.CommandBehavior.CloseConnection)
Line 84: Return dr
Line 85: End Function


Source File: c:inetpubwwwrootCreditRepairAdd_Customer.aspx.vb Line: 83

Stack Trace:


[SqlException: Could not find stored procedure 'Maryland'.]
System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream) +742
System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior) +45
CreditRepair.CreditRepair.Vb.Add_Customer.GetDr(String sqlText) in c:inetpubwwwrootCreditRepairAdd_Customer.aspx.vb:83
CreditRepair.CreditRepair.Vb.Add_Customer.drpState_SelectedIndexChanged(Object sender, EventArgs e) in c:inetpubwwwrootCreditRepairAdd_Customer.aspx.vb:163
System.Web.UI.WebControls.ListControl.OnSelectedIndexChanged(EventArgs e)
System.Web.UI.WebControls.DropDownList.System.Web.UI.IPostBackDataHandler.RaisePostDataChangedEvent()
System.Web.UI.Page.RaiseChangedEvents()
System.Web.UI.Page.ProcessRequestMain() +1099



Can anyone help?

View 11 Replies View Related

DDL Trigger And Drop Table Causes Error

Jul 24, 2007

I have a DDL Trigger that writes a record into a table when any DDL event happens.

It works great except when I try dropping any object. I get an error at that point and the object is not dropped. The trigger and error are listed below.



Thanks.



J



Trigger:

/****** Object: DdlTrigger [MonitorDBChanges] Script Date: 07/24/2007 11:02:02 ******/

SET ANSI_NULLS ON

GO

SET QUOTED_IDENTIFIER ON

GO

CREATE TRIGGER [MonitorDBChanges]

ON DATABASE

FOR DDL_DATABASE_LEVEL_EVENTS

AS

set nocount on

declare @EventType varchar(100)

declare @SchemaName varchar(100)

declare @ObjectName varchar(100)

declare @ObjectType varchar(100)

declare @Script varchar(2000)

SELECT

@EventType = EVENTDATA().value('(/EVENT_INSTANCE/EventType)[1]','nvarchar(max)')

,@SchemaName = EVENTDATA().value('(/EVENT_INSTANCE/SchemaName)[1]','nvarchar(max)')

,@ObjectName = EVENTDATA().value('(/EVENT_INSTANCE/ObjectName)[1]','nvarchar(max)')

,@ObjectType = EVENTDATA().value('(/EVENT_INSTANCE/ObjectType)[1]','nvarchar(max)')

,@Script = EVENTDATA().value('(/EVENT_INSTANCE/TSQLCommand/CommandText)[1]','nvarchar(max)')

-- Is the default schema used

if @SchemaName = ' ' select @SchemaName = default_schema_name from sys.sysusers u join sys.database_principals p

on u.uid = p.principal_id where u.name = CURRENT_USER

insert into MonitorDBChanges

select @EventType, @SchemaName, @ObjectName, @ObjectType, getdate(), SUSER_SNAME(), CURRENT_USER, ORIGINAL_LOGIN(),@Script



GO

SET ANSI_NULLS OFF

GO

SET QUOTED_IDENTIFIER OFF

GO

ENABLE TRIGGER [MonitorDBChanges] ON DATABASE

*******************************************************************************

Error Msg:

SELECT failed because the following SET options have incorrect settings: 'ARITHABORT'. Verify that SET options are correct for use with indexed views and/or indexes on computed columns and/or query notifications and/or xml data type methods. (Microsoft SQL Server, Error: 1934)

View 5 Replies View Related

Create Schema Error

Mar 25, 2008

IF NOT EXISTS (SELECT 1 FROM Sys.Schemas WHERE [Name] = N'HR4')
CREATE SCHEMA HR4 AUTHORIZATION [dbo]

The above statements gives me an error saying "Incorrect syntax near schema". But the following code works fine.


DECLARE @sql varchar(100)
set @sql='CREATE SCHEMA HR4 AUTHORIZATION [dbo]'
IF NOT EXISTS (SELECT 1 FROM Sys.Schemas WHERE [Name] = N'HR4')
exec(@sql)

Any ideas on what is causing this error?

Thanks!

View 1 Replies View Related

SQL Server Admin 2014 :: SSAS Cube Processing Fail With Communication Link Failure Error

Feb 4, 2015

we have our cubes in Server A and SQL DB resides on Server B (we are on SQL 2014), from last couple of days are cube started failing due to below error:

OLE DB or ODBC error: Protocol error in TDS stream; HY000; Protocol error in TDS stream; HY000; Protocol error in TDS stream; HY000; Communication link failure; 08S01; TCP Provider: An existing connection was forcibly closed by the remote host.
; 08S01

I have been going through some blogs to understand the error but don't find any specific yet.

View 0 Replies View Related

Alter Table Drop Column Error

Apr 11, 2001

1. We have user defined type (Sql type = bit ) with rule setting it to 0
2. New column(isVIP) was created using this user defined type
3. sp_unbindrule was used to unbind rule from new column (isVIP)
4. Alter table Client drop Column isVIP !!!! (invalid syntax )

Any ideas ?
Thanks

View 4 Replies View Related

SQL 2012 :: Error - Cannot Drop Table Because It Is Being Used For Replication

Sep 2, 2014

The error message is "cannot drop the table because it is being used for replication"

my sql version is in sql server 2012 and Im ussing merge replication.

I want to drop only one table.

View 7 Replies View Related

Solution Explorer Drag/drop Error?

Feb 19, 2007

I've submitted a bug report for this, but I also want to be sure it's not my own installation.

In the solution explorer, when I drag a package (usually accidentally) to another spot in the list, it disappears from the list. If I try to re-add the package, it thinks the original already exists, and names the second one with a "(1)" suffix. I can work around this by moving the original package out of the primary package folder and then re-adding it through solution explorer, but that's a touch cumbersome.

I don't really have a question here other than perhaps validation of the issue. Thanks.

Here's the bug report if others experience the same issue:
https://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=258908

View 1 Replies View Related

INvalid Schema Error 954 On Restore

Mar 10, 2008

I am trying to restore a database and it errors with Invalid Schema error 954. Does anybody have any ideas?

View 1 Replies View Related

The 'System.Web.Security.SqlMembershipProvider' Requires A Database Schema Compatible With Schema Version '1'.

Sep 27, 2007

Locally I develop in SQL server 2005 enterprise. Recently I recreated my db on the server of my hosting company (in sql server 2005 express).I basically recreated the tables and copied the data in it.I now receive the following error when I hit the DB:The 'System.Web.Security.SqlMembershipProvider' requires a
database schema compatible with schema version '1'.  However, the
current database schema is not compatible with this version.  You may
need to either install a compatible schema with aspnet_regsql.exe
(available in the framework installation directory), or upgrade the
provider to a newer version.I heard something about running aspnet_regsql.exe, but I dont have that access to the DB. Also I dont know if this command does anything more than creating the membership tables and filling it with some default data...Any other solutions/thought on what this can be?Thanks!

View 4 Replies View Related

Replication --&> Error 21122: Cannot Drop Destination Database...

Sep 13, 2004

Good day!

I am getting a bizard error here...

I am trying to drop replication off a database, and funny enough went trough all the steps and I am still getting the error when I try to Disable publishing.

I also did an EXEC sp_removedbreplication 'databasename'

Any ideas?

View 1 Replies View Related

SQL Server Admin 2014 :: Error - Cannot Drop Database Because It Is Currently In Use

Oct 29, 2015

I have an environment with MS-SQL Server 2014 and always-on availability group configured (on 2-nodes).

I'm writing a Powershell Script which removes the database from the availability group (on the primary server) and then SHOULD drop the database on the secondary Server.

That works most of the time, but not always...

When it fails I get the error message:

Cannot drop database "Customer_2" because it is currently in use.

When i check the secondary DB-Server (sp_who2) while the script is running, i see that there is a process for the DB "Customer_2" with Status="background", Command="DB STARTUP" and LastWaitType="REDO_THREAD_PENDING WORK".

As soon as the script fails, this process for "Customer_2" disapears.

This happens always only on the second database in the availability group.

Why is the process still there, even after I removed the database from the Availability Group on the primary node.

If I remove the database from the availability group manually, the "background" process on the secondary node for that database disappears..

[URL]

View 4 Replies View Related

SQL 2005 Server Installation Drop Location Error

Jun 15, 2006

I'm trying to install the Eval copy of SQL Server 2005 on a Win2k Server computer. The error message that

"The drop location is missing file(s) that allow setup to determine how a multi instance product should be installed. Setup cannot continue, please repair the drop and try again."

Has anyone seen this error? any ideas?

Thanks!

View 3 Replies View Related

Dynamic Drop-down Parameters In Custom .net Web Page Error

Feb 7, 2008

Hi,

I created one report with 5 dynamic drop down parameters. The first parameter is passed from URL and the other's parameter drop downs should get populated based on the first one. These 4 parameters default to some value which I defined.
Everything is working fine in the Report Manager but when the report is integrated in a web page I am getting some problems.
After the drop-downs are populated and the user wants to filter down by using different values in the drop down, causes the report to generate automatically and all the dropdowns are reset to default.
Have you had this problem before? Anyone can advise me how to solve this issue?

Thank you in advance!
/daniel

View 1 Replies View Related

Cannot Drop The Table Transactional Replication Error 3724

Mar 14, 2006

This thread is no longer active. I moved issue to a new, cleaner thread named: How can I get Transactional Republishing to work?

--------------------------------------------------------------------------------------------------------------------

I've tried for more than a week to figure this one out, but have not found a solution. I'm missing some critical information that perhaps someone can share. I'm desperate and embarassed that this has kept me stuck for so long. Thanks for any assistance.

In my simplist scenario, I'm transactionally replicating a single table from database A to database B and then from database B to database C. All databases are on the same XP server (in this simplist version of the problem). This is SQL 2005 RTM. Publication A to B replicates fine. Publication B to C can't even get the snapshot to work because I get the error:

Command attempted:
drop Table "dbo"."MyReplTable"

(Transaction sequence number: 0x00004174000000E100A300000000, Command ID: 41)

Error messages:
Cannot drop the table 'dbo.MyReplTable' because it is being used for replication. (Source: MSSQLServer, Error number: 3724) Get help: http://help/3724  (fyi - there is no help here)

 

I have a simple example script where I've renamed real names to fake names, that is exactly what I run to simulate the problem. Obviously the script is wrong, but where? I used the wizard to create the whole script (I know that is my first mistake ;-) ). After I start the snapshot jobs, I get the error above.

I presume that the sp_addarticle option @pre_creation_cmd = N'drop' is part of the problem. I don't have row filters. Also, I want to be able to replicate schema modifications when necessary (like add a column or drop a column)

Perhaps the sp_addpublication @repl_freq = N'continuous' option in the AtoB publication prevents the BtoC publication from ever getting a chance to do anything, if it never lets go of the table.

If it helps, here is my script with hopefully helpfully renamed objects. My real world scenario has many articles, but this is a simple version - 2 publications each having 1 article (the same table).

 

/****** Scripting replication configuration for server MyInstance. Script Date: 3/14/2006 11:16:58 AM ******/
/****** Please Note: For security reasons, all password parameters were scripted with either NULL or an empty string. ******/

/****** Installing the server MyInstance as a Distributor. Script Date: 3/14/2006 11:16:58 AM ******/
use master
exec sp_adddistributor @distributor = N'MyInstance', @password = N''
GO
exec sp_adddistributiondb @database = N'distribution', @data_folder = N'C:Program FilesMicrosoft SQL ServerMSSQL.2MSSQLData', @data_file_size = 4, @log_folder = N'C:Program FilesMicrosoft SQL ServerMSSQL.2MSSQLData', @log_file_size = 2, @min_distretention = 0, @max_distretention = 72, @history_retention = 48, @security_mode = 1
GO

use [distribution]
if (not exists (select * from sysobjects where name = 'UIProperties' and type = 'U '))
 create table UIProperties(id int)
if (exists (select * from ::fn_listextendedproperty('SnapshotFolder', 'user', 'dbo', 'table', 'UIProperties', null, null)))
 EXEC sp_updateextendedproperty N'SnapshotFolder', N'C:ThisFolderMY2005DBWorking
epldata', 'user', dbo, 'table', 'UIProperties'
else
 EXEC sp_addextendedproperty N'SnapshotFolder', 'C:ThisFolderMY2005DBWorking
epldata', 'user', dbo, 'table', 'UIProperties'
GO

exec sp_adddistpublisher @publisher = N'MyInstance', @distribution_db = N'distribution', @security_mode = 1, @working_directory = N'C:ThisFolderMY2005DBWorking
epldata', @trusted = N'false', @thirdparty_flag = 0, @publisher_type = N'MSSQLSERVER'
GO

use [DatabaseA]
exec sp_replicationdboption @dbname = N'DatabaseA', @optname = N'publish', @value = N'true'
GO
-- Adding the transactional publication
use [DatabaseA]
exec sp_addpublication @publication = N'PubAtoB', @description = N'Transactional publication of database ''DatabaseA'' from Publisher ''MyInstance''.', @sync_method = N'concurrent', @retention = 0, @allow_push = N'true', @allow_pull = N'true', @allow_anonymous = N'true', @enabled_for_internet = N'false', @snapshot_in_defaultfolder = N'true', @compress_snapshot = N'false', @ftp_port = 21, @ftp_login = N'anonymous', @allow_subscription_copy = N'false', @add_to_active_directory = N'false', @repl_freq = N'continuous', @status = N'active', @independent_agent = N'true', @immediate_sync = N'true', @allow_sync_tran = N'false', @autogen_sync_procs = N'false', @allow_queued_tran = N'false', @allow_dts = N'false', @replicate_ddl = 1, @allow_initialize_from_backup = N'false', @enabled_for_p2p = N'false', @enabled_for_het_sub = N'false'
GO


exec sp_addpublication_snapshot @publication = N'PubAtoB', @frequency_type = 1, @frequency_interval = 0, @frequency_relative_interval = 0, @frequency_recurrence_factor = 0, @frequency_subday = 0, @frequency_subday_interval = 0, @active_start_time_of_day = 0, @active_end_time_of_day = 235959, @active_start_date = 0, @active_end_date = 0, @job_login = null, @job_password = null, @publisher_security_mode = 1


use [DatabaseA]
exec sp_addarticle @publication = N'PubAtoB', @article = N'MyReplTable', @source_owner = N'dbo', @source_object = N'MyReplTable', @type = N'logbased', @description = null, @creation_script = null, @pre_creation_cmd = N'drop', @schema_option = 0x000000000803509F, @identityrangemanagementoption = N'manual', @destination_table = N'MyReplTable', @destination_owner = N'dbo', @vertical_partition = N'false', @ins_cmd = N'CALL sp_MSins_dboMyReplTable', @del_cmd = N'CALL sp_MSdel_dboMyReplTable', @upd_cmd = N'SCALL sp_MSupd_dboMyReplTable'
GO

 

 

-----------------BEGIN: Script to be run at Publisher 'MyInstance'-----------------
use [DatabaseA]
exec sp_addsubscription @publication = N'PubAtoB', @subscriber = N'MyInstance', @destination_db = N'DatabaseB', @subscription_type = N'Push', @sync_type = N'automatic', @article = N'all', @update_mode = N'read only', @subscriber_type = 0
exec sp_addpushsubscription_agent @publication = N'PubAtoB', @subscriber = N'MyInstance', @subscriber_db = N'DatabaseB', @job_login = null, @job_password = null, @subscriber_security_mode = 1, @frequency_type = 64, @frequency_interval = 0, @frequency_relative_interval = 0, @frequency_recurrence_factor = 0, @frequency_subday = 0, @frequency_subday_interval = 0, @active_start_time_of_day = 0, @active_end_time_of_day = 235959, @active_start_date = 20060314, @active_end_date = 99991231, @enabled_for_syncmgr = N'False', @dts_package_location = N'Distributor'
GO
-----------------END: Script to be run at Publisher 'MyInstance'-----------------


use [DatabaseB]
exec sp_replicationdboption @dbname = N'DatabaseB', @optname = N'publish', @value = N'true'
GO
-- Adding the transactional publication
use [DatabaseB]
exec sp_addpublication @publication = N'PubBtoC', @description = N'Transactional publication of database ''DatabaseB'' from Publisher ''MyInstance''.', @sync_method = N'concurrent', @retention = 0, @allow_push = N'true', @allow_pull = N'true', @allow_anonymous = N'true', @enabled_for_internet = N'false', @snapshot_in_defaultfolder = N'true', @compress_snapshot = N'false', @ftp_port = 21, @ftp_login = N'anonymous', @allow_subscription_copy = N'false', @add_to_active_directory = N'false', @repl_freq = N'continuous', @status = N'active', @independent_agent = N'true', @immediate_sync = N'true', @allow_sync_tran = N'false', @autogen_sync_procs = N'false', @allow_queued_tran = N'false', @allow_dts = N'false', @replicate_ddl = 1, @allow_initialize_from_backup = N'false', @enabled_for_p2p = N'false', @enabled_for_het_sub = N'false'
GO


exec sp_addpublication_snapshot @publication = N'PubBtoC', @frequency_type = 1, @frequency_interval = 0, @frequency_relative_interval = 0, @frequency_recurrence_factor = 0, @frequency_subday = 0, @frequency_subday_interval = 0, @active_start_time_of_day = 0, @active_end_time_of_day = 235959, @active_start_date = 0, @active_end_date = 0, @job_login = null, @job_password = null, @publisher_security_mode = 1


use [DatabaseB]
exec sp_addarticle @publication = N'PubBtoC', @article = N'MyReplTable', @source_owner = N'dbo', @source_object = N'MyReplTable', @type = N'logbased', @description = null, @creation_script = null, @pre_creation_cmd = N'drop', @schema_option = 0x000000000803509F, @identityrangemanagementoption = N'manual', @destination_table = N'MyReplTable', @destination_owner = N'dbo', @vertical_partition = N'false', @ins_cmd = N'CALL sp_MSins_dboMyReplTable', @del_cmd = N'CALL sp_MSdel_dboMyReplTable', @upd_cmd = N'SCALL sp_MSupd_dboMyReplTable'
GO

 

 

-----------------BEGIN: Script to be run at Publisher 'MyInstance'-----------------
use [DatabaseB]
exec sp_addsubscription @publication = N'PubBtoC', @subscriber = N'MyInstance', @destination_db = N'DatabaseC', @subscription_type = N'Push', @sync_type = N'automatic', @article = N'all', @update_mode = N'read only', @subscriber_type = 0
exec sp_addpushsubscription_agent @publication = N'PubBtoC', @subscriber = N'MyInstance', @subscriber_db = N'DatabaseC', @job_login = null, @job_password = null, @subscriber_security_mode = 1, @frequency_type = 64, @frequency_interval = 0, @frequency_relative_interval = 0, @frequency_recurrence_factor = 0, @frequency_subday = 0, @frequency_subday_interval = 0, @active_start_time_of_day = 0, @active_end_time_of_day = 235959, @active_start_date = 20060314, @active_end_date = 99991231, @enabled_for_syncmgr = N'False', @dts_package_location = N'Distributor'
GO
-----------------END: Script to be run at Publisher 'MyInstance'-----------------


 

View 7 Replies View Related

Transact SQL :: Compiler Error Of Unable To Drop Table

May 29, 2015

I have a procedure where an id is passed into the procedure.  It will either be a numeric value or it will be the word "ALL."  All that is taking place is a select statement for the specified user id.  However, if All is passed in then I 1st need to get a list of all possible user id's and produce the results for all of the associated user ids.  This is my syntax, but it keeps producing a compile error of:

Msg 3701, Level 11, State 5, Line 1

Cannot drop the table '#tbl_temp', because it does not exist or you do not have permission.And I placed a comment above the line that is throwing this error.

CREATE procedure [dbo].[TEST]
(
@id varchar(100),
@startDate datetime,
@endDate datetime

[code]...

View 10 Replies View Related

Typed Dataset Schema Throwing Error

Apr 8, 2006

Hello,I'm using a typed dataset to access my database (SQL Express); I have a table that returns data, which two fields are null; I'm getting this error:{"Failed to enable constraints. One or more rows contain values violating non-null, unique, or foreign-key constraints."}There are no foreign-key or unique key constraints, so it has to be a non-null issue; I changed the two fields in the table to have a null value of Empty instead of Throw Exception, but I don't understand what the problem is coming from...  I'm at a loss.Thanks.

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved