Showing posts with label function. Show all posts
Showing posts with label function. Show all posts

Thursday, March 29, 2012

DeriveParameters throws when called against a C# function?

When I call DeriveParameters against a function written in SQLCLR function it throws an exception. I've been working on this a little while and haven't found a fix. I understand that I could write additional code to do the same work DeriveParameters does, but it seems like this should work.

This is the exception thrown:

[InvalidOperationException: The stored procedure 'GSI.Utils.IsMatch' doesn't exist.]

The function is defined as

CREATE FUNCTION [Utils].[IsMatch](@.Value [nvarchar](4000), @.RegularExpression [nvarchar](4000))
RETURNS [bit] WITH EXECUTE AS CALLER
AS
EXTERNAL NAME [RegularExpressionsHelper].[UserDefinedFunctions].[IsMatch]

The C# function is defined as:

[Microsoft.SqlServer.Server.SqlFunction(IsDeterministic=true)]
public static SqlBoolean IsMatch(SqlString Value, SqlString RegularExpression)
{
Regex rx = new Regex( RegularExpression.ToString() );
string s = Value.ToString();

return new SqlBoolean(rx.IsMatch(s));
}

This is the code I'm using to call DeriveParameters:

static void Main(string[] args)
{
using (SqlConnection conn = new SqlConnection(m_GetConnectionString()))
{
conn.Open();

SqlCommand myCommand = new SqlCommand("GSI.Utils.IsMatch", conn);
myCommand.CommandType = System.Data.CommandType.StoredProcedure;
SqlCommandBuilder.DeriveParameters(myCommand);
}
}

I found that DeriveParameters seems to call sp_procedure_params_managed and when I call it myself it returns the parameters correctly for T-SQL functions, but returns no records when I specify a SQLCLR function.

DECLARE @.procedure_name sysname;
DECLARE @.group_number int;
DECLARE @.procedure_schema sysname;
DECLARE @.parameter_name sysname;

SET @.procedure_name = 'IsMatch';
SET @.group_number = 1;
SET @.procedure_schema = 'Utils';
SET @.parameter_name = null;

DECLARE @.RC int

EXECUTE @.RC = [GSI].[Sys].[sp_procedure_params_managed]
@.procedure_name
,@.group_number
,@.procedure_schema
,@.parameter_name


I'm able to execute the function without issue and I'm able to use DeriveParameters against everything in the database except C# based functions (and I've tried others besides IsMatch). I'm attempting to run DeriveParameters from a console application and from ASP.NET, both running .NET 2.0.

I've experienced the same behavior in these versions:

SQL Server 2005 Enterprise Edition RTM (MSDN Image on Virtual Server)
SQL Server 2005 Enterprise Edition SP1 (MSDN Image on Virtual Server)
SQL Server 2005 Enterprise Edition SP1 + Hotfix kb918222 (MSDN Image on Virtual Server)
SQL Server 2005 Developer Edition SP1

Has anyone else seen similar behavior?

Any advice would be greatly appreciated -- Thanks

Steve

I verified the behavior and filed a bug on it. Hopefully it can be fixed soon - feel free to file a bug on connect.microsoft.com if you want to track the status.

You can always get the parameters from querying sys.parameters, but of course it doesn't do the magic that DeriveParameters does.

Steven

|||

Any status on this bug?

Derived parameters calls:

exec sp_procedure_params_managed @.procedure_name=N'GetServerTimeZoneName'

(Which Returns nothing for CLR based stored procedures)... thats the bug!

sp_help GetServerTimeZoneName and executing the CLR procedure work just fine...

Thanks

Ron Keen

|||

I submitted the bug here:

http://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=185170

Someone else submitted it here:

http://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=214251

Tuesday, March 27, 2012

DeriveParameters throws when called against a C# function?

When I call DeriveParameters against a function written in SQLCLR function it throws an exception. I've been working on this a little while and haven't found a fix. I understand that I could write additional code to do the same work DeriveParameters does, but it seems like this should work.

This is the exception thrown:

[InvalidOperationException: The stored procedure 'GSI.Utils.IsMatch' doesn't exist.]

The function is defined as

CREATE FUNCTION [Utils].[IsMatch](@.Value [nvarchar](4000), @.RegularExpression [nvarchar](4000))
RETURNS [bit] WITH EXECUTE AS CALLER
AS
EXTERNAL NAME [RegularExpressionsHelper].[UserDefinedFunctions].[IsMatch]

The C# function is defined as:

[Microsoft.SqlServer.Server.SqlFunction(IsDeterministic=true)]
public static SqlBoolean IsMatch(SqlString Value, SqlString RegularExpression)
{
Regex rx = new Regex( RegularExpression.ToString() );
string s = Value.ToString();

return new SqlBoolean(rx.IsMatch(s));
}

This is the code I'm using to call DeriveParameters:

static void Main(string[] args)
{
using (SqlConnection conn = new SqlConnection(m_GetConnectionString()))
{
conn.Open();

SqlCommand myCommand = new SqlCommand("GSI.Utils.IsMatch", conn);
myCommand.CommandType = System.Data.CommandType.StoredProcedure;
SqlCommandBuilder.DeriveParameters(myCommand);
}
}

I found that DeriveParameters seems to call sp_procedure_params_managed and when I call it myself it returns the parameters correctly for T-SQL functions, but returns no records when I specify a SQLCLR function.

DECLARE @.procedure_name sysname;
DECLARE @.group_number int;
DECLARE @.procedure_schema sysname;
DECLARE @.parameter_name sysname;

SET @.procedure_name = 'IsMatch';
SET @.group_number = 1;
SET @.procedure_schema = 'Utils';
SET @.parameter_name = null;

DECLARE @.RC int

EXECUTE @.RC = [GSI].[Sys].[sp_procedure_params_managed]
@.procedure_name
,@.group_number
,@.procedure_schema
,@.parameter_name


I'm able to execute the function without issue and I'm able to use DeriveParameters against everything in the database except C# based functions (and I've tried others besides IsMatch). I'm attempting to run DeriveParameters from a console application and from ASP.NET, both running .NET 2.0.

I've experienced the same behavior in these versions:

SQL Server 2005 Enterprise Edition RTM (MSDN Image on Virtual Server)
SQL Server 2005 Enterprise Edition SP1 (MSDN Image on Virtual Server)
SQL Server 2005 Enterprise Edition SP1 + Hotfix kb918222 (MSDN Image on Virtual Server)
SQL Server 2005 Developer Edition SP1

Has anyone else seen similar behavior?

Any advice would be greatly appreciated -- Thanks

Steve

I verified the behavior and filed a bug on it. Hopefully it can be fixed soon - feel free to file a bug on connect.microsoft.com if you want to track the status.

You can always get the parameters from querying sys.parameters, but of course it doesn't do the magic that DeriveParameters does.

Steven

|||

Any status on this bug?

Derived parameters calls:

exec sp_procedure_params_managed @.procedure_name=N'GetServerTimeZoneName'

(Which Returns nothing for CLR based stored procedures)... thats the bug!

sp_help GetServerTimeZoneName and executing the CLR procedure work just fine...

Thanks

Ron Keen

|||

I submitted the bug here:

http://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=185170

Someone else submitted it here:

http://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=214251

Derived Column Transformation - Error

Can i call the FUNCTION within another FUNCTION

Like SUBSTRING(CHECK_NO,2,LEN(CHECK_NO) - 1) ?

I am reading the Check_No "1234321" from the flat file. The file holds all the value within double quote and values are sepearated by comma.

Objective: I am trying to elimiate the double quote using "Dervied Column'.

Strange: The above FUNCTION is working fine while construct the SQL Query.

Pls help me. Thank you.

Why don't you use the REPLACE function:

REPLACE(CHECK_NO, ""","") - I am replacing the double quotes with a null value

|||

The syntax becomes RED in color REPLACE(CHECK_NO, ""","")

It means syntax error. Am i right ?

Sorry, I am new to SSIS. Thanks for your help|||

Try

Code Snippet

REPLACE(CHECK_NO, "\"", "")

The quote needs to be escaped.

Derived column returning no data on GetDate() function

Hi all--I've got a derived column transformation where I am adding a field called Import_Date. I'm telling it to add as a new column and use the function "GetDate()" to populate the field. When I run the package, it returns NULL as the data value for all rows. Any idea why this might be happening?

Hi Jonathan,

That's very odd indeed. Have you by any chance changed the type of the derived column, or is it still DT_DBTIMESTAMP?
Are you seeing any errors at all?

Thanks
Mark

|||

Hi Mark--No errors, and no change to the data type. Just a return of a NULL value on each row in the result set after stored in the local database.

I'm running through an online example now using the exact same GetDate() function with the AdventureWorks database now--not finished with the example yet on another machine installed with SQL Server 2005 SP1 Developer Edition, so I can't say whether this is reproducible yet.

- Jonathan

|||If you put a data viewer on the path between the derived column and whatever is after it, is the result already NULL at that point?|||

Hi Mark--I'm not sure when it returns NULL; I didn't have a data viewer on hand to do so. I'm new to Visual Studio and Integration Services, so I know that I need to isolate the contents of the derived column as a variable at the time the step is executed, but am not sure how to do that in this product. What data viewer utility or resource would you suggest?

Jonathan

|||

If you double click on any of the path arrows between components, it will bring up the "Data Flow Path Editor" dialog. In the left pane, you should see a selection called "Data Viewers". Select that, and then hit the add button, and you should see a dialog with a few data viewer choices. For this purpose, "Grid" is what you want.

Once you have added a Grid data view to the path that exits the derived column, you can execute the package again (within BIDS) and you should get a dialog that shows a number of rows with all the columns and data values at that point, and execution will pause there. If the column is already showing as NULL in this viewer, then we'll have isolated the problem to the derived column, most likely.

Let me know what you find out.

Thanks
Mark

sql

Derived column returning no data on GetDate() function

Hi all--I've got a derived column transformation where I am adding a field called Import_Date. I'm telling it to add as a new column and use the function "GetDate()" to populate the field. When I run the package, it returns NULL as the data value for all rows. Any idea why this might be happening?

Hi Jonathan,

That's very odd indeed. Have you by any chance changed the type of the derived column, or is it still DT_DBTIMESTAMP?
Are you seeing any errors at all?

Thanks
Mark

|||

Hi Mark--No errors, and no change to the data type. Just a return of a NULL value on each row in the result set after stored in the local database.

I'm running through an online example now using the exact same GetDate() function with the AdventureWorks database now--not finished with the example yet on another machine installed with SQL Server 2005 SP1 Developer Edition, so I can't say whether this is reproducible yet.

- Jonathan

|||If you put a data viewer on the path between the derived column and whatever is after it, is the result already NULL at that point?|||

Hi Mark--I'm not sure when it returns NULL; I didn't have a data viewer on hand to do so. I'm new to Visual Studio and Integration Services, so I know that I need to isolate the contents of the derived column as a variable at the time the step is executed, but am not sure how to do that in this product. What data viewer utility or resource would you suggest?

Jonathan

|||

If you double click on any of the path arrows between components, it will bring up the "Data Flow Path Editor" dialog. In the left pane, you should see a selection called "Data Viewers". Select that, and then hit the add button, and you should see a dialog with a few data viewer choices. For this purpose, "Grid" is what you want.

Once you have added a Grid data view to the path that exits the derived column, you can execute the package again (within BIDS) and you should get a dialog that shows a number of rows with all the columns and data values at that point, and execution will pause there. If the column is already showing as NULL in this viewer, then we'll have isolated the problem to the derived column, most likely.

Let me know what you find out.

Thanks
Mark

Friday, March 9, 2012

Deploying from VB.NET Report Designer to Report Server fails

quote:

>--Original Message--
>I would like to know what protocol / port Report Designer

uses when performing the "Deploy " function from the IDE
of Report Designer. For some reason it cannot connect with
the report server. I can browse the /rs/reportserver
directory and can upload the RDL file through the IE.
quote:

>This is probably some kind of security related issue, but

I need to know what to look for...
quote:

>Thanks
>.
>

I believe reporting services-type issues should be posted
here; microsoft.public.sqlserver.reportingsvcs (although
to be fair the newsgroup isn't available via the HTML
viewer).
Having said that, when you 'deploy' an RS report all its
doing is posting XML (ie the RDL) to a web site (in this
case a web service) so the protocol is HTTP and the port
is usually 80. The fact that you can browse to the
directory and upload using the Report Manager suggests to
me that the problem is with your VS config. In the report
project properties check that you've set
the 'TargetServerURL' for the RS web service correctly.Thank you for your comment. The TargetServerURL is correct. It was working u
ntil the headquarters IT changed some kind of security policy, blocking spec
ific ports. I do not know thus which port the Report Server is listening for
the RDL files.
Thanks.
MP|||The Report Server is a web service so it is listening on port 80. Can you
connect to the URL directly? We should move the discussion over to the
reporting services newsgroup.
Brian Welcker
Group Program Manager
SQL Server Reporting Services
This posting is provided "AS IS" with no warranties, and confers no rights.
"Minas Papageorgiou" <anonymous@.discussions.microsoft.com> wrote in message
news:92DC3C18-5F09-4366-AA80-38DE26B879E9@.microsoft.com...
> Thank you for your comment. The TargetServerURL is correct. It was working
until the headquarters IT changed some kind of security policy, blocking
specific ports. I do not know thus which port the Report Server is listening
for the RDL files.
> Thanks.
> MP
>|||I'm having the same problem.. I can browse to the target url fine, but I ca
n't deploy from IDE. I can open a browser and upload the RDL through the we
b interface from the same machine. I've verified target URL is correct. I
can't find any mesages in t
he client event log or the server event log indicating what the problem migh
t be... suggestions?|||What is the message you get in the Report Designer? Are you using HTTP or
HTTPS?
Brian Welcker
Group Program Manager
SQL Server Reporting Services
This posting is provided "AS IS" with no warranties, and confers no rights.
"Brian Brown" <anonymous@.discussions.microsoft.com> wrote in message
news:4F51D39A-BEAC-43AB-817A-D894CBB0A74E@.microsoft.com...
> I'm having the same problem.. I can browse to the target url fine, but I
can't deploy from IDE. I can open a browser and upload the RDL through the
web interface from the same machine. I've verified target URL is correct.
I can't find any mesages in the client event log or the server event log
indicating what the problem might be... suggestions?

Sunday, February 19, 2012

Deploy New User Defined Function to Anon Merge Replicas

How do I get a New UDF to propagate to Anonymous Merge Subscribers?
SS2K SP4 Added New UDF <fctrptTeamReview> to Database using Wizard
Tried CREATE in Query Analyzer, then though there might be a Stored
Procedure . . . No joy! Checked BOL, Hilary & Paul
Aubrey Kelley
your options are
1) create a new publication and send it
2) use sp_addscriptexec to deploy it to unc deployed subcribers only (it
doesn't work for ftp)
3) use ado to send it there
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"Aubrey" <miscuates@.online.nospam> wrote in message
news:0DEF03C0-7DC1-46D2-B13E-9D58B65E1C27@.microsoft.com...
> How do I get a New UDF to propagate to Anonymous Merge Subscribers?
> SS2K SP4 Added New UDF <fctrptTeamReview> to Database using Wizard
> Tried CREATE in Query Analyzer, then though there might be a Stored
> Procedure . . . No joy! Checked BOL, Hilary & Paul
> --
> Aubrey Kelley
|||Thanks, Hilary!
Tried: sp_addscriptexec Database, "fullpathname\TeamReview.sql"
Subscriber Initialized OK, and got this far:
Launching osql to apply script 'TeamReview.sql'
After a few seconds it Errored Out with:
The schema script '0\\servername\ReplData\2005112082642800\TeamRevie w.sql'
could not be propagated to the subscriber.
Why is it prepending the '0' (Zero) to the Path? How can I remedy this?
Of course this had broken Merge Replication, and I cannot get rid of it!
Aubrey Kelley
"Hilary Cotter" wrote:

> your options are
> 1) create a new publication and send it
> 2) use sp_addscriptexec to deploy it to unc deployed subcribers only (it
> doesn't work for ftp)
> 3) use ado to send it there
>
> --
> Hilary Cotter
> Looking for a SQL Server replication book?
> http://www.nwsu.com/0974973602.html
> Looking for a FAQ on Indexing Services/SQL FTS
> http://www.indexserverfaq.com
> "Aubrey" <miscuates@.online.nospam> wrote in message
> news:0DEF03C0-7DC1-46D2-B13E-9D58B65E1C27@.microsoft.com...
>
>
|||Hello Aubrey,
It seems the configuration of the replication has some issues. Does the
issue occur if you create a new publicaiton with this shared snapshot
location? Also, you may want to try a different shared folder for snapshot
to test the situation.
Regards,
Peter Yang
MCSE2000/2003, MCSA, MCDBA
Microsoft Online Partner Support
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
================================================== ===
This posting is provided "AS IS" with no warranties, and confers no rights.
| Thread-Topic: Deploy New User Defined Function to Anon Merge Replicas
| thread-index: AcXt20NbtIQ7JH6qSzyDPoJAnLeSBQ==
| X-WBNR-Posting-Host: 69.218.133.236
| From: =?Utf-8?B?QXVicmV5?= <miscuates@.online.nospam>
| References: <0DEF03C0-7DC1-46D2-B13E-9D58B65E1C27@.microsoft.com>
<unfOv7c7FHA.3048@.TK2MSFTNGP10.phx.gbl>
| Subject: Re: Deploy New User Defined Function to Anon Merge Replicas
| Date: Sun, 20 Nov 2005 06:04:03 -0800
| Lines: 49
| Message-ID: <5B5E6958-5768-4782-A676-8ED3880BC45C@.microsoft.com>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.public.sqlserver.replication
| NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFT NGXA03.phx.gbl
| Xref: TK2MSFTNGXA02.phx.gbl microsoft.public.sqlserver.replication:66799
| X-Tomcat-NG: microsoft.public.sqlserver.replication
|
| Thanks, Hilary!
|
| Tried: sp_addscriptexec Database, "fullpathname\TeamReview.sql"
|
| Subscriber Initialized OK, and got this far:
| Launching osql to apply script 'TeamReview.sql'
|
| After a few seconds it Errored Out with:
| The schema script
'0\\servername\ReplData\2005112082642800\TeamRevie w.sql'
| could not be propagated to the subscriber.
|
| Why is it prepending the '0' (Zero) to the Path? How can I remedy this?
|
| Of course this had broken Merge Replication, and I cannot get rid of it!
| --
| Aubrey Kelley
|
|
| "Hilary Cotter" wrote:
|
| > your options are
| >
| > 1) create a new publication and send it
| > 2) use sp_addscriptexec to deploy it to unc deployed subcribers only
(it
| > doesn't work for ftp)
| > 3) use ado to send it there
| >
| >
| > --
| > Hilary Cotter
| > Looking for a SQL Server replication book?
| > http://www.nwsu.com/0974973602.html
| >
| > Looking for a FAQ on Indexing Services/SQL FTS
| > http://www.indexserverfaq.com
| >
| > "Aubrey" <miscuates@.online.nospam> wrote in message
| > news:0DEF03C0-7DC1-46D2-B13E-9D58B65E1C27@.microsoft.com...
| > > How do I get a New UDF to propagate to Anonymous Merge Subscribers?
| > >
| > > SS2K SP4 Added New UDF <fctrptTeamReview> to Database using Wizard
| > >
| > > Tried CREATE in Query Analyzer, then though there might be a Stored
| > > Procedure . . . No joy! Checked BOL, Hilary & Paul
| > > --
| > > Aubrey Kelley
| >
| >
| >
|
|||FYI: Further experience with Error:
The schema script
'0\\servername\ReplData\2005112082642800\TeamRevie w.sql' could not be
propagated to the subscriber.
The prepended '0' (Zero) on the Path aborted Anonymous Merge Replication
over the Internet (HTTP).
On a virgin Win XP Pro / SP2 (immediately after re-imaging from Compaq
Recovery CD's), loaded with my MS Access SQL Runtime Project. The Merge
Replication is coded in Forms based VB Modules. The Merge.Initialize worked
just fine (as always). Then 'osql' attempted to run the schema script, and
Failed!
Just for fun, I opened a VPN to the Host, tested it with Windows Explorer
(to \\hostservername) and with a VB File Copy Command Button on my
Synchronize Form. This time, the Merge worked just fine!
Conclusion: the Schema Script File needs the VPN (or LAN) to support its
File Copy.
Great learning (on Turkey Day (USA)).
Aubrey
Aubrey Kelley
"Hilary Cotter" wrote:

> your options are
> 1) create a new publication and send it
> 2) use sp_addscriptexec to deploy it to unc deployed subcribers only (it
> doesn't work for ftp)
> 3) use ado to send it there
>
> --
> Hilary Cotter
> Looking for a SQL Server replication book?
> http://www.nwsu.com/0974973602.html
> Looking for a FAQ on Indexing Services/SQL FTS
> http://www.indexserverfaq.com
> "Aubrey" <miscuates@.online.nospam> wrote in message
> news:0DEF03C0-7DC1-46D2-B13E-9D58B65E1C27@.microsoft.com...
>
>

Friday, February 17, 2012

Dependencies are lost when alter an object

Hello,
I have an old problem but now it became ugly...
I have an object (for example a function) that is used in some views. If I am looking on dependencies, it shows me the 8 views whcih depends on it. But if I edit the function in Query Analyser and run the script (no modification on the script), it deletes
all the dependencies for the 8 views on it... The problem is worst because when I generate the initial snapshot for a merge replication, it will affect the generation order of the scripts and I get error when trying to create the views (on subscriber), s
aying that the function doesn't exist in database...
Any ideea how can I preserve the dependencies?
Thanks in advance
Catalin,
I've also wondered what is the cause of this. There was mention a while back
that it is caused by using enterprise manager to do certain changes to
objects rather than using QA. Also, it has been mentioned that renaming
objects can corrupt dependencies.
I haven't found a definitive article explaining this, but as a workaround,
if you have this problem, you might want to run sp_refreshview on your views
prior to replication.
HTH,
Paul Ibison
|||I don't work with EM, only with QA.
For example: I run this script, to create 2 functions:
CREATE FUNCTION dbo.Child () RETURNS TABLE RETURN (SELECT 1 AS Col)
GO
CREATE FUNCTION dbo._Parent () RETURNS TABLE RETURN (SELECT * FROM dbo.Child ())
GO
As you can see _Parent depens on Child.
At this moment everything is fine on dependencies (each one shows the other)
But if I execute the next script:
ALTER FUNCTION dbo.Child () RETURNS TABLE RETURN (SELECT 1 AS Col)
I loose all the referencies. And I need to generate the initial snapshot for a replication. And because no dependencies found, it will create the function in the order of names (and "_Parent" is before "Child") and when it tries to create the database (on
subscriber) I get the error because it tries to create _Parent before Child...
|||Hi Catalin,
If you don't have very many complex dependencies among functions, you may be
able to restore the dependency information by altering _Parent after you
alter Child.
HTH
-Raymond
"Catalin" <anonymous@.discussions.microsoft.com> wrote in message
news:0D8E0108-CACC-4491-A1B2-DFCD4FE641C6@.microsoft.com...
> I don't work with EM, only with QA.
> For example: I run this script, to create 2 functions:
> CREATE FUNCTION dbo.Child () RETURNS TABLE RETURN (SELECT 1 AS Col)
> GO
> CREATE FUNCTION dbo._Parent () RETURNS TABLE RETURN (SELECT * FROM
dbo.Child ())
> GO
> As you can see _Parent depens on Child.
> At this moment everything is fine on dependencies (each one shows the
other)
> But if I execute the next script:
> ALTER FUNCTION dbo.Child () RETURNS TABLE RETURN (SELECT 1 AS Col)
> I loose all the referencies. And I need to generate the initial snapshot
for a replication. And because no dependencies found, it will create the
function in the order of names (and "_Parent" is before "Child") and when it
tries to create the database (on subscriber) I get the error because it
tries to create _Parent before Child...
|||Yes, but... unfortunately I have a database with more that 1000 objects and I need to replicate it... In this case I need to "reconstruct" the dependencies tree. The simplest way that I think is to develop a small VB application that will try to re-establ
ish the order (trying each script to execute in a blank database and to determine the missing object)...