Showing posts with label names. Show all posts
Showing posts with label names. Show all posts

Friday, March 30, 2012

putting names of objects to control-flow loop creating objects

please help newbie

I need to create a lot of objects the same type (let's say: schemas)
I wish to use paramerized block in loop to do so.
- how to put names of my objects to such control-flow?

belss you for helpfireball wrote:

Quote:

Originally Posted by

please help newbie
>
I need to create a lot of objects the same type (let's say: schemas)
I wish to use paramerized block in loop to do so.
- how to put names of my objects to such control-flow?
>
>
>
belss you for help


Firstly the obvious question: Why? Where are the names from these
objects coming from? If you can write a query to extract the names then
you could just use Query Analyzer or Management Studio to paste those
names into an editable script and then run the script directly. That
way there is no need for a loop.

If you must do it programmatically then you'll have to do something
with dynamic SQL. See:

http://sommarskog.se/dynamic_sql.html
Personally I'd say that if you have so many schemas that you need a
loop to create them then you definitely have too many schemas... or you
are using them in a highly unconventional manner.

--
David Portas, SQL Server MVP

Whenever possible please post enough code to reproduce your problem.
Including CREATE TABLE and INSERT statements usually helps.
State what version of SQL Server you are using and specify the content
of any error messages.

SQL Server Books Online:
http://msdn2.microsoft.com/library/...US,SQL.90).aspx
--|||Uzytkownik "David Portas" <REMOVE_BEFORE_REPLYING_dportas@.acm.orgnapisal w

Quote:

Originally Posted by

Where are the names from these objects coming from


from text file I got

Quote:

Originally Posted by

if you have so many schemas that you need a loop


first idea is to build scripts in engineer maneer (reusing code blocks - not
to copy them - so managing any changes is better)

second reason - I got my analysis data model in RaRose, which doesn't really
support automatization of creating data model. I use creating
quasi-sqlserver scripts, so I have object names and so. It's not really
large amount of objects (a few schemas, about 100 tables) - but it does
change any time.
Sorry if it sounds a bit werid :-) I'm a newbie

third idea was to create that way descriptions to my obiects (tables,
attributes) in a loop (having descriptions in xls file, for example)

All hints will be appeciated.

ps:

Quote:

Originally Posted by

then you definitely have too many schemas...


you are definitely right.

Quote:

Originally Posted by

are using them in a highly unconventional manner.


like, let's say - to make some perfiormance tests/statistics? (I really
don't do so :-))|||fireball (fireball@.onet.kropka.eu) writes:

Quote:

Originally Posted by

Uzytkownik "David Portas" <REMOVE_BEFORE_REPLYING_dportas@.acm.orgnapisal

Quote:

Originally Posted by

>Where are the names from these objects coming from


>
from text file I got


But text file is not SQL, but you have to transform it to SQL?

Doing this from SQL is not really fun. If you are on SQL 2005, you
could do this through the CLR, but you would still go through hoops.
Do this from a client application: Perl, VBscript or whatever your
favourite may be.

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx|||Uzytkownik "Erland Sommarskog" <esquel@.sommarskog.senapisal w wiadomosci

Quote:

Originally Posted by

But text file is not SQL


well, the point is to put it into script.sql any way which I will be able to
fetch it into my loop|||fireball (fireball@.onet.kropka.eu) writes:

Quote:

Originally Posted by

Uzytkownik "Erland Sommarskog" <esquel@.sommarskog.senapisal w wiadomosci
>

Quote:

Originally Posted by

>But text file is not SQL


>
well, the point is to put it into script.sql any way which I will be
able to fetch it into my loop


Without having seen your file, it's difficult to tell, but it does not sound
as if trying to read it from SQL is a very good idea. You probably much
better off doing this in a client language.

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx

Monday, March 26, 2012

push snapshot

Hi I'm trying to setup a push replication between 2 servers on different
networks. both machines can ping eachother using there machine names. I setup
the publication and the distributor on the push server and generate a
snapshot. I then run the distributor but it fails to connect to the
subscriber.
thanks for the help.
Mark
You need to ensure the @.@.servername of the subscriber is how the
publisher/distributor refer to it and vice versa. If you have to use IP
address, you can setup client side alias on the distributor that maps the IP
address to the @.@.servername of the subscriber
“This posting is provided "AS IS" with no warranties, and confers no rights.”
"ACDMark" wrote:

> Hi I'm trying to setup a push replication between 2 servers on different
> networks. both machines can ping eachother using there machine names. I setup
> the publication and the distributor on the push server and generate a
> snapshot. I then run the distributor but it fails to connect to the
> subscriber.
> thanks for the help.
> Mark
|||hi ,
be sure that your sql agent services is
running on a domain account
that has permission to your snapshot folder
and the database
thanks,
joey
"ACDMark" wrote:

> Hi I'm trying to setup a push replication between 2 servers on different
> networks. both machines can ping eachother using there machine names. I setup
> the publication and the distributor on the push server and generate a
> snapshot. I then run the distributor but it fails to connect to the
> subscriber.
> thanks for the help.
> Mark

Wednesday, March 21, 2012

Punctuation

I am trying to improve searching performance ... but I am storing data that
contains punctuation marks ... such as "E.L.O." and "R.E.M." (names of song
artists/groups).
Does this mean that I cannot use full-text searching at all for searching
for these artist names?
Is there a work-breaker that will allow the punctuation marks (fullstops in
particular), or is this a search issue rather than a word-breaker issue (i.e.
CONTAINS clause does not allow punctuation anyway)?
Wozza,
Can you post the full output of -- SELECT @.@.version -- where you have this
problem?
Have you removed all single letter from the language-specific noise word
files (under \FTDATA\SQLServer\Config where you have SQL Server installed)
and ran a Full Population after these modifications? If not, then please do
this. The default wordbreaker behavior for punctuation is dependent upon the
OS-supplied wordbreaker and the @.@.version info will provide that.
Thanks,
John
SQL Full Text Search Blog
http://spaces.msn.com/members/jtkane/
"Wozza" <Wozza@.discussions.microsoft.com> wrote in message
news:4FCD6297-AF76-4DE0-A43F-9FE2B667BAB2@.microsoft.com...
>I am trying to improve searching performance ... but I am storing data that
> contains punctuation marks ... such as "E.L.O." and "R.E.M." (names of
> song
> artists/groups).
> Does this mean that I cannot use full-text searching at all for searching
> for these artist names?
> Is there a work-breaker that will allow the punctuation marks (fullstops
> in
> particular), or is this a search issue rather than a word-breaker issue
> (i.e.
> CONTAINS clause does not allow punctuation anyway)?
>
|||Hi John,
select @.@.version produces ...
Microsoft SQL Server 2000 - 8.00.760 (Intel X86)
Dec 17 2002 14:22:05
Copyright (c) 1988-2003 Microsoft Corporation
Enterprise Edition on Windows NT 5.2 (Build 3790: Service Pack 1)
"John Kane" wrote:

> Wozza,
> Can you post the full output of -- SELECT @.@.version -- where you have this
> problem?
> Have you removed all single letter from the language-specific noise word
> files (under \FTDATA\SQLServer\Config where you have SQL Server installed)
> and ran a Full Population after these modifications? If not, then please do
> this. The default wordbreaker behavior for punctuation is dependent upon the
> OS-supplied wordbreaker and the @.@.version info will provide that.
> Thanks,
> John
> --
> SQL Full Text Search Blog
> http://spaces.msn.com/members/jtkane/
>
> "Wozza" <Wozza@.discussions.microsoft.com> wrote in message
> news:4FCD6297-AF76-4DE0-A43F-9FE2B667BAB2@.microsoft.com...
>
>
|||John,
I have also cleared the Noise.dat file (my index set up to use the Neutral
language).
If I have done this ... how do I serach for "r.e.m." for instance.
Warren
"John Kane" wrote:

> Wozza,
> Can you post the full output of -- SELECT @.@.version -- where you have this
> problem?
> Have you removed all single letter from the language-specific noise word
> files (under \FTDATA\SQLServer\Config where you have SQL Server installed)
> and ran a Full Population after these modifications? If not, then please do
> this. The default wordbreaker behavior for punctuation is dependent upon the
> OS-supplied wordbreaker and the @.@.version info will provide that.
> Thanks,
> John
> --
> SQL Full Text Search Blog
> http://spaces.msn.com/members/jtkane/
>
> "Wozza" <Wozza@.discussions.microsoft.com> wrote in message
> news:4FCD6297-AF76-4DE0-A43F-9FE2B667BAB2@.microsoft.com...
>
>
|||Wozza,
Ok, as you're using Win2003 (Windows NT 5.2) and therefore using the
langwrbk.dll wordbreaker (vs. Win2K's infosoft.dll), you can search for the
three single letters using CONTAINS, for example: Note, the use of double
quotes to contain all single letters:
SELECT * FROM MyTable where CONTAINS(*,'"R.E.M"')
If you continue to get an error, then add back a single space character in
the noise.dat file under \FTDATA where SQL Server 2000 is installed and run
a Full Population, then re-run the above query.
Thanks,
John
SQL Full Text Search Blog
http://spaces.msn.com/members/jtkane/
"Wozza" <Wozza@.discussions.microsoft.com> wrote in message
news:28143E7D-BA1E-47EE-9C86-CB95D4A428ED@.microsoft.com...[vbcol=seagreen]
> John,
> I have also cleared the Noise.dat file (my index set up to use the Neutral
> language).
> If I have done this ... how do I serach for "r.e.m." for instance.
> Warren
> "John Kane" wrote:
|||ok, I tried
SELECT * FROM Track where CONTAINS(*,'"R.E.M."')
and
SELECT * FROM Track where CONTAINS(*,'"R.E.M"')
and got the same error each time ...
Server: Msg 7619, Level 16, State 1, Line 1
Execution of a full-text operation failed. A clause of the query contained
only ignored words.
... so I added a space to Noise.dat and am repopulating.
"John Kane" wrote:

> Wozza,
> Ok, as you're using Win2003 (Windows NT 5.2) and therefore using the
> langwrbk.dll wordbreaker (vs. Win2K's infosoft.dll), you can search for the
> three single letters using CONTAINS, for example: Note, the use of double
> quotes to contain all single letters:
> SELECT * FROM MyTable where CONTAINS(*,'"R.E.M"')
> If you continue to get an error, then add back a single space character in
> the noise.dat file under \FTDATA where SQL Server 2000 is installed and run
> a Full Population, then re-run the above query.
> Thanks,
> John
> --
> SQL Full Text Search Blog
> http://spaces.msn.com/members/jtkane/
>
> "Wozza" <Wozza@.discussions.microsoft.com> wrote in message
> news:28143E7D-BA1E-47EE-9C86-CB95D4A428ED@.microsoft.com...
>
>