· 9 years ago · Nov 11, 2016, 04:18 PM
1===================================
2
3 Échec de la récupération de données pour cette demande. (Microsoft.SqlServer.Management.Sdk.Sfc)
4
5 ------------------------------
6 Pour obtenir de l'aide, cliquez sur : http://go.microsoft.com/fwlink?ProdName=Microsoft%20SQL%20Server&LinkId=20476
7
8 ------------------------------
9 Emplacement du programme :
10
11 Ã Microsoft.SqlServer.Management.Sdk.Sfc.Enumerator.Process(Object connectionInfo, Request request)
12 Ã Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.NavigableItemBuilder.NavigableItemBuilderDataReader.RunQuery()
13 Ã Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.NavigableItemBuilder.NavigableItemBuilderDataReader.Process()
14 Ã Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.NavigableItemBuilder.NavigableItemBuilderDataReader.get_PropertyNames()
15 Ã Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.NavigableItemBuilder.BuildDynamicItemWithQuery(IList`1 nodes, INodeInformation source, INavigableItem sourceItem, String urnQuery, Boolean registerBuilder, Boolean registerBuiltItems)
16 Ã Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.NavigableItemBuilder.BuildDynamicItem(IList`1 nodes, INodeInformation source, INavigableItem sourceItem, IFilterProvider filter)
17 Ã Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.NavigableItemBuilder.Build(IList`1 nodes, INodeInformation source, INavigableItem sourceItem, IFilterProvider filter)
18 Ã Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.NavigableItem.RequestChildren(IGetChildrenRequest request)
19 Ã Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.ExplorerHierarchyNode.BuildChildren(WaitHandle quitEvent)
20
21 ===================================
22
23 Une exception s'est produite lors de l'exécution d'une instruction ou d'un lot Transact-SQL. (Microsoft.SqlServer.ConnectionInfo)
24
25 ------------------------------
26 Emplacement du programme :
27
28 Ã Microsoft.SqlServer.Management.Common.ServerConnection.ExecuteNonQuery(String sqlCommand, ExecutionTypes executionType)
29 Ã Microsoft.SqlServer.Management.Smo.ExecuteSql.ExecuteImmediate(String query)
30 Ã Microsoft.SqlServer.Management.Smo.ExecuteSql.GetDataProvider(StringCollection query, Object con, StatementBuilder sb, RetriveMode rm)
31 Ã Microsoft.SqlServer.Management.Smo.SqlObjectBase.FillData(ResultType resultType, StringCollection sql, Object connectionInfo, StatementBuilder sb)
32 Ã Microsoft.SqlServer.Management.Smo.SqlObjectBase.FillDataWithUseFailure(SqlEnumResult sqlresult, ResultType resultType)
33 Ã Microsoft.SqlServer.Management.Smo.SqlObjectBase.BuildResult(EnumResult result)
34 Ã Microsoft.SqlServer.Management.Smo.Replication.Publication.GetData(EnumResult erParent)
35 Ã Microsoft.SqlServer.Management.Sdk.Sfc.Environment.GetData()
36 Ã Microsoft.SqlServer.Management.Sdk.Sfc.Environment.GetData(Request req, Object ci)
37 Ã Microsoft.SqlServer.Management.Sdk.Sfc.Enumerator.GetData(Object connectionInfo, Request request)
38 Ã Microsoft.SqlServer.Management.Sdk.Sfc.Enumerator.Process(Object connectionInfo, Request request)
39
40 ===================================
41
42 Impossible de résoudre le conflit de classement entre "Arabic_CI_AI" et "Arabic_CI_AS" dans l'opération equal to. (.Net SqlClient Data Provider)
43
44 ------------------------------
45 Pour obtenir de l'aide, cliquez sur : http://go.microsoft.com/fwlink?ProdName=Microsoft%20SQL%20Server&ProdVer=10.50.4042&EvtSrc=MSSQLServer&EvtID=468&LinkId=20476
46
47 ------------------------------
48 Nom du serveur : my-server
49 Numéro de l'erreur : 468
50 Gravité : 16
51 État : 9
52 Procédure : sp_MSrepl_enumpublications
53 Numéro de la ligne : 213
54
55
56 ------------------------------
57 Emplacement du programme :
58
59 Ã Microsoft.SqlServer.Management.Common.ConnectionManager.ExecuteTSql(ExecuteTSqlAction action, Object execObject, DataSet fillDataSet, Boolean catchException)
60 Ã Microsoft.SqlServer.Management.Common.ServerConnection.ExecuteNonQuery(String sqlCommand, ExecutionTypes executionType)
61
62USE [master]
63GO
64/****** Object: StoredProcedure [sys].[sp_MSrepl_enumpublications] Script Date: 11/11/2016 15:13:26 ******/
65SET ANSI_NULLS OFF
66GO
67SET QUOTED_IDENTIFIER OFF
68GO
69
70--
71-- Name:
72-- sp_MSrepl_enumpublications
73--
74-- Description:
75-- Enumerate publications on a database
76--
77-- Returns:
78-- 0 == Failed
79-- 1 == Succeed
80--
81-- Security:
82-- public, PAL access for tran publications, dbo check for merge publications
83-- Requires Certificate signature for catalog access
84--
85-- Notes:
86-- Used by the UI to generate a list of pubications
87--
88-- Publication type:
89-- 0 == TRAN
90-- 1 == SNAPSHOT
91-- 2 == MERGE
92--
93ALTER PROCEDURE [sys].[sp_MSrepl_enumpublications]
94(
95 @reserved bit = 0 -- Set to 1 when used by UI
96)
97AS
98BEGIN
99 SET NOCOUNT ON
100 DECLARE @retcode int
101 ,@pubid int
102 ,@pubname sysname
103 ,@username sysname
104 ,@OPT_ENABLED_FOR_P2P int
105 ,@category int
106 ,@skippalcheck bit
107 ,@dbname sysname
108 ,@fpublished bit
109 ,@OPT_ENABLED_FOR_P2PCONFLICTDETECTION int
110
111 --
112 -- initialize
113 --
114 select @dbname = db_name()
115 ,@OPT_ENABLED_FOR_P2P = 0x1
116 ,@username = SUSER_SNAME()
117 ,@fpublished = 0
118 ,@OPT_ENABLED_FOR_P2PCONFLICTDETECTION = 0x08
119 --
120 -- Verify database is published
121 -- Have put the code from fn_MSrepl_ispublished inline for faster processing
122 -- If fn_MSrepl_ispublished() is updated - this code block should be updated as well
123 --
124 SELECT @category = category
125 FROM master.sys.sysdatabases
126 WHERE name = @dbname
127
128 IF (@category IS NOT NULL)
129 BEGIN
130 -- We have entry for this db_name in sysdatabases
131 -- Is this database a distributor?
132 IF (@category & 16 = 16)
133 BEGIN
134 -- DB is a distributor - is it used for HREPL publisher?
135 IF OBJECT_ID(N'msdb.dbo.MSdistpublishers') IS NOT NULL
136 BEGIN
137 IF EXISTS
138 (
139 SELECT name
140 FROM msdb.dbo.MSdistpublishers
141 WHERE distribution_db = @dbname
142 AND publisher_type != N'MSSQLSERVER'
143 )
144 BEGIN
145 SELECT @fpublished = 1
146 END
147 END
148 END
149 ELSE
150 BEGIN
151 -- Check if this database is a transactional or merge publisher
152 IF (@category & 1 = 1 OR @category & 4 = 4)
153 BEGIN
154 SELECT @fpublished = 1
155 END
156 END
157 END -- @category not null
158 --
159 -- If the database is not published - return
160 --
161 IF (@fpublished = 0)
162 BEGIN
163 RETURN (0)
164 END
165 --
166 -- Security Check.
167 -- Skip PAL check if DBO
168 -- For PAL check - Part of the query to gather the list of publications uses security context
169 --
170 select @skippalcheck = case when (is_member ('db_owner') = 1 OR is_srvrolemember('sysadmin') = 1) then 1 else 0 end
171 if (@skippalcheck = 0)
172 begin
173 DECLARE @accessiblepubs TABLE
174 (
175 pubid int
176 )
177 end
178 --
179 -- Create local temp table if needed
180 --
181 if (@reserved = 0)
182 begin
183 create TABLE #tmp_publications
184 (
185 publisher sysname not null,
186 dbname sysname not null,
187 publication sysname not null,
188 publisher_type sysname not null,
189 publication_type int not null,
190 description nvarchar(255) null,
191 allow_queued bit default 0 NOT NULL,
192 enabled_for_p2p bit default 0 NOT NULL,
193 enabled_for_p2pconflictdetection bit default 0 NOT NULL
194 )
195 end
196 --
197 -- Get snapshot or transactional publications
198 --
199 IF object_id(N'dbo.syspublications') IS NOT NULL
200 BEGIN
201 if (@skippalcheck = 0)
202 begin
203 -- Catalog accessible pub ids
204 DECLARE #hC CURSOR LOCAL FAST_FORWARD FOR
205 SELECT pubid, name
206 FROM dbo.syspublications
207
208 OPEN #hC
209 FETCH #hC INTO @pubid, @pubname
210 WHILE (@@fetch_status <> -1)
211 BEGIN
212 EXEC @retcode = sys.sp_MSreplcheck_pull @publication = @pubname,
213 @raise_fatal_error = 0,
214 @given_login = @username
215 IF (@retcode = 0 AND @@error = 0)
216 BEGIN
217 INSERT INTO @accessiblepubs values(@pubid)
218 END
219
220 FETCH #hC INTO @pubid, @pubname
221 END
222 CLOSE #hC
223 DEALLOCATE #hC
224 end -- if (@skippalcheck = 0)
225 --
226 -- Determine if distribution db is being cataloged
227 --
228 IF (@category & 16 != 16)
229 BEGIN
230 -- SQL Server publication db
231 INSERT INTO #tmp_publications
232 (
233 publisher,
234 dbname,
235 publication,
236 publisher_type,
237 publication_type,
238 description,
239 allow_queued,
240 enabled_for_p2p,
241 enabled_for_p2pconflictdetection
242 )
243 SELECT publishingservername(),
244 @dbname,
245 name,
246 N'MSSQLSERVER',
247 repl_freq,
248 description,
249 allow_queued_tran,
250 (options & @OPT_ENABLED_FOR_P2P),
251 (options & @OPT_ENABLED_FOR_P2PCONFLICTDETECTION)
252 FROM dbo.syspublications
253 WHERE @skippalcheck = 1
254 OR (pubid IN (SELECT pubid FROM @accessiblepubs))
255 END
256 ELSE
257 BEGIN
258 -- Distribution db - Heterogeneous publications
259 INSERT INTO #tmp_publications
260 (
261 publisher,
262 dbname,
263 publication,
264 publisher_type,
265 publication_type,
266 description,
267 allow_queued,
268 enabled_for_p2p
269 )
270 SELECT ss.srvname,
271 @dbname, -- distribution db name for enumerator to work
272 sp.name,
273 msd.publisher_type,
274 sp.repl_freq,
275 sp.description,
276 sp.allow_queued_tran,
277 (sp.options & @OPT_ENABLED_FOR_P2P)
278 FROM dbo.syspublications sp
279 join dbo.MSpublications msp on sp.pubid = msp.publication_id
280 join master.dbo.sysservers ss on msp.publisher_id = ss.srvid
281 join msdb.dbo.MSdistpublishers msd on msd.name = ss.srvname
282 WHERE @skippalcheck = 1
283 OR (pubid IN (SELECT pubid FROM @accessiblepubs))
284 END
285 END -- IF object_id(N'dbo.syspublications') IS NOT NULL
286 --
287 -- Get merge publications
288 --
289 IF object_id(N'dbo.sysmergepublications') IS NOT NULL
290 BEGIN
291 INSERT INTO #tmp_publications
292 (
293 publisher,
294 dbname,
295 publication,
296 publisher_type,
297 publication_type,
298 description
299 )
300 SELECT publisher,
301 publisher_db,
302 name,
303 N'MSSQLSERVER',
304 2,
305 description
306 FROM dbo.sysmergepublications
307 WHERE (@skippalcheck = 1 OR {fn ISPALUSER(pubid)} = 1)
308 and publisher_db = @dbname
309 and UPPER(publisher) = UPPER(publishingservername())
310 END -- object_id(N'dbo.sysmergepublications') IS NOT NULL
311 --
312 -- Return result set if we created local table
313 --
314 if (@reserved = 0)
315 begin
316 SELECT *
317 FROM #tmp_publications
318 ORDER BY publisher, dbname, publication
319 end
320 --
321 -- all done
322 --
323 RETURN (0)
324END
325
326BEGIN
327 -- Distribution db - Heterogeneous publications
328 INSERT INTO #tmp_publications
329 (
330 publisher,
331 dbname,
332 publication,
333 publisher_type,
334 publication_type,
335 description,
336 allow_queued,
337 enabled_for_p2p
338 )
339 SELECT ss.srvname,
340 @dbname, -- distribution db name for enumerator to work
341 sp.name,
342 msd.publisher_type,
343 sp.repl_freq,
344 sp.description,
345 sp.allow_queued_tran,
346 (sp.options & @OPT_ENABLED_FOR_P2P)
347 FROM dbo.syspublications sp
348 join dbo.MSpublications msp on sp.pubid = msp.publication_id
349 join master.dbo.sysservers ss on msp.publisher_id = ss.srvid
350 join msdb.dbo.MSdistpublishers msd on msd.name = ss.srvname
351 WHERE @skippalcheck = 1
352 OR (pubid IN (SELECT pubid FROM @accessiblepubs))
353 END