Wednesday, March 7, 2012
Metadata Inheritance
I have written a mechanism which returns meta data back to a client for
different views. For example, one meta data item on a column is the Display
Name.
Now, so I don't have to keep attaching meta data to a particular column
every time I create a new view, I "inherit" the meta data from a parent view
or table by looking at all the same named columns in any views or tables
that the table depends (sysdepends) on.
The problem is, sometimes it make sense to change the name of a column in a
view from the underlying table (e.g. company table has a "name" column, but
in the view, you want to call it "company_name").
My question is, is there an easy way to determine where a view's column
really came from?
Thanks,
-PaulNever mind, I forgot to look at the depnumber column in sysdepends!
"Paul" <a@.b.com> wrote in message
news:eWN9knVCFHA.3940@.TK2MSFTNGP09.phx.gbl...
> Hello,
> I have written a mechanism which returns meta data back to a client for
> different views. For example, one meta data item on a column is the
> Display Name.
> Now, so I don't have to keep attaching meta data to a particular column
> every time I create a new view, I "inherit" the meta data from a parent
> view or table by looking at all the same named columns in any views or
> tables that the table depends (sysdepends) on.
> The problem is, sometimes it make sense to change the name of a column in
> a view from the underlying table (e.g. company table has a "name" column,
> but in the view, you want to call it "company_name").
> My question is, is there an easy way to determine where a view's column
> really came from?
> Thanks,
> -Paul
>|||Okay, now the hard question.
How do I correlate a column in the sysdepends table back to a column in the
resulting view's columns?
Thanks,
-Paul
"Paul" <a@.b.com> wrote in message
news:OBXyfyVCFHA.1836@.tk2msftngp13.phx.gbl...
> Never mind, I forgot to look at the depnumber column in sysdepends!
>
> "Paul" <a@.b.com> wrote in message
> news:eWN9knVCFHA.3940@.TK2MSFTNGP09.phx.gbl...
>|||On Wed, 2 Feb 2005 15:27:44 -0500, Paul wrote:
>Okay, now the hard question.
>How do I correlate a column in the sysdepends table back to a column in the
>resulting view's columns?
Hi Paul,
You don't.
You are probably thinking right now of fairly straight-forward views,
where such a mapping would be viable. But views can be fairly complex!
CREATE VIEW test
AS SELECT Col1 - Col2 AS A,
Col1 + Col2 AS B,
CASE WHEN EXISTS (SELECT *
FROM YZ
WHERE Foo = SomeTable.Bar)
THEN 1
ELSE 2
END AS C,
'Constant value' AS D,
Col3 + 1 AS E,
Col3 - 1 AS F
FROM SomeTable
How should each of the view's columns be correlated to each of the
underlying table's columns? And remember that this is also a fairly simple
example - I could come up with much more contrived views (some of my real
views for projects I do are much more contrived!)
Best, Hugo
--
(Remove _NO_ and _SPAM_ to get my e-mail address)
Meta Integration Solutions
Hi,
Has anyone experience with Meta Integration Solutions and converting to SSIS ?
and converting to SQL ?
and converting to Analysis Server ?
and converting to Reporting Server ?
You can find their website http://www.metaintegration.net/Products/Overview/Solutions.html
Constantijn Enders
You can check out http://www.metaintegration.net/Partners/Microsoft.html for specific versions supported. Scroll down where it says SSIS (dtsx) packages will be supported from their 6/1/07 release. The contact info of folks from MSFT are available on the same page.Meta Integration Solutions
Hi,
Has anyone experience with Meta Integration Solutions and converting to SSIS ?
and converting to SQL ?
and converting to Analysis Server ?
and converting to Reporting Server ?
You can find their website http://www.metaintegration.net/Products/Overview/Solutions.html
Constantijn Enders
You can check out http://www.metaintegration.net/Partners/Microsoft.html for specific versions supported. Scroll down where it says SSIS (dtsx) packages will be supported from their 6/1/07 release. The contact info of folks from MSFT are available on the same page.Meta Database Design Select Question.
I have a Datbase with teh following two tables.
Table 1: default_en_listingsdb
it contains the following fields
ID user_ID Title
Table2:
default_en_listingsdbelements
ID field_name field_value listing_id
listing_ID in table 2 is equal to the ID in table 1.
I am building a search for these two tables where i want to return the ID, user_ID and Title. The table data looks like this.
Table 1:
ID user_ID Title
1 1 Test
2 2 Test2
Table2:
ID field_name field_value listing_id
1 beds 2 2
2 beds 1 1
3 city kingsley 1
4 city kingsley 2
I want to return only the ID's where they contain both beds = 2 and city = kingsley.. I want to do this with on e select statement if possible.
Thanks,I hate this, what Tom Kyte calls the "funky data model". Flexible as you like, but so hard to query (and this is a very simple query!)
Also, data integrity is non-existent, because there can be no database constraint that stops you putting 2 for city or kingsley for beds...
Anyway... </RANT>
select t1.*
from table1 t1, table2 beds, table2 city
where t1.id = beds.listing_id
and beds.field_name = 'beds'
and beds.field_value = '2'
and city.field_name = 'city'
and city.field_value = 'kingsley';
Yuk!|||Thanks, I knew it was going to be ugly, i agree that this data model in some ways really sucks... ohh well off to make this work.. Thanks again|||Originally posted by greengaint
Thanks, I knew it was going to be ugly, i agree that this data model in some ways really sucks... ohh well off to make this work.. Thanks again
Everyone "invents" this data model at some point early in their database careers; well, I'm sure I did once anyway. "Hey, look! With this model we don't have to alter tables or application code ever again! The users can just define their own 'fields' whenever they like!" Then later you find that:
(a) performance sucks very badly, and
(b) you need to write SQL 17 pages long to produce the simplest report, and
(c) the data is full of nonsense like beds='4.2' and city = ' kignsley' and startdate = '31 Feb 2004'... and
(d) nobody likes this system any more
Meta data??
We have about 50 databases all of them are being merge replicated. On a
average , each database has about 150 tables which are published.
We get meta data retention error atleast one per week on a average. We have
two category of users, Users at the publisher server when they log (dialup
or dedicated Network) .Users logging on to the subscriber server -no dial up
always via dedicated network.
We notice meta-deta retention error message only when users connect to the
publisher server, that too when people dial up. Does this indicate any clues
?
Alternatively, to solve this meta-deta retention error ,we plan to drop
publication/delete replication and redo the replication setup process for
the database , where this error happens atleast once in a month. Does this
solve this problem. Is there any other solution ?
Please advise
Thanks,
Soura.
What is the exact error message or error number.
I don't understand how users come into the picture. Are you saying these
users are pulling the subscriptions? Are you using Windows Synchronization
Manager.
Dropping a publication and recreating it will definitely clean up merge
replication meta data, but there should be better ways of doing this.
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
"SouRa" <SouRa@.discussions.microsoft.com> wrote in message
news:68164873-E280-4B01-B8C8-54502CC2E4A4@.microsoft.com...
> Hi,
> We have about 50 databases all of them are being merge replicated. On a
> average , each database has about 150 tables which are published.
> We get meta data retention error atleast one per week on a average. We
> have
> two category of users, Users at the publisher server when they log (dialup
> or dedicated Network) .Users logging on to the subscriber server -no dial
> up
> always via dedicated network.
> We notice meta-deta retention error message only when users connect to the
> publisher server, that too when people dial up. Does this indicate any
> clues
> ?
> Alternatively, to solve this meta-deta retention error ,we plan to drop
> publication/delete replication and redo the replication setup process for
> the database , where this error happens atleast once in a month. Does this
> solve this problem. Is there any other solution ?
> Please advise
> Thanks,
> Soura.
>
|||Thanks for you response Mr Cotter. We have provided answers for your further
questions.
1. Error message : The merge process could not perform retention-based meta
data cleanup in database 'database name'".
2. No. We are NOT using Windows Synchronization Manager.
3. The users dialing up are not pulling the subscriptions, since they
connect only to the publiser. We notice the above error message once these
users connect after this replication error, we also notice timeout error.
When users log-out and log-in replication works normally as usual and
timeout message also gets solved.
4. You are right, there should be some better ways cleanup of meta deta,
besides droping and recreating. Eager to know what are they, so that we can
solve this problem.
thanks
Soura.
"Hilary Cotter" wrote:
> What is the exact error message or error number.
> I don't understand how users come into the picture. Are you saying these
> users are pulling the subscriptions? Are you using Windows Synchronization
> Manager.
> Dropping a publication and recreating it will definitely clean up merge
> replication meta data, but there should be better ways of doing this.
> --
> 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
> "SouRa" <SouRa@.discussions.microsoft.com> wrote in message
> news:68164873-E280-4B01-B8C8-54502CC2E4A4@.microsoft.com...
>
>
Meta Data services?
I'm very new to SQL Server 2000. I'm a student applied informatics and for my personal training I work in a software company.
My job exists of learning & using MS SQL Server 2000. I worked a lot and SQL Server 2000 works well.
The only thing I really don't understand is META DATA SERVICES !
So, my question to ...
What is the purpose of Meta data
How can I manage meta data in SQL Server 2000
Where can I find some good resources for learning to work with meta data in SQL Server 2000.
Thanks !!!
JHi
Is this topic so difficult?
I always heard that meta data was an important step in devellopement?
Is this true or not?|||Meta Data are the data of the data... What does it mean? Well, you need to store information to define a column in a table, like varchar(50) NULL. This information are called Meta Data.
The use of it? The other day I built a fast web form that had to validate the size of the string the user was entering. Depending of the option selected, I had to insert the string in a varchar(15), (18), (50) or (65) column. I wrote a stored proc that was returning the size of the field I had to write in, which I put in my MAXLENGTH web tag, using javascript.
So my stored proc reads the meta data of the field I ask for...
Fun isn't it?
Meta Data Services SQL 2000 "msdb database could not be opened"
Hello anyone / everyone,
If you are having trouble accessing Meta Data Services on W2k3 and SQL 2000 and get the error that the "msdb database could not be opened" I found that hot fix 912812 on the operating system is the culprit. Remove it and Meta Data goes back to working, although I am being asked to approve the ActiveX control every time the page refreshes.
Hope this helps somebody, to took me long enough to track it down.
If anyone has a resolution to the ActiveX question I'd love to know the answer.
Thank you,
Uncle Davy
Use "Internet Options" in Internet Explorer and on the security tab, select a "custom level." There you can adjust various properties relating to prompting for and enabling ActiveX controls.
Donald
|||That would seem the logical choice. However, I tried permitting every activeX and it was still giving me the error!
|||I have the same error.
SQL 2000 running on Server 2003 SP1.
The hotfix isn't in the list to remove and the permissions have all been granted for activex as well as ensuring database user persmissions are ok.
|||I also removed the "Internet Explorer Enhanced Security Settings" from the server. If you haven't done so try it (Add remove programs -> Add remove windows componenets -> IE enhanced security settings uncheck this).This was the only issue I ever found (the hotfix) no one ever posted anything about it that was useful.
Of course once I removed the hot fix, I never went back...
Good luck.
Meta Data Services SQL 2000 "msdb database could not be opened"
Hello anyone / everyone,
If you are having trouble accessing Meta Data Services on W2k3 and SQL 2000 and get the error that the "msdb database could not be opened" I found that hot fix 912812 on the operating system is the culprit. Remove it and Meta Data goes back to working, although I am being asked to approve the ActiveX control every time the page refreshes.
Hope this helps somebody, to took me long enough to track it down.
If anyone has a resolution to the ActiveX question I'd love to know the answer.
Thank you,
Uncle Davy
Use "Internet Options" in Internet Explorer and on the security tab, select a "custom level." There you can adjust various properties relating to prompting for and enabling ActiveX controls.
Donald
|||That would seem the logical choice. However, I tried permitting every activeX and it was still giving me the error!
|||I have the same error.
SQL 2000 running on Server 2003 SP1.
The hotfix isn't in the list to remove and the permissions have all been granted for activex as well as ensuring database user persmissions are ok.
|||I also removed the "Internet Explorer Enhanced Security Settings" from the server. If you haven't done so try it (Add remove programs -> Add remove windows componenets -> IE enhanced security settings uncheck this).This was the only issue I ever found (the hotfix) no one ever posted anything about it that was useful.
Of course once I removed the hot fix, I never went back...
Good luck.
Meta Data Services
How do I enable the SQL Server Meta Data Services? When I installed the
default instance, during SQL installation for the first time, I did not see
anything about installing meta data services. I am practicing with DTS and in
the Select Source Table And Views page, the SQL Services Meta Data Services
is grayed out and I want to be able to select it and proceed with my tasks in
the 70-228 book about modifying tables and summarizing dta in the
northwindreportdata database using the DTS Import/Export wizard. How do I
enable the meta data services? Thank you.Hi
I have never used this, but one way may be to install the meta data SDK.
John
"Dominick D." wrote:
> Hello SQL Gurus:
> How do I enable the SQL Server Meta Data Services? When I installed the
> default instance, during SQL installation for the first time, I did not see
> anything about installing meta data services. I am practicing with DTS and in
> the Select Source Table And Views page, the SQL Services Meta Data Services
> is grayed out and I want to be able to select it and proceed with my tasks in
> the 70-228 book about modifying tables and summarizing dta in the
> northwindreportdata database using the DTS Import/Export wizard. How do I
> enable the meta data services? Thank you.|||Well, I was looking, but I could not find out how to install the meta data
SDK. Can you point me in the right direction? Thanks.
"John Bell" wrote:
> Hi
> I have never used this, but one way may be to install the meta data SDK.
> John
> "Dominick D." wrote:
> > Hello SQL Gurus:
> >
> > How do I enable the SQL Server Meta Data Services? When I installed the
> > default instance, during SQL installation for the first time, I did not see
> > anything about installing meta data services. I am practicing with DTS and in
> > the Select Source Table And Views page, the SQL Services Meta Data Services
> > is grayed out and I want to be able to select it and proceed with my tasks in
> > the 70-228 book about modifying tables and summarizing dta in the
> > northwindreportdata database using the DTS Import/Export wizard. How do I
> > enable the meta data services? Thank you.|||Hi
I think this is part of the SQL 2000 installation, but I don't remember ever
seeing it!
John
"Dominick D." wrote:
> Well, I was looking, but I could not find out how to install the meta data
> SDK. Can you point me in the right direction? Thanks.
> "John Bell" wrote:
> > Hi
> >
> > I have never used this, but one way may be to install the meta data SDK.
> >
> > John
> >
> > "Dominick D." wrote:
> >
> > > Hello SQL Gurus:
> > >
> > > How do I enable the SQL Server Meta Data Services? When I installed the
> > > default instance, during SQL installation for the first time, I did not see
> > > anything about installing meta data services. I am practicing with DTS and in
> > > the Select Source Table And Views page, the SQL Services Meta Data Services
> > > is grayed out and I want to be able to select it and proceed with my tasks in
> > > the 70-228 book about modifying tables and summarizing dta in the
> > > northwindreportdata database using the DTS Import/Export wizard. How do I
> > > enable the meta data services? Thank you.
Meta Data Services
How do I enable the SQL Server Meta Data Services? When I installed the
default instance, during SQL installation for the first time, I did not see
anything about installing meta data services. I am practicing with DTS and i
n
the Select Source Table And Views page, the SQL Services Meta Data Services
is grayed out and I want to be able to select it and proceed with my tasks i
n
the 70-228 book about modifying tables and summarizing dta in the
northwindreportdata database using the DTS Import/Export wizard. How do I
enable the meta data services? Thank you.Hi
I have never used this, but one way may be to install the meta data SDK.
John
"Dominick D." wrote:
> Hello SQL Gurus:
> How do I enable the SQL Server Meta Data Services? When I installed the
> default instance, during SQL installation for the first time, I did not se
e
> anything about installing meta data services. I am practicing with DTS and
in
> the Select Source Table And Views page, the SQL Services Meta Data Service
s
> is grayed out and I want to be able to select it and proceed with my tasks
in
> the 70-228 book about modifying tables and summarizing dta in the
> northwindreportdata database using the DTS Import/Export wizard. How do I
> enable the meta data services? Thank you.|||Well, I was looking, but I could not find out how to install the meta data
SDK. Can you point me in the right direction? Thanks.
"John Bell" wrote:
[vbcol=seagreen]
> Hi
> I have never used this, but one way may be to install the meta data SDK.
> John
> "Dominick D." wrote:
>|||Hi
I think this is part of the SQL 2000 installation, but I don't remember ever
seeing it!
John
"Dominick D." wrote:
[vbcol=seagreen]
> Well, I was looking, but I could not find out how to install the meta data
> SDK. Can you point me in the right direction? Thanks.
> "John Bell" wrote:
>
Meta Data retrieval
I need to know how I can retrieve the Meta Data Information about a procedur
e.
I know I can use SET FMTONLY ON to retrieve it but I need to retrieve this
dynamically - I need a call that will return a resultset containing the
information
instead of just a header info.
TIA,
KOYI'm not clear on what exactly you're asking for... perhaps a look at
the INFORMATION_SCHEMAs in BOL will be of help?
"Kayode Yusuf" <Kayode Yusuf@.discussions.microsoft.com> wrote in message
news:3C1FD323-4CE5-4313-ACCE-A4D8EEE6B599@.microsoft.com...
> Greetings -
> I need to know how I can retrieve the Meta Data Information about a
procedure.
> I know I can use SET FMTONLY ON to retrieve it but I need to retrieve
this
> dynamically - I need a call that will return a resultset containing the
> information
> instead of just a header info.
> TIA,
> KOY|||This is what I want - I want to get the META data for a procedure - it is no
t
contained anywhere - you can get it through SET FMTONLY ON and then execute
the procedure - essentially, it returns a Zero Length resultset. The questio
n
is this :
I want to dynamically process the result set - I need to know dynamically,
the column names returned by the execution through TSQL.
TIA,
KOU
"Armando Prato" wrote:
> I'm not clear on what exactly you're asking for... perhaps a look at
> the INFORMATION_SCHEMAs in BOL will be of help?
> "Kayode Yusuf" <Kayode Yusuf@.discussions.microsoft.com> wrote in message
> news:3C1FD323-4CE5-4313-ACCE-A4D8EEE6B599@.microsoft.com...
> procedure.
> this
>
>|||How about something like this? Change <your server>, <your username>, and
<your password>
to the values appropriate for your server.
select *
into #temp
from OPENROWSET('SQLOLEDB','<your server>';'<your username>';'<your
password>',
'set fmtonly off; exec sp_helpuser;')
where 1=2
select name
from tempdb..syscolumns
where id = object_id('tempdb..#temp')
drop table #temp
"Kayode Yusuf" <KayodeYusuf@.discussions.microsoft.com> wrote in message
news:334CE4E5-BC9F-41C7-BE14-DB39EAEAC0FA@.microsoft.com...
> This is what I want - I want to get the META data for a procedure - it is
not
> contained anywhere - you can get it through SET FMTONLY ON and then
execute
> the procedure - essentially, it returns a Zero Length resultset. The
question
> is this :
> I want to dynamically process the result set - I need to know dynamically,
> the column names returned by the execution through TSQL.
> TIA,
> KOU
> "Armando Prato" wrote:
>
retrieve
the
Meta Data Management / Dependancy Analysis
BI perspective, meta data management is quite crucial. In SQL 2000, as far as I know we didn't have a great support for meta data. Has that changed in SQL2005?
What about dependancy analysis? For example if I drop a column from a SSIS data flow what would be affected? Is it possible?
Thanks
Hi Thiru,Re: Dependancy analysis: IDW 13 (I think) contained new functionality in the data-flow that detected when the metadata of the data-flow was not correct (e.g. If a column gets deleted from a component all downsteam componentrs will be affected) and prompts the designer with a number of options to fix. Of course, this same functionality is still there.
Re: Metadata management: What sort of metadata do you want to manage (e.g. metadata about the pipeline, execution metadata etc...?
How do you want to manage it?
-Jamie|||Jamie
We have used AbInitio EME (yes I know very very expensive product) at Reuters. Which does meta data management very well. This enables us to let the user community (via web site) to see where the data comes from and how we have transformed etc. So users can see it very clearly what calculations have been conducted etc.
At General Motors, SAS consultants used to show how SAS does dependancy analysis. I thought it was quite impressive.
I would like to see these two features inside SQL Server / even if we have to purchase it as separate product(s).
So my question, "is MS going to provide similar tools like their competitors?" I did speak to few MS speakers at TechEd, but didnt get any definite answer. Jamie, I was wondering whats your opinion on this?
Maybe Kirk or Ash can shed any light?
Thanks
Sutha|||Sutha,
Informatica too has a fantastic real-time monitoring tool called the Workflow Monitor. I asked a while back whether SSIS was going to get anything similar and was told "Not in this version".
Remember that this is still a version 1 product and even though there's a tremendous raft of features perhaps we shouldn't be expecting metadata tools such as these too early.
I'd be particularly interested to see if Donald has any thoughts on this but unfortunately he doesn't check this forum.
-Jamie|||Jamie
Infact I did speak to Donald about thing among other things. He didnt give me a definite answer and therefore I did assume it is not there. I did ask him about AbInitio data profiler and what is equivalent in SSIS. He did point that grpahs can act as a data profiler. I think MS need to make improvements on Data Profiler side too.
To compete with AbInitio, Informatica and other products, MS have to come up with a tool which can compete at same level. MS can compete very easily on price as the other products are extremly expensive.
Lets see what Kirk or Ash got to say!
Thanks
Sutha|||Hi guys, thanks for the questions. We're still just trying to get Yukon out the door. So, as you can imagine, we haven't quite transitioned to V.next discussions. We're aware that metadata management is something people are asking for. However, what that means to one person may be totally different than for another.
We're aware of what competitors provide, and will be looking at how to best fill the needs of our customers. As we get closer to planning v.next, we'll be eliciting more input like this from you our customers. We have some ideas about what's next, but we'd like to hear what you have to say.
Thanks,|||Thanks Kirk. I understand you are trying to get the product shipped in time. For next release it would be great if we could have something to cater for these 3 major areas.
Data Profiler (We can do now to a cretain extent)
Metadata Management Tool
Dependancy Analysis Tool
Sutha|||Can you describe those a little better to me? Please send me email directly and we can take this off line. Thanks,
K
Kirkha[at]Microsoftdotcom|||Ok ta. I will do that.
Thanks|||
In all of the responses I did not see where someone said if there is a way to at least generate some sort of meta data reports of the packages. Yes it is in xml, but I assume Microsoft at least has a way to retrieve meta data easilly. For examples Tasks Names, Sources, Variables and etc. Quite obviously not every one will want to open Visual Studio to find out what DTS packages we have servicing a Warehouse. Can anyone provide some insight on this?
|||Henry,I haven't heard of anything like that but it sounds like it could be a useful little tool.
Perhaps a .Net utility that uses X-Query to get at the elements of the .dtsx file? I can really see some value in something like this. I imagine someone in the SSIS community will come up with something like that before too long!
-Jamie|||Jamie
As you say someone will come up with something soon. It is going to be a valuable tool. Clients enquire this type feature when we try to sell MS DW solution to them. Maybe Darren and Allan can come up with something? hint hint :-)
Thanks
Sutha
PS - Jamie, I haven't done that mail yet
Meta Data Help Needed[:(]
Hi Guys,
I have a DataBase in which I have several Tables.
What I want is an SP or Query which takes as its parameter the "tablename".
The Output Should be a having three fields only.
Field name, DataType Of the Field, Length of the DataType.
For Example
Suppose the StoredProcedure Name is "SP_GetTables"
if i have a table named "tbl_Users" with fields
UserName varchar(50)
UserPass varchar(20)
UserAge int
UserStatus bit
In my program side if I pass the parameter as "tbl_Users" to the StoredProcedure SP_Users,
I should get the O/P as
Field Name DataType Length
UserName varchar 50
UserPass varchar 20
UserAge int
UserStatus bit
Regards,
Naveen.
Here it is,
Createproc SP_GetTables(@.TableNameSysname)
as
Begin
Select
column_name [field name]
, data_type [datatype]
, character_maximum_length [length]
From
INFORMATION_SCHEMA.COLUMNS
Where
table_name= @.tablename
Orderby
ordinal_position
End
HiManivannna.D.Sekaran,
Thanks a lot!!!
Is there a way by which I can pass the DataBase name too.
My requirement is like this.
I want an SP where i can pass DBName and Table Name as Parameters and that SP finds the DB and the table inside it.
The SP must reside in My DB too.
Regards,
Naveen
|||Createproc SP_GetTables(@.TableNameSysname, @.databaseSysname)
as
Begin
Exec('Select
column_name [field name]
, data_type [datatype]
, character_maximum_length [length]
From
['+ @.database+'].INFORMATION_SCHEMA.COLUMNS
Where
table_name = '''+ @.tablename+'''
Order by
ordinal_position')
End
Meta Data Cleanup For Merge Repl.
up. I have implemented merge replication with each publication having a
retention time (set in sp_addmergepublication) of 18 months and a
@.max_disretention (set in sp_adddistributiondb) also at 18 months. Also I
have a system where there is 1 Subscription PER Publication. The
Subscribers can be disconnected for long periods of time (I'm hoping for
less than 18 months). Now the changes on the Publisher will be stored on
the Distributor and will wait until a PULL Subscriber connects to Merge the
changes (changes made on both sides). From what I understand the merge
agent controls the meta data and will clean up the stored changes on the
distributor depending on the Retention period of the publication. So at
each merge agent run, anything older than 18 months that whether or not it
has been merged will be cleaned up (the max_disretention gets rid of changes
that have not been applied to subscribers too). Is this basically how the
cleanup of changes works?
When a connection is made I have a script that can be run to reinitialize a
subscription. It basically runs the merge agent, starts the snapshot agent,
sets the subscription to be reinitialized, and then runs the merge agent
again to apply the snapshot. Will Reinitializing a subscription clean up
the changes for a publication, kind of override the retention period?
Any ideas as to when the Change log (change info stored for a merge) is
cleaned up?
thanks,
Nate
Oops, the Distribution DB doesn't do anything during merge replication so
min_distretention and max_distretention don't apply. Just the Retention
period of the Publications. Can anyone confirm that the MetaData is only
cleaned up by the merge agent using the Retention period? And, that the
data is not cleaned up when a subscription is reinitialized?
thanks,
nate
Meta Data Cleanup Error
We are Merge replicating about 50 Production databases. We had planned to
monitor the meta deta clean up error during replication.
While we were monitoring the data to be updated during replication in one of
these databases, noticed 4 records to be merge replicated ( 3 insert and 1
update). At this moment we noticed the meta data clean up error. "The merge
process could not perform retention-based meta data cleanup in database
'database name'". The replication was in retrying mode and additionally the
following errors were reported
a) The subscription to publication 'XXXX' is invalid.
b) The process is running and is waiting for a response from one of the
backend connections'
During this process there we no issues in the remaining 49 databases,
replication was proceeding as usual.
In this database where we noticed the the above errors, the replication was
in sync in another 10 minutes, without any manual intervention.
What triggers to raise these error messages.
Please let us know what correction action we need to take for these error
messages
Thanks,
Soura.
Hi,
I got it from One article...
"The most common reason I can think of is that the query timed out. Sometime
retention based cleaup may need to cleanup a lot of rows and that can take
time. Rerunning the merge with a larger value for the querytimeout parameter
should fix this problem."
Hope this will help
Herbert
"SouRa" wrote:
> Hi,
> We are Merge replicating about 50 Production databases. We had planned to
> monitor the meta deta clean up error during replication.
> While we were monitoring the data to be updated during replication in one of
> these databases, noticed 4 records to be merge replicated ( 3 insert and 1
> update). At this moment we noticed the meta data clean up error. "The merge
> process could not perform retention-based meta data cleanup in database
> 'database name'". The replication was in retrying mode and additionally the
> following errors were reported
> a) The subscription to publication 'XXXX' is invalid.
> b) The process is running and is waiting for a response from one of the
> backend connections'
> During this process there we no issues in the remaining 49 databases,
> replication was proceeding as usual.
> In this database where we noticed the the above errors, the replication was
> in sync in another 10 minutes, without any manual intervention.
> What triggers to raise these error messages.
> Please let us know what correction action we need to take for these error
> messages
> Thanks,
> Soura.
meta data cleanup
I am running a couple of sql 2000 SP3a servers with merge and snapshot
replication. One server acting as publisher and distributor and the rest
subscribers. On one of the server I have got the error below and have tried
most of the suggestions by msdn. This server has not crashed ever before or
any hardware problems. It has been running for a couple of months and no
problems. This has not happened no any of the other servers. Any
suggestions would be greatly appreciated as the only resolution I have left
is to bring up a new instance, setup replication and see if this would
resolve the issue. Thanx
Server: EASTSRV3
DBMS: Microsoft SQL Server
Version: 08.00.0760
user name: dbo
API conformance: 2
SQL conformance: 1
transaction capable: 2
read only: N
identifier quote char: "
non_nullable_columns: 1
owner usage: 31
max table name len: 128
max column name len: 128
need long data len: Y
max columns in table: 1024
max columns in index: 16
max char literal len: 524288
max statement len: 524288
max row size: 524288
[4/14/2005 12:57:26 PM]EASTSRV3.ICASData: {call sp_MSgetversion }
Percent Complete: 2
Connecting to Subscriber 'EASTSRV3'
Percent Complete: 3
Retrieving publication information
Percent Complete: 4
Retrieving subscription information
Percent Complete: 4
The merge process is cleaning up meta data in database 'HO_Master'.
Percent Complete: 4
The merge process cleaned up 0 row(s) in MSmerge_genhistory, 0 row(s) in
MSmerge_contents, and 0 row(s) in MSmerge_tombstone.
Percent Complete: 4
The merge process is cleaning up meta data in database 'ICASData'.
The merge process could not perform retention-based meta data cleanup in
database 'ICASData'.
Percent Complete: 0
The merge process could not perform retention-based meta data cleanup in
database 'ICASData'.
Percent Complete: 0
Category:NULL
Source: Merge Replication Provider
Number: -2147199467
Message: The merge process could not perform retention-based meta data
cleanup in database 'ICASData'.
Percent Complete: 0
Category:COMMAND
Source: Failed Command
Number: 0
Message: {call sp_mergemetadataretentioncleanup(?, ?, ?)}
Percent Complete: 0
Category:SQLSERVER
Source: EASTSRV3
Number: 11
Message: General network error. Check your network documentation.
Message posted via http://www.sqlmonster.com
Jayanthi from MS posted this before:
"The most common reason I can think of is that the query timed out. Sometime
retention based cleaup may need to cleanup a lot of rows and that can take
time. Rerunning the merge with a larger value for the querytimeout parameter
should fix this problem."
Rgds,
Paul Ibison SQL Server MVP, www.replicationanswers.com/default.asp
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)
|||Hi Paul
Thanx for the reply.
I have played with the agent profiles aswell. From default to 1800. This
has been going on for like two days now no synch at all. I have tried to
reindex also as this was also one of the msdn suggestions.
Message posted via http://www.sqlmonster.com
Meta Data cleanup
The software developers that provided our SQL database program advised us to
put the subscription expiration on "never expire" because of their past
experience with customers who do not maintain their databases. Because of
this we now how massive meta data tables that need to be purged to increase
replkication performance (synchronization is extrmely slow). I have tried
setting the subscription retention to 14 days, but the amount of data to be
purged is huge and it interferes with the synchroniztion over night.
What I would like to do is use the stored procedure
sp_mergemetadataretentioncleanup to individually clean up the meta data
tables at each subscriber and the publisher. My problem is that I can not
find the parameters and correct syntax for this procedure anywhere. I have
seen the following:
sp_mergemetadataretentioncleanup (?,?,?)
but I don't know what to use to fill the question mark. I'm assuming I need
parameters since it seems doubtful the procedure is complete in itself (I'm
guessing a parameter is retention time and probably database?).
Thanks for the help.
Pete
these are output parameters.
declare @.num_genhistory_rows int , @.num_contents_rows int ,
@.num_tombstone_rows int
exec sp_mergemetadataretentioncleanup @.num_genhistory_rows output,
@.num_contents_rows output, @.num_tombstone_rows output
print @.num_genhistory_rows
print @.num_contents_rows
print @.num_tombstone_rows
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
"Pete" <Pete@.discussions.microsoft.com> wrote in message
news:C19A9C44-1298-4AC0-8088-57D4ED4DD799@.microsoft.com...
> I have a quick question that I could not find the answer for anywhere.
> The software developers that provided our SQL database program advised us
to
> put the subscription expiration on "never expire" because of their past
> experience with customers who do not maintain their databases. Because of
> this we now how massive meta data tables that need to be purged to
increase
> replkication performance (synchronization is extrmely slow). I have tried
> setting the subscription retention to 14 days, but the amount of data to
be
> purged is huge and it interferes with the synchroniztion over night.
> What I would like to do is use the stored procedure
> sp_mergemetadataretentioncleanup to individually clean up the meta data
> tables at each subscriber and the publisher. My problem is that I can not
> find the parameters and correct syntax for this procedure anywhere. I have
> seen the following:
> sp_mergemetadataretentioncleanup (?,?,?)
> but I don't know what to use to fill the question mark. I'm assuming I
need
> parameters since it seems doubtful the procedure is complete in itself
(I'm
> guessing a parameter is retention time and probably database?).
> Thanks for the help.
> Pete
Meta Data Catalogue
metadata records of the data we collect and create for my companies
clients.
I am thinking I want to do this using XML and SQL Server and have some
type of web-based browser to search for records.
Any suggestions on existing applications or resources that I could use?
ThanksHi
You may want to look at full text searching.
SQL 2005 has more XML functionality so check out the new features as it may
influence your plans.
John
"dharr" <darylh@.envisiontools.com> wrote in message
news:1123275095.936622.208720@.g44g2000cwa.googlegr oups.com...
>I am wanting to set up some kind of metadata catalogue to manage
> metadata records of the data we collect and create for my companies
> clients.
> I am thinking I want to do this using XML and SQL Server and have some
> type of web-based browser to search for records.
> Any suggestions on existing applications or resources that I could use?
>
> Thanks
Meta Data
Can somebody please help me out with retrieving Meta Data dynamically for a
Stored Procedure.
I know I can use SET FRMONLY ON to retrieve it - but this return a Header
info. What I want is a resultset containing that META Data that can be
inserted or used in a SELECT statement fo further manipulations.
TIA.
KOY
See my response in microsoft.public.sqlserver.programming
"Kayode Yusuf" <KayodeYusuf@.discussions.microsoft.com> wrote in message
news:92EF08FB-0675-4B90-9563-E29482987018@.microsoft.com...
> Greetings -
> Can somebody please help me out with retrieving Meta Data dynamically for
a
> Stored Procedure.
> I know I can use SET FRMONLY ON to retrieve it - but this return a Header
> info. What I want is a resultset containing that META Data that can be
> inserted or used in a SELECT statement fo further manipulations.
> TIA.
> KOY
|||For starters, Tanx for the post. WHat needs to be done is process the
ResultSet in TSQL as done through an API.
If you make call a Call to SQLServer throughan API with SET FMTON - it
executes
the procedure and returns a zero lenght resultselt - the META Data - you can
then through the API - iterate through th ResultSet Column names to find out
the META data for the procedure.
Essentially, I want to achive the Same in TSQL mode - I need to get the META
data of a Stored procedure and be able to identify the Columns returned by
the call using SET FMTONL directive.
TIA,
KOY
"Armando Prato" wrote:
> See my response in microsoft.public.sqlserver.programming
>
> "Kayode Yusuf" <KayodeYusuf@.discussions.microsoft.com> wrote in message
> news:92EF08FB-0675-4B90-9563-E29482987018@.microsoft.com...
> a
>
>
Meta Data
Hi,
I want to get meta data information for DTS packages, I don't see anything when I click on Meta Data Services Package. Also, I get an error when I click on Meta Data "An error occurred while trying to access the database information.
The msdb database could not be opened."
Need help.. Thanx
SQLBob
Hi, SQLBob,
I was having the same problem. On the assumption that you are running under Win2003 SP1 look for hot fix 912812 on the operating system. Remove it and Meta Data goes back to working.
Uncle Davy
|||You should post this question in the Integration Services forum: http://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=80&SiteID=1
|||Steven,
Are you saying that the original question belongs in the Integration area, or the response as a general post?
Sorry I'm new to this forum stuff.
Uncle Davy
|||I was actually referring to the original post.
I meant to say that DTS was renamed SQL Server Integration Services in SQL Server 2005. The SSIS crew that would know the answer to your DTS questions watch the SSIS forum, so if you post your DTS question there, you will probably get an answer faster.