2012年3月19日星期一
Full text indexing parentheses and other special characters
The reason we need these characters indexed is because of searches like "4 (1 1/2)" where only records with the exact phrase should be returned. Currently records with 4 1/2 and 4 1 1/2 are being returned as well and we need to eliminate them.
Naresh
Naresh,
Please try the .fulltext newsgroup.
Dinesh
SQL Server MVP
--
SQL Server FAQ at
http://www.tkdinesh.com
"Naresh Rajpal" <rajpaln@.sullcrom.com> wrote in message
news:8F54AB5A-99BA-4E80-9DD4-16C48F21AF8B@.microsoft.com...
> How you tell the indexer (SQL 2K with WIN2K) to include () , /, - and all
other special characters while generating the index? These characters
aren't in the noise.eng file and I can't seem to figure out how to index
them.
> The reason we need these characters indexed is because of searches like "4
(1 1/2)" where only records with the exact phrase should be returned.
Currently records with 4 1/2 and 4 1 1/2 are being returned as well and we
need to eliminate them.
> Naresh
Full text indexing parentheses and other special characters
her special characters while generating the index? These characters aren't
in the noise.eng file and I can't seem to figure out how to index them.
The reason we need these characters indexed is because of searches like "4 (
1 1/2)" where only records with the exact phrase should be returned. Current
ly records with 4 1/2 and 4 1 1/2 are being returned as well and we need to
eliminate them.
NareshNaresh,
Please try the .fulltext newsgroup.
Dinesh
SQL Server MVP
--
--
SQL Server FAQ at
http://www.tkdinesh.com
"Naresh Rajpal" <rajpaln@.sullcrom.com> wrote in message
news:8F54AB5A-99BA-4E80-9DD4-16C48F21AF8B@.microsoft.com...
> How you tell the indexer (SQL 2K with WIN2K) to include () , /, - and all
other special characters while generating the index? These characters
aren't in the noise.eng file and I can't seem to figure out how to index
them.
> The reason we need these characters indexed is because of searches like "4
(1 1/2)" where only records with the exact phrase should be returned.
Currently records with 4 1/2 and 4 1 1/2 are being returned as well and we
need to eliminate them.
> Naresh
Full text indexing parentheses and other special characters
The reason we need these characters indexed is because of searches like "4 (1 1/2)" where only records with the exact phrase should be returned. Currently records with 4 1/2 and 4 1 1/2 are being returned as well and we need to eliminate them.
NareshNaresh,
Please try the .fulltext newsgroup.
--
Dinesh
SQL Server MVP
--
--
SQL Server FAQ at
http://www.tkdinesh.com
"Naresh Rajpal" <rajpaln@.sullcrom.com> wrote in message
news:8F54AB5A-99BA-4E80-9DD4-16C48F21AF8B@.microsoft.com...
> How you tell the indexer (SQL 2K with WIN2K) to include () , /, - and all
other special characters while generating the index? These characters
aren't in the noise.eng file and I can't seem to figure out how to index
them.
> The reason we need these characters indexed is because of searches like "4
(1 1/2)" where only records with the exact phrase should be returned.
Currently records with 4 1/2 and 4 1 1/2 are being returned as well and we
need to eliminate them.
> Naresh
2012年3月11日星期日
Full Text index on a view.
requirements for the CREATE INDEX on a view are:
"The view cannot include text, ntext, or image columns, even if they
are not referenced in the CREATE INDEX statement".
But to create a Full Text index on the text column referenced in the
view I need a unique clustered index that I can't create because the
view references a text column.
Vicious circles.
It must be on an indexed view. Here is an example of how to create one.
CREATE DATABASE CODE_SAMPLE4
GO
USE CODE_SAMPLE4
GO
CREATE TABLE CODE_SAMPLE4
(PK INT NOT NULL IDENTITY CONSTRAINT PRIMARYKEY PRIMARY KEY,
CHARCOL CHAR(20),
INTCOL INT DEFAULT 1)
GO
DECLARE @.INT INT
SET @.INT=1
WHILE @.INT<=100
BEGIN
INSERT INTO CODE_SAMPLE4 (CHARCOL) VALUES('TEST')
SELECT @.INT=@.INT+1
END
SET @.INT=0
WHILE @.INT<=100
BEGIN
INSERT INTO CODE_SAMPLE4 (CHARCOL,INTCOL) VALUES('TEST',@.INT+1)
SELECT @.INT=@.INT+1
END
GO
CREATE FULLTEXT CATALOG TEST AS DEFAULT
GO
CREATE FULLTEXT INDEX ON CODE_SAMPLE4 (CHARCOL) KEY INDEX PRIMARYKEY
GO
--below query erroneously does not return any rows
SELECT * FROM CODE_SAMPLE4 AS CS4 JOIN
CONTAINSTABLE (CODE_SAMPLE4,CHARCOL,'TEST',100)
AS FT ON FT.[KEY]=CS4.PK
where intcol>10
ORDER BY RANK DESC
GO
CREATE VIEW CODE_SAMPLE4_VIEW WITH SCHEMABINDING
AS
SELECT PK, CHARCOL, INTCOL FROM DBO.CODE_SAMPLE4 WHERE INTCOL>10
GO
CREATE UNIQUE CLUSTERED INDEX CODE_SAMPLE4_VIEW_INDEX ON
CODE_SAMPLE4_VIEW(PK)
GO
CREATE FULLTEXT INDEX ON CODE_SAMPLE4_VIEW (CHARCOL) KEY INDEX
CODE_SAMPLE4_VIEW_INDEX
GO
--below query returns all rows
SELECT * FROM CODE_SAMPLE4_VIEW AS CS4 JOIN CONTAINSTABLE
(CODE_SAMPLE4_VIEW,CHARCOL,'TEST',100)
AS FT ON FT.[KEY]=CS4.PK
where intcol>10
ORDER BY RANK DESC
GO
SELECT * FROM CODE_SAMPLE4_VIEW WHERE CONTAINS(*,'TEST')
GO
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
"Lee" <sqldba@.comcast.net> wrote in message
news:1182543834.843179.270800@.x35g2000prf.googlegr oups.com...
> Am I missing something here? SQL Server 2005 BOL states that one the
> requirements for the CREATE INDEX on a view are:
> "The view cannot include text, ntext, or image columns, even if they
> are not referenced in the CREATE INDEX statement".
> But to create a Full Text index on the text column referenced in the
> view I need a unique clustered index that I can't create because the
> view references a text column.
> Vicious circles.
>
|||Hilary,
That makes perfect sence but change the CHARCOL CHAR(20) to a data
type of Text and it doesn't workr. All is fine untill you CREATE
UNIQUE CLUSTERED INDEX CODE_SAMPLE4_VIEW_INDEX ON
CODE_SAMPLE4_VIEW(PK)
then it errors with:
Server: Msg 1942, Level 16, State 1, Line 1
Index cannot be created on view 'CODE_SAMPLE4_VIEW' because the view
contains text, ntext or image columns.
Lee.
|||Text is deprecated in SQL 2005. Change it to varchar(max) and it works.
CREATE DATABASE CODE_SAMPLE4
GO
USE CODE_SAMPLE4
GO
CREATE TABLE CODE_SAMPLE4
(PK INT NOT NULL IDENTITY CONSTRAINT PRIMARYKEY PRIMARY KEY,
CHARCOL varCHAR(max),
INTCOL INT DEFAULT 1)
GO
DECLARE @.INT INT
SET @.INT=1
WHILE @.INT<=100
BEGIN
INSERT INTO CODE_SAMPLE4 (CHARCOL) VALUES('TEST')
SELECT @.INT=@.INT+1
END
SET @.INT=0
WHILE @.INT<=100
BEGIN
INSERT INTO CODE_SAMPLE4 (CHARCOL,INTCOL) VALUES('TEST',@.INT+1)
SELECT @.INT=@.INT+1
END
GO
CREATE FULLTEXT CATALOG TEST AS DEFAULT
GO
CREATE FULLTEXT INDEX ON CODE_SAMPLE4 (CHARCOL) KEY INDEX PRIMARYKEY
GO
--below query erroneously does not return any rows
SELECT * FROM CODE_SAMPLE4 AS CS4 JOIN
CONTAINSTABLE (CODE_SAMPLE4,CHARCOL,'TEST',100)
AS FT ON FT.[KEY]=CS4.PK
where intcol>10
ORDER BY RANK DESC
GO
CREATE VIEW CODE_SAMPLE4_VIEW WITH SCHEMABINDING
AS
SELECT PK, CHARCOL, INTCOL FROM DBO.CODE_SAMPLE4 WHERE INTCOL>10
GO
CREATE UNIQUE CLUSTERED INDEX CODE_SAMPLE4_VIEW_INDEX ON
CODE_SAMPLE4_VIEW(PK)
GO
CREATE FULLTEXT INDEX ON CODE_SAMPLE4_VIEW (CHARCOL) KEY INDEX
CODE_SAMPLE4_VIEW_INDEX
GO
--below query returns all rows
SELECT * FROM CODE_SAMPLE4_VIEW AS CS4 JOIN CONTAINSTABLE
(CODE_SAMPLE4_VIEW,CHARCOL,'TEST',100)
AS FT ON FT.[KEY]=CS4.PK
where intcol>10
ORDER BY RANK DESC
GO
SELECT * FROM CODE_SAMPLE4_VIEW WHERE CONTAINS(*,'TEST')
GO
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
"Lee" <sqldba@.comcast.net> wrote in message
news:1182777066.943787.176260@.n60g2000hse.googlegr oups.com...
> Hilary,
> That makes perfect sence but change the CHARCOL CHAR(20) to a data
> type of Text and it doesn't workr. All is fine untill you CREATE
> UNIQUE CLUSTERED INDEX CODE_SAMPLE4_VIEW_INDEX ON
> CODE_SAMPLE4_VIEW(PK)
> then it errors with:
> Server: Msg 1942, Level 16, State 1, Line 1
> Index cannot be created on view 'CODE_SAMPLE4_VIEW' because the view
> contains text, ntext or image columns.
> Lee.
>
|||How would you handle the same situation in SQL 2000 with a text column
that would need to remain a Text column?
|||I thought we were talking SQL 2005. In SQL 2000 you can't full-text index a
view.
Am I missing something here?
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
"Lee" <sqldba@.comcast.net> wrote in message
news:1182785285.821430.47320@.u2g2000hsc.googlegrou ps.com...
> How would you handle the same situation in SQL 2000 with a text column
> that would need to remain a Text column?
>
|||No, your okay. I had ask about SQL 2005 and then SQL 2000. As for not
being able to ful-text a view. Guess I should have cought that.
2012年3月7日星期三
full server backup
the current server , DTS packages and everything else in one single backup
file?No. The backup restore mechanism works at database level, not server level.
--
HTH,
Vyas, MVP (SQL Server)
SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
"Oren101" <Oren101@.discussions.microsoft.com> wrote in message
news:AAA53155-0EED-47FA-8CCD-08BF0DF3A3E9@.microsoft.com...
is that possible to make a full server backup which include all databases in
the current server , DTS packages and everything else in one single backup
file?|||Hi,Vyas
He can use undocumented stored procedure to do that
EXEC sp_MSforeachdb
'IF N''?'' NOT IN(''model'' ,''tempdb'', ''distribution'', ''Northwind'',
''pubs'')
BEGIN
DECLARE @.sql varchar(1000);
set @.sql = ''BACKUP DATABASE '' + (''?'') + '' TO DISK =''''D:\MSSQL2000\MSSQL\BACKUP\'' + (''?'') + ''.bak'''' WITH INIT''
EXEC (@.sql)
END'
BTW. What is about .NET examples on your site that you have promised us some
time ago :-)
"Narayana Vyas Kondreddi" <answer_me@.hotmail.com> wrote in message
news:ubAFNs2kFHA.2472@.TK2MSFTNGP15.phx.gbl...
> No. The backup restore mechanism works at database level, not server
> level.
> --
> HTH,
> Vyas, MVP (SQL Server)
> SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
>
> "Oren101" <Oren101@.discussions.microsoft.com> wrote in message
> news:AAA53155-0EED-47FA-8CCD-08BF0DF3A3E9@.microsoft.com...
> is that possible to make a full server backup which include all databases
> in
> the current server , DTS packages and everything else in one single backup
> file?
>|||Uri, your script is still creating multiple backup files, which is not what
the OP wanted. Anyway, you could still write multiple database backups to a
single backup file though.
Anyway, I just wanted to point out that you cannot run a single command, and
create a single backup with everything that is there on the server.
Regarding the .Net code samples, hopefully before end of this year :-)
--
HTH,
Vyas, MVP (SQL Server)
SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
"Uri Dimant" <urid@.iscar.co.il> wrote in message
news:uqh7DY3kFHA.3256@.TK2MSFTNGP12.phx.gbl...
Hi,Vyas
He can use undocumented stored procedure to do that
EXEC sp_MSforeachdb
'IF N''?'' NOT IN(''model'' ,''tempdb'', ''distribution'', ''Northwind'',
''pubs'')
BEGIN
DECLARE @.sql varchar(1000);
set @.sql = ''BACKUP DATABASE '' + (''?'') + '' TO DISK =''''D:\MSSQL2000\MSSQL\BACKUP\'' + (''?'') + ''.bak'''' WITH INIT''
EXEC (@.sql)
END'
BTW. What is about .NET examples on your site that you have promised us some
time ago :-)
"Narayana Vyas Kondreddi" <answer_me@.hotmail.com> wrote in message
news:ubAFNs2kFHA.2472@.TK2MSFTNGP15.phx.gbl...
> No. The backup restore mechanism works at database level, not server
> level.
> --
> HTH,
> Vyas, MVP (SQL Server)
> SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
>
> "Oren101" <Oren101@.discussions.microsoft.com> wrote in message
> news:AAA53155-0EED-47FA-8CCD-08BF0DF3A3E9@.microsoft.com...
> is that possible to make a full server backup which include all databases
> in
> the current server , DTS packages and everything else in one single backup
> file?
>|||is that code will backup the DTS packeges too?
Regards.
OreN101
"Uri Dimant" wrote:
> Hi,Vyas
> He can use undocumented stored procedure to do that
>
> EXEC sp_MSforeachdb
> 'IF N''?'' NOT IN(''model'' ,''tempdb'', ''distribution'', ''Northwind'',
> ''pubs'')
> BEGIN
> DECLARE @.sql varchar(1000);
> set @.sql = ''BACKUP DATABASE '' + (''?'') + '' TO DISK => ''''D:\MSSQL2000\MSSQL\BACKUP\'' + (''?'') + ''.bak'''' WITH INIT''
> EXEC (@.sql)
> END'
> BTW. What is about .NET examples on your site that you have promised us some
> time ago :-)
>
> "Narayana Vyas Kondreddi" <answer_me@.hotmail.com> wrote in message
> news:ubAFNs2kFHA.2472@.TK2MSFTNGP15.phx.gbl...
> > No. The backup restore mechanism works at database level, not server
> > level.
> > --
> > HTH,
> > Vyas, MVP (SQL Server)
> > SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
> >
> >
> > "Oren101" <Oren101@.discussions.microsoft.com> wrote in message
> > news:AAA53155-0EED-47FA-8CCD-08BF0DF3A3E9@.microsoft.com...
> > is that possible to make a full server backup which include all databases
> > in
> > the current server , DTS packages and everything else in one single backup
> > file?
> >
> >
>
>|||Yes, if your DTS packages are stored in SQL Server.
--
HTH,
Vyas, MVP (SQL Server)
SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
"Oren101" <Oren101@.discussions.microsoft.com> wrote in message
news:0937D676-861F-4FFB-9174-156131BFC4E8@.microsoft.com...
is that code will backup the DTS packeges too?
Regards.
OreN101
"Uri Dimant" wrote:
> Hi,Vyas
> He can use undocumented stored procedure to do that
>
> EXEC sp_MSforeachdb
> 'IF N''?'' NOT IN(''model'' ,''tempdb'', ''distribution'', ''Northwind'',
> ''pubs'')
> BEGIN
> DECLARE @.sql varchar(1000);
> set @.sql = ''BACKUP DATABASE '' + (''?'') + '' TO DISK => ''''D:\MSSQL2000\MSSQL\BACKUP\'' + (''?'') + ''.bak'''' WITH INIT''
> EXEC (@.sql)
> END'
> BTW. What is about .NET examples on your site that you have promised us
some
> time ago :-)
>
> "Narayana Vyas Kondreddi" <answer_me@.hotmail.com> wrote in message
> news:ubAFNs2kFHA.2472@.TK2MSFTNGP15.phx.gbl...
> > No. The backup restore mechanism works at database level, not server
> > level.
> > --
> > HTH,
> > Vyas, MVP (SQL Server)
> > SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
> >
> >
> > "Oren101" <Oren101@.discussions.microsoft.com> wrote in message
> > news:AAA53155-0EED-47FA-8CCD-08BF0DF3A3E9@.microsoft.com...
> > is that possible to make a full server backup which include all
databases
> > in
> > the current server , DTS packages and everything else in one single
backup
> > file?
> >
> >
>
>|||how come? the script above make backups to the databases in the sql server
instance ,not to any other objects(like DTS)?
"Oren101" wrote:
> is that code will backup the DTS packeges too?
> Regards.
> OreN101
> "Uri Dimant" wrote:
> > Hi,Vyas
> > He can use undocumented stored procedure to do that
> >
> >
> > EXEC sp_MSforeachdb
> > 'IF N''?'' NOT IN(''model'' ,''tempdb'', ''distribution'', ''Northwind'',
> > ''pubs'')
> > BEGIN
> > DECLARE @.sql varchar(1000);
> > set @.sql = ''BACKUP DATABASE '' + (''?'') + '' TO DISK => > ''''D:\MSSQL2000\MSSQL\BACKUP\'' + (''?'') + ''.bak'''' WITH INIT''
> > EXEC (@.sql)
> > END'
> >
> > BTW. What is about .NET examples on your site that you have promised us some
> > time ago :-)
> >
> >
> >
> > "Narayana Vyas Kondreddi" <answer_me@.hotmail.com> wrote in message
> > news:ubAFNs2kFHA.2472@.TK2MSFTNGP15.phx.gbl...
> > > No. The backup restore mechanism works at database level, not server
> > > level.
> > > --
> > > HTH,
> > > Vyas, MVP (SQL Server)
> > > SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
> > >
> > >
> > > "Oren101" <Oren101@.discussions.microsoft.com> wrote in message
> > > news:AAA53155-0EED-47FA-8CCD-08BF0DF3A3E9@.microsoft.com...
> > > is that possible to make a full server backup which include all databases
> > > in
> > > the current server , DTS packages and everything else in one single backup
> > > file?
> > >
> > >
> >
> >
> >|||I agree - how does this grab the DTS packages? The DTS packages are
saved to the server - not to a database. The backup command only
references a specific database.|||If you save DTS packages to SQL Server, then they get stored in the msdb
database.
--
HTH,
Vyas, MVP (SQL Server)
SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
<unc27932@.yahoo.com> wrote in message
news:1122560371.634115.202710@.z14g2000cwz.googlegroups.com...
I agree - how does this grab the DTS packages? The DTS packages are
saved to the server - not to a database. The backup command only
references a specific database.|||Well, now there's something I didn't realize. These newsgroups are
helpful aren't they. :)|||where exactly can i c it un the msdb?
"Narayana Vyas Kondreddi" wrote:
> If you save DTS packages to SQL Server, then they get stored in the msdb
> database.
> --
> HTH,
> Vyas, MVP (SQL Server)
> SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
>
> <unc27932@.yahoo.com> wrote in message
> news:1122560371.634115.202710@.z14g2000cwz.googlegroups.com...
> I agree - how does this grab the DTS packages? The DTS packages are
> saved to the server - not to a database. The backup command only
> references a specific database.
>
>|||sysdtspackages
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Oren101" <Oren101@.discussions.microsoft.com> wrote in message
news:7C78600B-9414-48A8-9B9B-2E8312D9A223@.microsoft.com...
> where exactly can i c it un the msdb?
> "Narayana Vyas Kondreddi" wrote:
>> If you save DTS packages to SQL Server, then they get stored in the msdb
>> database.
>> --
>> HTH,
>> Vyas, MVP (SQL Server)
>> SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
>>
>> <unc27932@.yahoo.com> wrote in message
>> news:1122560371.634115.202710@.z14g2000cwz.googlegroups.com...
>> I agree - how does this grab the DTS packages? The DTS packages are
>> saved to the server - not to a database. The backup command only
>> references a specific database.
>>|||sysdtspackages
--
HTH,
Vyas, MVP (SQL Server)
SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
"Oren101" <Oren101@.discussions.microsoft.com> wrote in message
news:7C78600B-9414-48A8-9B9B-2E8312D9A223@.microsoft.com...
where exactly can i c it un the msdb?
"Narayana Vyas Kondreddi" wrote:
> If you save DTS packages to SQL Server, then they get stored in the msdb
> database.
> --
> HTH,
> Vyas, MVP (SQL Server)
> SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
>
> <unc27932@.yahoo.com> wrote in message
> news:1122560371.634115.202710@.z14g2000cwz.googlegroups.com...
> I agree - how does this grab the DTS packages? The DTS packages are
> saved to the server - not to a database. The backup command only
> references a specific database.
>
>|||The closest thing to that would be to stop the server and to zip all the
database files (mdf and ldf) to 1 archive.
--
Cheers,
Wojtek
"Oren101" <Oren101@.discussions.microsoft.com> wrote in message
news:AAA53155-0EED-47FA-8CCD-08BF0DF3A3E9@.microsoft.com...
> is that possible to make a full server backup which include all databases
> in
> the current server , DTS packages and everything else in one single backup
> file?|||It would be much easier and supported to just do regular database backups of each database, all
going to the same backup file.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Wojtek Garwol" <garwol@.usunto.poczta.fm> wrote in message news:dcb893$r69$1@.nemesis.news.tpi.pl...
> The closest thing to that would be to stop the server and to zip all the database files (mdf and
> ldf) to 1 archive.
> --
> Cheers,
> Wojtek
>
> "Oren101" <Oren101@.discussions.microsoft.com> wrote in message
> news:AAA53155-0EED-47FA-8CCD-08BF0DF3A3E9@.microsoft.com...
>> is that possible to make a full server backup which include all databases in
>> the current server , DTS packages and everything else in one single backup
>> file?
>
full server backup
the current server , DTS packages and everything else in one single backup
file?No. The backup restore mechanism works at database level, not server level.
--
HTH,
Vyas, MVP (SQL Server)
SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
"Oren101" <Oren101@.discussions.microsoft.com> wrote in message
news:AAA53155-0EED-47FA-8CCD-08BF0DF3A3E9@.microsoft.com...
is that possible to make a full server backup which include all databases in
the current server , DTS packages and everything else in one single backup
file?|||Hi,Vyas
He can use undocumented stored procedure to do that
EXEC sp_MSforeachdb
'IF N''?'' NOT IN(''model'' ,''tempdb'', ''distribution'', ''Northwind'',
''pubs'')
BEGIN
DECLARE @.sql varchar(1000);
set @.sql = ''BACKUP DATABASE '' + (''?'') + '' TO DISK =
''''D:\MSSQL2000\MSSQL\BACKUP'' + (''?'') + ''.bak'''' WITH INIT''
EXEC (@.sql)
END'
BTW. What is about .NET examples on your site that you have promised us some
time ago :-)
"Narayana Vyas Kondreddi" <answer_me@.hotmail.com> wrote in message
news:ubAFNs2kFHA.2472@.TK2MSFTNGP15.phx.gbl...
> No. The backup restore mechanism works at database level, not server
> level.
> --
> HTH,
> Vyas, MVP (SQL Server)
> SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
>
> "Oren101" <Oren101@.discussions.microsoft.com> wrote in message
> news:AAA53155-0EED-47FA-8CCD-08BF0DF3A3E9@.microsoft.com...
> is that possible to make a full server backup which include all databases
> in
> the current server , DTS packages and everything else in one single backup
> file?
>|||Uri, your script is still creating multiple backup files, which is not what
the OP wanted. Anyway, you could still write multiple database backups to a
single backup file though.
Anyway, I just wanted to point out that you cannot run a single command, and
create a single backup with everything that is there on the server.
Regarding the .Net code samples, hopefully before end of this year :-)
--
HTH,
Vyas, MVP (SQL Server)
SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
"Uri Dimant" <urid@.iscar.co.il> wrote in message
news:uqh7DY3kFHA.3256@.TK2MSFTNGP12.phx.gbl...
Hi,Vyas
He can use undocumented stored procedure to do that
EXEC sp_MSforeachdb
'IF N''?'' NOT IN(''model'' ,''tempdb'', ''distribution'', ''Northwind'',
''pubs'')
BEGIN
DECLARE @.sql varchar(1000);
set @.sql = ''BACKUP DATABASE '' + (''?'') + '' TO DISK =
''''D:\MSSQL2000\MSSQL\BACKUP'' + (''?'') + ''.bak'''' WITH INIT''
EXEC (@.sql)
END'
BTW. What is about .NET examples on your site that you have promised us some
time ago :-)
"Narayana Vyas Kondreddi" <answer_me@.hotmail.com> wrote in message
news:ubAFNs2kFHA.2472@.TK2MSFTNGP15.phx.gbl...
> No. The backup restore mechanism works at database level, not server
> level.
> --
> HTH,
> Vyas, MVP (SQL Server)
> SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
>
> "Oren101" <Oren101@.discussions.microsoft.com> wrote in message
> news:AAA53155-0EED-47FA-8CCD-08BF0DF3A3E9@.microsoft.com...
> is that possible to make a full server backup which include all databases
> in
> the current server , DTS packages and everything else in one single backup
> file?
>|||is that code will backup the DTS packeges too?
Regards.
OreN101
"Uri Dimant" wrote:
> Hi,Vyas
> He can use undocumented stored procedure to do that
>
> EXEC sp_MSforeachdb
> 'IF N''?'' NOT IN(''model'' ,''tempdb'', ''distribution'', ''Northwind'',
> ''pubs'')
> BEGIN
> DECLARE @.sql varchar(1000);
> set @.sql = ''BACKUP DATABASE '' + (''?'') + '' TO DISK =
> ''''D:\MSSQL2000\MSSQL\BACKUP'' + (''?'') + ''.bak'''' WITH INIT''
> EXEC (@.sql)
> END'
> BTW. What is about .NET examples on your site that you have promised us so
me
> time ago :-)
>
> "Narayana Vyas Kondreddi" <answer_me@.hotmail.com> wrote in message
> news:ubAFNs2kFHA.2472@.TK2MSFTNGP15.phx.gbl...
>
>|||Yes, if your DTS packages are stored in SQL Server.
--
HTH,
Vyas, MVP (SQL Server)
SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
"Oren101" <Oren101@.discussions.microsoft.com> wrote in message
news:0937D676-861F-4FFB-9174-156131BFC4E8@.microsoft.com...
is that code will backup the DTS packeges too?
Regards.
OreN101
"Uri Dimant" wrote:
> Hi,Vyas
> He can use undocumented stored procedure to do that
>
> EXEC sp_MSforeachdb
> 'IF N''?'' NOT IN(''model'' ,''tempdb'', ''distribution'', ''Northwind'',
> ''pubs'')
> BEGIN
> DECLARE @.sql varchar(1000);
> set @.sql = ''BACKUP DATABASE '' + (''?'') + '' TO DISK =
> ''''D:\MSSQL2000\MSSQL\BACKUP'' + (''?'') + ''.bak'''' WITH INIT''
> EXEC (@.sql)
> END'
> BTW. What is about .NET examples on your site that you have promised us
some
> time ago :-)
>
> "Narayana Vyas Kondreddi" <answer_me@.hotmail.com> wrote in message
> news:ubAFNs2kFHA.2472@.TK2MSFTNGP15.phx.gbl...
databases[vbcol=seagreen]
backup[vbcol=seagreen]
>
>|||how come? the script above make backups to the databases in the sql server
instance ,not to any other objects(like DTS)?
"Oren101" wrote:
[vbcol=seagreen]
> is that code will backup the DTS packeges too?
> Regards.
> OreN101
> "Uri Dimant" wrote:
>|||where exactly can i c it un the msdb?
"Narayana Vyas Kondreddi" wrote:
> If you save DTS packages to SQL Server, then they get stored in the msdb
> database.
> --
> HTH,
> Vyas, MVP (SQL Server)
> SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
>
> <unc27932@.yahoo.com> wrote in message
> news:1122560371.634115.202710@.z14g2000cwz.googlegroups.com...
> I agree - how does this grab the DTS packages? The DTS packages are
> saved to the server - not to a database. The backup command only
> references a specific database.
>
>|||sysdtspackages
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Oren101" <Oren101@.discussions.microsoft.com> wrote in message
news:7C78600B-9414-48A8-9B9B-2E8312D9A223@.microsoft.com...[vbcol=seagreen]
> where exactly can i c it un the msdb?
> "Narayana Vyas Kondreddi" wrote:
>|||sysdtspackages
--
HTH,
Vyas, MVP (SQL Server)
SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
"Oren101" <Oren101@.discussions.microsoft.com> wrote in message
news:7C78600B-9414-48A8-9B9B-2E8312D9A223@.microsoft.com...
where exactly can i c it un the msdb?
"Narayana Vyas Kondreddi" wrote:
> If you save DTS packages to SQL Server, then they get stored in the msdb
> database.
> --
> HTH,
> Vyas, MVP (SQL Server)
> SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
>
> <unc27932@.yahoo.com> wrote in message
> news:1122560371.634115.202710@.z14g2000cwz.googlegroups.com...
> I agree - how does this grab the DTS packages? The DTS packages are
> saved to the server - not to a database. The backup command only
> references a specific database.
>
>
full server backup
the current server , DTS packages and everything else in one single backup
file?
No. The backup restore mechanism works at database level, not server level.
HTH,
Vyas, MVP (SQL Server)
SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
"Oren101" <Oren101@.discussions.microsoft.com> wrote in message
news:AAA53155-0EED-47FA-8CCD-08BF0DF3A3E9@.microsoft.com...
is that possible to make a full server backup which include all databases in
the current server , DTS packages and everything else in one single backup
file?
|||Hi,Vyas
He can use undocumented stored procedure to do that
EXEC sp_MSforeachdb
'IF N''?'' NOT IN(''model'' ,''tempdb'', ''distribution'', ''Northwind'',
''pubs'')
BEGIN
DECLARE @.sql varchar(1000);
set @.sql = ''BACKUP DATABASE '' + (''?'') + '' TO DISK =
''''D:\MSSQL2000\MSSQL\BACKUP\'' + (''?'') + ''.bak'''' WITH INIT''
EXEC (@.sql)
END'
BTW. What is about .NET examples on your site that you have promised us some
time ago :-)
"Narayana Vyas Kondreddi" <answer_me@.hotmail.com> wrote in message
news:ubAFNs2kFHA.2472@.TK2MSFTNGP15.phx.gbl...
> No. The backup restore mechanism works at database level, not server
> level.
> --
> HTH,
> Vyas, MVP (SQL Server)
> SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
>
> "Oren101" <Oren101@.discussions.microsoft.com> wrote in message
> news:AAA53155-0EED-47FA-8CCD-08BF0DF3A3E9@.microsoft.com...
> is that possible to make a full server backup which include all databases
> in
> the current server , DTS packages and everything else in one single backup
> file?
>
|||Uri, your script is still creating multiple backup files, which is not what
the OP wanted. Anyway, you could still write multiple database backups to a
single backup file though.
Anyway, I just wanted to point out that you cannot run a single command, and
create a single backup with everything that is there on the server.
Regarding the .Net code samples, hopefully before end of this year :-)
HTH,
Vyas, MVP (SQL Server)
SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
"Uri Dimant" <urid@.iscar.co.il> wrote in message
news:uqh7DY3kFHA.3256@.TK2MSFTNGP12.phx.gbl...
Hi,Vyas
He can use undocumented stored procedure to do that
EXEC sp_MSforeachdb
'IF N''?'' NOT IN(''model'' ,''tempdb'', ''distribution'', ''Northwind'',
''pubs'')
BEGIN
DECLARE @.sql varchar(1000);
set @.sql = ''BACKUP DATABASE '' + (''?'') + '' TO DISK =
''''D:\MSSQL2000\MSSQL\BACKUP\'' + (''?'') + ''.bak'''' WITH INIT''
EXEC (@.sql)
END'
BTW. What is about .NET examples on your site that you have promised us some
time ago :-)
"Narayana Vyas Kondreddi" <answer_me@.hotmail.com> wrote in message
news:ubAFNs2kFHA.2472@.TK2MSFTNGP15.phx.gbl...
> No. The backup restore mechanism works at database level, not server
> level.
> --
> HTH,
> Vyas, MVP (SQL Server)
> SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
>
> "Oren101" <Oren101@.discussions.microsoft.com> wrote in message
> news:AAA53155-0EED-47FA-8CCD-08BF0DF3A3E9@.microsoft.com...
> is that possible to make a full server backup which include all databases
> in
> the current server , DTS packages and everything else in one single backup
> file?
>
|||is that code will backup the DTS packeges too?
Regards.
OreN101
"Uri Dimant" wrote:
> Hi,Vyas
> He can use undocumented stored procedure to do that
>
> EXEC sp_MSforeachdb
> 'IF N''?'' NOT IN(''model'' ,''tempdb'', ''distribution'', ''Northwind'',
> ''pubs'')
> BEGIN
> DECLARE @.sql varchar(1000);
> set @.sql = ''BACKUP DATABASE '' + (''?'') + '' TO DISK =
> ''''D:\MSSQL2000\MSSQL\BACKUP\'' + (''?'') + ''.bak'''' WITH INIT''
> EXEC (@.sql)
> END'
> BTW. What is about .NET examples on your site that you have promised us some
> time ago :-)
>
> "Narayana Vyas Kondreddi" <answer_me@.hotmail.com> wrote in message
> news:ubAFNs2kFHA.2472@.TK2MSFTNGP15.phx.gbl...
>
>
|||Yes, if your DTS packages are stored in SQL Server.
HTH,
Vyas, MVP (SQL Server)
SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
"Oren101" <Oren101@.discussions.microsoft.com> wrote in message
news:0937D676-861F-4FFB-9174-156131BFC4E8@.microsoft.com...
is that code will backup the DTS packeges too?
Regards.
OreN101
"Uri Dimant" wrote:
> Hi,Vyas
> He can use undocumented stored procedure to do that
>
> EXEC sp_MSforeachdb
> 'IF N''?'' NOT IN(''model'' ,''tempdb'', ''distribution'', ''Northwind'',
> ''pubs'')
> BEGIN
> DECLARE @.sql varchar(1000);
> set @.sql = ''BACKUP DATABASE '' + (''?'') + '' TO DISK =
> ''''D:\MSSQL2000\MSSQL\BACKUP\'' + (''?'') + ''.bak'''' WITH INIT''
> EXEC (@.sql)
> END'
> BTW. What is about .NET examples on your site that you have promised us
some[vbcol=seagreen]
> time ago :-)
>
> "Narayana Vyas Kondreddi" <answer_me@.hotmail.com> wrote in message
> news:ubAFNs2kFHA.2472@.TK2MSFTNGP15.phx.gbl...
databases[vbcol=seagreen]
backup
>
>
|||how come? the script above make backups to the databases in the sql server
instance ,not to any other objects(like DTS)?
"Oren101" wrote:
[vbcol=seagreen]
> is that code will backup the DTS packeges too?
> Regards.
> OreN101
> "Uri Dimant" wrote:
|||I agree - how does this grab the DTS packages? The DTS packages are
saved to the server - not to a database. The backup command only
references a specific database.
|||If you save DTS packages to SQL Server, then they get stored in the msdb
database.
HTH,
Vyas, MVP (SQL Server)
SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
<unc27932@.yahoo.com> wrote in message
news:1122560371.634115.202710@.z14g2000cwz.googlegr oups.com...
I agree - how does this grab the DTS packages? The DTS packages are
saved to the server - not to a database. The backup command only
references a specific database.
|||Well, now there's something I didn't realize. These newsgroups are
helpful aren't they.
2012年2月19日星期日
FTS indexable table column
Hi, how can I programatically identify if table columns are eligible to include in a FTS catalog index?
I can do this:
SELECT COLUMNPROPERTY (object_id('Person.Address') , 'AddressID', 'IsIndexable' )
but what I'd like to do is:
SELECT COLUMNPROPERTY (object_id('Person.Address') , 'AddressID', 'IsFullTextIndexable' )
but that property doesn't exist. The best I got sofar is to compare data types with what the documentation says, something like this:
...
if (tc.Text == "char" ||
tc.Text == "varchar" ||
tc.Text == "nvarchar" ||
tc.Text == "varbinary(max)" ||
tc.Text == "text" ||
tc.Text == "image")
...
but I'd like something less hard-coded like a column property. In fact, in another place in the Books Online there's a document that syas that you can also use nchar, ntext, xml, and varbinary without the (max) in an index; so, which data types are really supported then?
Regards, and TIA,
Pieter
Sorry, I just saw there's a more appropiate forum for FTS (SQL Server Database Engine) so I post the same Q there too.
Regards, Pieter