Showing posts with label selected. Show all posts
Showing posts with label selected. Show all posts

Monday, March 12, 2012

Problem downloading the snapshot agent in a merge pull subscription.

Hello.

I've been having an error when downloading the snapshot agent from our Publisher.

The articles selected are all the tables and all the stored procedures.

The Subscription is created programmatically and so is the synchronization. When trying to synchronize for the first time and when the subscriber tries to download the snapshot I have the following error:



Error messages:
The schema script 'Distrito_2.sch' could not be propagated to the subscriber. (Source: MSSQL_REPL, Error number: MSSQL_REPL-2147201001)
Get help: http://help/MSSQL_REPL-2147201001
The process could not read file 'GESZif\unc\AFRODITE$SILVITEST_GESZIF_GESZIF\20070621182845\Distrito_2.sch' due to OS error 3. (Source: MSSQL_REPL, Error number: MSSQL_REPL20143)
Get help: http://help/MSSQL_REPL20143
The system cannot find the path specified.
(Source: MSSQL_REPL, Error number: MSSQL_REPL3)
Get help: http://help/MSSQL_REPL3


The snapshot folder is at c:\GESZifSnapshotFolder and the unc is \\Afrodite\Snapshot.

I'm getting a little desperate with this because we really need to propagate the schema changes around the subscribers.

Thanks in advance,

AVD

Has this ever worked before? Does agent account have the read access to your snapshot folder?


Gary

|||Hello Gary, thank you for your reply.

No, this has never worked before. When I was studying a way to implement replication I mostly used the management studio and management studio express. I created a database with backup/restore and put it at the client, so I disabled the initial snapshot when the error ocurred for the first time.

When you refer the agent account I suppose you mean the one at the Publication server (since SQLExpress doesn't have the SQL Agent)? Yes, it has full rights over the directory.

Best regards,

AVD
|||

Gary Chen wrote:

Has this ever worked before? Does agent account have the read access to your snapshot folder?


Gary

Ok, Gary i took your advice and found out that the permissions must be set for the UNC share and not the directory security.

After that it all worked wonders. Thanks for the help.

Wednesday, March 7, 2012

Problem Creating SP

Thanks to some help from this NG I now have a query that works in
identifying duplicates in a selected table. Now I am trying to build a
stored procedure so that I can automate the testing of multiple fields in
several tables. I am building the query using dynamic SQL and when I execute
it I get an error:
The name 'Select UnitName, ShowName, Eqp1Judge, Eqp1Voc From DCScores WHERE
((Eqp1Voc IN (Select Eqp1Voc FROM DCScores As tmp WHERE CircuitID = 501 AND
PorF = 'P' AND UnitClass = 'SW' Group By Eqp1Voc HAVING Count(*)>1)) AND
CircuitID = 501 AND PorF = 'P' AND UnitClass = 'SW') Order By Eqp1Voc' is
not a valid identifier.
The main part of that is the Select statement built within the SP. If I copy
and paste the query portion into QA, it runs fine with the desired result.
What does this error message mean?
The relavant part of the SP is as follows:
==================================
DECLARE
@.sql AS varchar(6000)
Set @.sql = 'Select UnitName, ShowName, ' + @.Judge + ', ' + @.SubCaption + '
From ' + @.table +
' WHERE ((' + @.SubCaption + ' IN (Select ' + @.SubCaption + ' FROM ' + @.table
+ ' As tmp WHERE ' +
' CircuitID = ' + @.Circuit + ' AND PorF = ''' + @.PF + ''' AND UnitClass =
''' + @.Class + ''' Group By ' +
@.SubCaption + ' HAVING Count(*)>1)) AND CircuitID = ' + @.Circuit + ' AND
PorF = ''' + @.PF + ''' AND UnitClass = ''' + @.Class +
''') Order By ' + @.SubCaption
Print @.SQL
EXEC @.sql
==================================
WayneWayne Wengert wrote:
<SNIP>
Put Parens around the variable in the EXEC. For example:
Exec (@.varname)
David Gugick
Imceda Software
www.imceda.com|||YOu have to use SP_EXECUTESQL
Variable has to be a nvarchar !
Look here for dynamic SQL
http://www.sommarskog.se/dynamic_sql.html
HTH, Jens Smeyer
http://www.sqlserver2005.de
--
"Wayne Wengert" <wayneDONTWANTSPAM@.wengert.com> schrieb im Newsbeitrag
news:eweTRmFQFHA.904@.tk2msftngp13.phx.gbl...
> Thanks to some help from this NG I now have a query that works in
> identifying duplicates in a selected table. Now I am trying to build a
> stored procedure so that I can automate the testing of multiple fields in
> several tables. I am building the query using dynamic SQL and when I
> execute
> it I get an error:
> The name 'Select UnitName, ShowName, Eqp1Judge, Eqp1Voc From DCScores
> WHERE
> ((Eqp1Voc IN (Select Eqp1Voc FROM DCScores As tmp WHERE CircuitID = 501
> AND
> PorF = 'P' AND UnitClass = 'SW' Group By Eqp1Voc HAVING Count(*)>1)) AND
> CircuitID = 501 AND PorF = 'P' AND UnitClass = 'SW') Order By Eqp1Voc' is
> not a valid identifier.
> The main part of that is the Select statement built within the SP. If I
> copy
> and paste the query portion into QA, it runs fine with the desired result.
> What does this error message mean?
> The relavant part of the SP is as follows:
> ==================================
> DECLARE
> @.sql AS varchar(6000)
> Set @.sql = 'Select UnitName, ShowName, ' + @.Judge + ', ' + @.SubCaption + '
> From ' + @.table +
> ' WHERE ((' + @.SubCaption + ' IN (Select ' + @.SubCaption + ' FROM ' +
> @.table
> + ' As tmp WHERE ' +
> ' CircuitID = ' + @.Circuit + ' AND PorF = ''' + @.PF + ''' AND UnitClass =
> ''' + @.Class + ''' Group By ' +
> @.SubCaption + ' HAVING Count(*)>1)) AND CircuitID = ' + @.Circuit + ' AND
> PorF = ''' + @.PF + ''' AND UnitClass = ''' + @.Class +
> ''') Order By ' + @.SubCaption
> Print @.SQL
> EXEC @.sql
> ==================================
> Wayne
>|||You are right.
"David Gugick" <davidg-nospam@.imceda.com> schrieb im Newsbeitrag
news:eapZEqFQFHA.3628@.TK2MSFTNGP12.phx.gbl...
> Wayne Wengert wrote:
> <SNIP>
> Put Parens around the variable in the EXEC. For example:
> Exec (@.varname)
> --
> David Gugick
> Imceda Software
> www.imceda.com|||Thanks guys. That was it. Added the parens and it runs fine.
Wayne
"Wayne Wengert" <wayneDONTWANTSPAM@.wengert.com> wrote in message
news:eweTRmFQFHA.904@.tk2msftngp13.phx.gbl...
> Thanks to some help from this NG I now have a query that works in
> identifying duplicates in a selected table. Now I am trying to build a
> stored procedure so that I can automate the testing of multiple fields in
> several tables. I am building the query using dynamic SQL and when I
execute
> it I get an error:
> The name 'Select UnitName, ShowName, Eqp1Judge, Eqp1Voc From DCScores
WHERE
> ((Eqp1Voc IN (Select Eqp1Voc FROM DCScores As tmp WHERE CircuitID = 501
AND
> PorF = 'P' AND UnitClass = 'SW' Group By Eqp1Voc HAVING Count(*)>1)) AND
> CircuitID = 501 AND PorF = 'P' AND UnitClass = 'SW') Order By Eqp1Voc' is
> not a valid identifier.
> The main part of that is the Select statement built within the SP. If I
copy
> and paste the query portion into QA, it runs fine with the desired result.
> What does this error message mean?
> The relavant part of the SP is as follows:
> ==================================
> DECLARE
> @.sql AS varchar(6000)
> Set @.sql = 'Select UnitName, ShowName, ' + @.Judge + ', ' + @.SubCaption + '
> From ' + @.table +
> ' WHERE ((' + @.SubCaption + ' IN (Select ' + @.SubCaption + ' FROM ' +
@.table
> + ' As tmp WHERE ' +
> ' CircuitID = ' + @.Circuit + ' AND PorF = ''' + @.PF + ''' AND UnitClass =
> ''' + @.Class + ''' Group By ' +
> @.SubCaption + ' HAVING Count(*)>1)) AND CircuitID = ' + @.Circuit + ' AND
> PorF = ''' + @.PF + ''' AND UnitClass = ''' + @.Class +
> ''') Order By ' + @.SubCaption
> Print @.SQL
> EXEC @.sql
> ==================================
> Wayne
>

Monday, February 20, 2012

problem connecting to sqlexpress

Hi all,

I'm getting this error message from the ASP.NET configuration manager in VS 2005 Pro:

There is a problem with your selected data store. This can be caused by an invalid server name or credentials, or by insufficient permission. It can also be caused by the role manager feature not being enabled. Click the button below to be redirected to a page where you can choose a new data store.

The following message may help in diagnosing the problem: Failed to generate a user instance of SQL Server due to a failure in starting the process for the user instance. The connection will be closed.

I have no problem connecting using the sql server management studio tool.

I need help ASAP, can't afford the down time.

Thanks,

Andy

hi,

found http://blogs.msdn.com/kaelr/archive/2005/10/28/486432.aspx and http://www.differentpla.net/node/487, http://blog.devstone.com/aaron/archive/2006/01/09/1425.aspx that can be interesting..

hth

regards