Showing posts with label created. Show all posts
Showing posts with label created. Show all posts

Friday, March 23, 2012

Rebuilding Full Text Catalog

Hi,
I have created a db install app that will install all datatables,
build full-text catalogs and add job scheduler to populate the
catalogs several times a day.
However, I would also like my catalogs to be rebuilt every midnight
and repopulated again. I know of Rebuild method and Start method but
how do I schedule it so it is rebuilt every midnight?
Thank you,
_dino_
Why do you want to do a rebuild? A full population should suffice.
To schedule a rebuild you would schedule sp_fulltext_catalog
'catalogname','rebuild'
Have this job run in the database you are full-text indexing.
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
"Dino Buljubasic" <dino@.noplacelikehome.com> wrote in message
news:929nf11uhqac6ajetilqje30crccvjqast@.4ax.com...
> Hi,
> I have created a db install app that will install all datatables,
> build full-text catalogs and add job scheduler to populate the
> catalogs several times a day.
> However, I would also like my catalogs to be rebuilt every midnight
> and repopulated again. I know of Rebuild method and Start method but
> how do I schedule it so it is rebuilt every midnight?
> Thank you,
> _dino_

Monday, March 12, 2012

reboot notification

Hi all,

I wanted SQL server to sent me an email when it reboots. I created an Alert
but doesn't seem to be working. Any suggestions.

Thanks,I would create a stored procedure that would send an email, then have that
stored procedure execute every time sql starts. I don't remember the name
or property so that it executes on startup of SQL server.

Oscar...

"Guju" <guju@.tpg.com.au> wrote in message
news:41943151$1_1@.news.iprimus.com.au...
> Hi all,
> I wanted SQL server to sent me an email when it reboots. I created an
Alert
> but doesn't seem to be working. Any suggestions.
> Thanks,

Wednesday, March 7, 2012

Really need to solve this SQL problem to finish this web site.

Hi,
i created a dataSet in an ASP.Net page which:
1. Loads all fields from each database record.
2. Creates a new field using 2 of the existing fields: FullName = FirstName
+ ' ' + LastName
3. Loads only the record which has the same FullName as the variable Name
passed in the URL to this page.
My SQL is this:
SELECT *, FirstName + ' ' + LastName as FullName
FROM people
WHERE FirstName + ' ' + LastName = ?
and:
<Parameter Name="@.FullName" Value='<%# IIf((Request.QueryString("Name") <>
Nothing), Request.QueryString("Name"), "") %>'
Type="WChar"/></Parameters></MM:DataSet>
Can you please tell me how to do this?
I know i allready asked this but until now i got no solution and i need to
solve this to finish this web site and deliver it.
I hope i was able to explain better my problem.
Thank You Very Much,
Miguel
Why are you putting the Request.Querystring in a pre-render block, should it
not be in regular code with the rest of it ? IE
Value = Request.QueryString("Name")
OHM ( Terry Burns )
. . . One-Handed-Man . . .
"Miguel Dias Moura" <web001@.27NOSPAMlamps.com> wrote in message
news:%23UCksgXVEHA.2592@.TK2MSFTNGP09.phx.gbl...
> Hi,
> i created a dataSet in an ASP.Net page which:
> 1. Loads all fields from each database record.
> 2. Creates a new field using 2 of the existing fields: FullName =
FirstName
> + ' ' + LastName
> 3. Loads only the record which has the same FullName as the variable Name
> passed in the URL to this page.
> My SQL is this:
> SELECT *, FirstName + ' ' + LastName as FullName
> FROM people
> WHERE FirstName + ' ' + LastName = ?
> and:
> <Parameter Name="@.FullName" Value='<%# IIf((Request.QueryString("Name")
<>
> Nothing), Request.QueryString("Name"), "") %>'
> Type="WChar"/></Parameters></MM:DataSet>
> Can you please tell me how to do this?
> I know i allready asked this but until now i got no solution and i need to
> solve this to finish this web site and deliver it.
> I hope i was able to explain better my problem.
> Thank You Very Much,
> Miguel
>
>
|||Do you know the strange thing? I tested it and everything works fine...but
when i was testing in the Dreamweaver window where i place the SQL, i was
not getting any records...have no idea why is this...but well, at least it's
working.
Thanks for eveybody help and patiente...my code is working :-)
Thanks again for your time,
Miguel
"One Handed Man ( OHM - Terry Burns )" <news.microsoft.com> wrote in message
news:OtAHCsXVEHA.3596@.tk2msftngp13.phx.gbl...
> Why are you putting the Request.Querystring in a pre-render block, should
it[vbcol=seagreen]
> not be in regular code with the rest of it ? IE
> Value = Request.QueryString("Name")
> --
> OHM ( Terry Burns )
> . . . One-Handed-Man . . .
>
> "Miguel Dias Moura" <web001@.27NOSPAMlamps.com> wrote in message
> news:%23UCksgXVEHA.2592@.TK2MSFTNGP09.phx.gbl...
> FirstName
Name[vbcol=seagreen]
IIf((Request.QueryString("Name")[vbcol=seagreen]
> <>
to
>

Really need to solve this SQL problem to finish this web site.

Hi,
i created a dataSet in an ASP.Net page which:
1. Loads all fields from each database record.
2. Creates a new field using 2 of the existing fields: FullName = FirstName
+ ' ' + LastName
3. Loads only the record which has the same FullName as the variable Name
passed in the URL to this page.
My SQL is this:
SELECT *, FirstName + ' ' + LastName as FullName
FROM people
WHERE FirstName + ' ' + LastName = ?
and:
<Parameter Name="@.FullName" Value='<%# IIf((Request.QueryString("Name") <>
Nothing), Request.QueryString("Name"), "") %>'
Type="WChar"/></Parameters></MM:DataSet>
Can you please tell me how to do this?
I know i allready asked this but until now i got no solution and i need to
solve this to finish this web site and deliver it.
I hope i was able to explain better my problem.
Thank You Very Much,
MiguelWhy are you putting the Request.Querystring in a pre-render block, should it
not be in regular code with the rest of it ? IE
Value = Request.QueryString("Name")
OHM ( Terry Burns )
. . . One-Handed-Man . . .
"Miguel Dias Moura" <web001@.27NOSPAMlamps.com> wrote in message
news:%23UCksgXVEHA.2592@.TK2MSFTNGP09.phx.gbl...
> Hi,
> i created a dataSet in an ASP.Net page which:
> 1. Loads all fields from each database record.
> 2. Creates a new field using 2 of the existing fields: FullName =
FirstName
> + ' ' + LastName
> 3. Loads only the record which has the same FullName as the variable Name
> passed in the URL to this page.
> My SQL is this:
> SELECT *, FirstName + ' ' + LastName as FullName
> FROM people
> WHERE FirstName + ' ' + LastName = ?
> and:
> <Parameter Name="@.FullName" Value='<%# IIf((Request.QueryString("Name")
<>
> Nothing), Request.QueryString("Name"), "") %>'
> Type="WChar"/></Parameters></MM:DataSet>
> Can you please tell me how to do this?
> I know i allready asked this but until now i got no solution and i need to
> solve this to finish this web site and deliver it.
> I hope i was able to explain better my problem.
> Thank You Very Much,
> Miguel
>
>|||Do you know the strange thing? I tested it and everything works fine...but
when i was testing in the Dreamweaver window where i place the SQL, i was
not getting any records...have no idea why is this...but well, at least it's
working.
Thanks for eveybody help and patiente...my code is working :-)
Thanks again for your time,
Miguel
"One Handed Man ( OHM - Terry Burns )" <news.microsoft.com> wrote in message
news:OtAHCsXVEHA.3596@.tk2msftngp13.phx.gbl...
> Why are you putting the Request.Querystring in a pre-render block, should
it
> not be in regular code with the rest of it ? IE
> Value = Request.QueryString("Name")
> --
> OHM ( Terry Burns )
> . . . One-Handed-Man . . .
>
> "Miguel Dias Moura" <web001@.27NOSPAMlamps.com> wrote in message
> news:%23UCksgXVEHA.2592@.TK2MSFTNGP09.phx.gbl...
> FirstName
Name[vbcol=seagreen]
IIf((Request.QueryString("Name")[vbcol=seagreen]
> <>
to[vbcol=seagreen]
>

Really need to solve this SQL problem to finish this web site.

Hi,
i created a dataSet in an ASP.Net page which:
1. Loads all fields from each database record.
2. Creates a new field using 2 of the existing fields: FullName = FirstName
+ ' ' + LastName
3. Loads only the record which has the same FullName as the variable Name
passed in the URL to this page.
My SQL is this:
SELECT *, FirstName + ' ' + LastName as FullName
FROM people
WHERE FirstName + ' ' + LastName = ?
and:
<Parameter Name="@.FullName" Value='<%# IIf((Request.QueryString("Name") <>
Nothing), Request.QueryString("Name"), "") %>'
Type="WChar"/></Parameters></MM:DataSet>
Can you please tell me how to do this?
I know i allready asked this but until now i got no solution and i need to
solve this to finish this web site and deliver it.
I hope i was able to explain better my problem.
Thank You Very Much,
MiguelWhy are you putting the Request.Querystring in a pre-render block, should it
not be in regular code with the rest of it ? IE
Value = Request.QueryString("Name")
--
OHM ( Terry Burns )
. . . One-Handed-Man . . .
"Miguel Dias Moura" <web001@.27NOSPAMlamps.com> wrote in message
news:%23UCksgXVEHA.2592@.TK2MSFTNGP09.phx.gbl...
> Hi,
> i created a dataSet in an ASP.Net page which:
> 1. Loads all fields from each database record.
> 2. Creates a new field using 2 of the existing fields: FullName =FirstName
> + ' ' + LastName
> 3. Loads only the record which has the same FullName as the variable Name
> passed in the URL to this page.
> My SQL is this:
> SELECT *, FirstName + ' ' + LastName as FullName
> FROM people
> WHERE FirstName + ' ' + LastName = ?
> and:
> <Parameter Name="@.FullName" Value='<%# IIf((Request.QueryString("Name")
<>
> Nothing), Request.QueryString("Name"), "") %>'
> Type="WChar"/></Parameters></MM:DataSet>
> Can you please tell me how to do this?
> I know i allready asked this but until now i got no solution and i need to
> solve this to finish this web site and deliver it.
> I hope i was able to explain better my problem.
> Thank You Very Much,
> Miguel
>
>|||Do you know the strange thing? I tested it and everything works fine...but
when i was testing in the Dreamweaver window where i place the SQL, i was
not getting any records...have no idea why is this...but well, at least it's
working.
Thanks for eveybody help and patiente...my code is working :-)
Thanks again for your time,
Miguel
"One Handed Man ( OHM - Terry Burns )" <news.microsoft.com> wrote in message
news:OtAHCsXVEHA.3596@.tk2msftngp13.phx.gbl...
> Why are you putting the Request.Querystring in a pre-render block, should
it
> not be in regular code with the rest of it ? IE
> Value = Request.QueryString("Name")
> --
> OHM ( Terry Burns )
> . . . One-Handed-Man . . .
>
> "Miguel Dias Moura" <web001@.27NOSPAMlamps.com> wrote in message
> news:%23UCksgXVEHA.2592@.TK2MSFTNGP09.phx.gbl...
> > Hi,
> >
> > i created a dataSet in an ASP.Net page which:
> >
> > 1. Loads all fields from each database record.
> > 2. Creates a new field using 2 of the existing fields: FullName => FirstName
> > + ' ' + LastName
> > 3. Loads only the record which has the same FullName as the variable
Name
> > passed in the URL to this page.
> >
> > My SQL is this:
> >
> > SELECT *, FirstName + ' ' + LastName as FullName
> > FROM people
> > WHERE FirstName + ' ' + LastName = ?
> >
> > and:
> >
> > <Parameter Name="@.FullName" Value='<%#
IIf((Request.QueryString("Name")
> <>
> > Nothing), Request.QueryString("Name"), "") %>'
> > Type="WChar"/></Parameters></MM:DataSet>
> >
> > Can you please tell me how to do this?
> > I know i allready asked this but until now i got no solution and i need
to
> > solve this to finish this web site and deliver it.
> >
> > I hope i was able to explain better my problem.
> >
> > Thank You Very Much,
> > Miguel
> >
> >
> >
>

Saturday, February 25, 2012

Really basic question...

I have bumbled along and managed to install a SQL server
on my machine... and with the install I have created a
user "Admin" along with a password ( yay )
Anyways... what I would like to know now is how to create
other users and allow them access to the DB.
Thanks
MeHi,
SQL Server supports 2 types of authentications,
1. SQL Server
2. OS Level
If it is SQL Server , Login to server using Enterprise manager then select
the security tab.
1. Right click on logins and add a new login.
2. Provide the user name and select SQL server authentication
3. Give a password and select the required servide wide roles
4. Give the database that user need access.
If it is OS Level , you have to create the user at OS level and use the same
security tab to give the roles and access to databases.
Thanks
Hari
MCDBA
"me" <anonymous@.discussions.microsoft.com> wrote in message
news:07cb01c3da5c$eb920e90$a301280a@.phx.gbl...
> I have bumbled along and managed to install a SQL server
> on my machine... and with the install I have created a
> user "Admin" along with a password ( yay )
> Anyways... what I would like to know now is how to create
> other users and allow them access to the DB.
> Thanks
> Me|||Use a tool like Enterprise Manager to create users. You need to create
logins in SQL Server and then map these logins to databases.
--
HTH,
SriSamp
Please reply to the whole group only!
http://www32.brinkster.com/srisamp
"me" <anonymous@.discussions.microsoft.com> wrote in message
news:07cb01c3da5c$eb920e90$a301280a@.phx.gbl...
> I have bumbled along and managed to install a SQL server
> on my machine... and with the install I have created a
> user "Admin" along with a password ( yay )
> Anyways... what I would like to know now is how to create
> other users and allow them access to the DB.
> Thanks
> Me|||Click the folder Security and expand
Right Click the folder Logins and select "New User"
The rest you will need to read up on.
If you need a bit more advise then email me. In reverse
order(to stop autospammers) my email is
moc.liamtoh.em_yrewolf_elttil
J
PS Never give your Admin password out to anyone - Keep it
safe, Keep it Secret.
>--Original Message--
>I have bumbled along and managed to install a SQL server
>on my machine... and with the install I have created a
>user "Admin" along with a password ( yay )
>Anyways... what I would like to know now is how to create
>other users and allow them access to the DB.
>Thanks
>Me
>.
>|||Which should be the prefferred way to add users?
SQL Server or OS level
>--Original Message--
>Hi,
>SQL Server supports 2 types of authentications,
>1. SQL Server
>2. OS Level
>If it is SQL Server , Login to server using Enterprise
manager then select
>the security tab.
>1. Right click on logins and add a new login.
>2. Provide the user name and select SQL server
authentication
>3. Give a password and select the required servide wide
roles
>4. Give the database that user need access.
>If it is OS Level , you have to create the user at OS
level and use the same
>security tab to give the roles and access to databases.
>Thanks
>Hari
>MCDBA
>"me" <anonymous@.discussions.microsoft.com> wrote in
message
>news:07cb01c3da5c$eb920e90$a301280a@.phx.gbl...
>> I have bumbled along and managed to install a SQL
server
>> on my machine... and with the install I have created a
>> user "Admin" along with a password ( yay )
>> Anyways... what I would like to know now is how to
create
>> other users and allow them access to the DB.
>> Thanks
>> Me
>
>.
>|||Thanks for all of the great help... Is there a way to do
this programmatically ?
Thanks
Me
>--Original Message--
>I have bumbled along and managed to install a SQL server
>on my machine... and with the install I have created a
>user "Admin" along with a password ( yay )
>Anyways... what I would like to know now is how to
create
>other users and allow them access to the DB.
>Thanks
>Me
>.
>

Really basic question...

I have bumbled along and managed to install a SQL server
on my machine... and with the install I have created a
user "Admin" along with a password ( yay )
Anyways... what I would like to know now is how to create
other users and allow them access to the DB.
Thanks
MeHi,
SQL Server supports 2 types of authentications,
1. SQL Server
2. OS Level
If it is SQL Server , Login to server using Enterprise manager then select
the security tab.
1. Right click on logins and add a new login.
2. Provide the user name and select SQL server authentication
3. Give a password and select the required servide wide roles
4. Give the database that user need access.
If it is OS Level , you have to create the user at OS level and use the same
security tab to give the roles and access to databases.
Thanks
Hari
MCDBA
"me" <anonymous@.discussions.microsoft.com> wrote in message
news:07cb01c3da5c$eb920e90$a301280a@.phx.gbl...
quote:

> I have bumbled along and managed to install a SQL server
> on my machine... and with the install I have created a
> user "Admin" along with a password ( yay )
> Anyways... what I would like to know now is how to create
> other users and allow them access to the DB.
> Thanks
> Me
|||Use a tool like Enterprise Manager to create users. You need to create
logins in SQL Server and then map these logins to databases.
--
HTH,
SriSamp
Please reply to the whole group only!
http://www32.brinkster.com/srisamp
"me" <anonymous@.discussions.microsoft.com> wrote in message
news:07cb01c3da5c$eb920e90$a301280a@.phx.gbl...
quote:

> I have bumbled along and managed to install a SQL server
> on my machine... and with the install I have created a
> user "Admin" along with a password ( yay )
> Anyways... what I would like to know now is how to create
> other users and allow them access to the DB.
> Thanks
> Me
|||Which should be the prefferred way to add users?
SQL Server or OS level
quote:

>--Original Message--
>Hi,
>SQL Server supports 2 types of authentications,
>1. SQL Server
>2. OS Level
>If it is SQL Server , Login to server using Enterprise

manager then select
quote:

>the security tab.
>1. Right click on logins and add a new login.
>2. Provide the user name and select SQL server

authentication
quote:

>3. Give a password and select the required servide wide

roles
quote:

>4. Give the database that user need access.
>If it is OS Level , you have to create the user at OS

level and use the same
quote:

>security tab to give the roles and access to databases.
>Thanks
>Hari
>MCDBA
>"me" <anonymous@.discussions.microsoft.com> wrote in

message
quote:

>news:07cb01c3da5c$eb920e90$a301280a@.phx.gbl...
server[QUOTE]
create[QUOTE]
>
>.
>

Monday, February 20, 2012

Real size of database

I have a database which I do not think is really big, but when it was created the initial file sizes where set to very large amounts.

How do I get the actual size of the data?

When I do shrink database, SQL say there is no space to reclaim but when I back it up the backup is extreamly small, does this mean that shrink database will not shrink past the original size?

How do I resize the database to only the actual size needed?

Here is the result of sp_spaceused:

database_name database_size unallocated space

--

CCCca 99863.81 MB 96318.27 MB

reserved data index_size unused

5680 KB 3000 KB 2232 KB 448 KB

One thing about shrinking database files is that you cannot shink below the true size of your data. Imagine your database as a box filled with paper. If the box was half-filled, you can only shrink it to that size and no more than that. You cannot shirink it to 1/3 of the size of the box as you have 1/2 as data. Your database size includes not just data and metadata but indexes as well. From the data you posted here, you cannot shrink the database to below approx 3GB|||

u can use,

backup log databasename with truncate_only and then shrink the files and database.

|||

After I shrink the database still getting a database size of 134534.56 MB not 3GB. I ran the following:

backup log CCCca with truncate_only

DBCC SHRINKFILE (CCCca_Primary, TRUNCATEONLY);

DBCC SHRINKFILE (CCCca_Log, TRUNCATEONLY);

DBCC SHRINKFILE (CCCca_Analysis, TRUNCATEONLY);

DBCC SHRINKFILE (CCCca_AnalysisIdx3, TRUNCATEONLY);

DBCC SHRINKFILE (CCCca_AnalysisIdx, TRUNCATEONLY);

DBCC SHRINKFILE (CCCca_AnalysisIdx2, TRUNCATEONLY);

DBCC SHRINKFILE (CCCca_PrimeIdx, TRUNCATEONLY);

DBCC SHRINKFILE (CCCca_Word, TRUNCATEONLY);

DBCC SHRINKFILE (CCCca_WordIdx, TRUNCATEONLY);

DBCC SHRINKDATABASE (CCCca, TRUNCATEONLY);

but all I get is : "

DBCC SHRINKDATABASE: File ID 1 of database ID 5 was skipped because the file does not have enough free space to reclaim."

is this data base really 134534.56 MB or is it 3GB?

|||Truncating the log does not necessarily mean shrinking the database. It simply means you are freeing up space on your transaction log and committing the transactions in your database. Microsoft did not include the shrinking as part of the truncate option for the transaction log as this will incurr overhead when transactions starts occurring after the truncate command. You have to do them individually to shrink your database.|||I have same problem, I can't shrink the data and index files.... even there are unused space|||

Have you tried DBCC SHRINKFILE with the 'target_size' option specified

Real size of database

I have a database which I do not think is really big, but when it was created the initial file sizes where set to very large amounts.

How do I get the actual size of the data?

When I do shrink database, SQL say there is no space to reclaim but when I back it up the backup is extreamly small, does this mean that shrink database will not shrink past the original size?

How do I resize the database to only the actual size needed?

Here is the result of sp_spaceused:

database_name database_size unallocated space

--

CCCca 99863.81 MB 96318.27 MB

reserved data index_size unused

5680 KB 3000 KB 2232 KB 448 KB

One thing about shrinking database files is that you cannot shink below the true size of your data. Imagine your database as a box filled with paper. If the box was half-filled, you can only shrink it to that size and no more than that. You cannot shirink it to 1/3 of the size of the box as you have 1/2 as data. Your database size includes not just data and metadata but indexes as well. From the data you posted here, you cannot shrink the database to below approx 3GB|||

u can use,

backup log databasename with truncate_only and then shrink the files and database.

|||

After I shrink the database still getting a database size of 134534.56 MB not 3GB. I ran the following:

backup log CCCca with truncate_only

DBCC SHRINKFILE (CCCca_Primary, TRUNCATEONLY);

DBCC SHRINKFILE (CCCca_Log, TRUNCATEONLY);

DBCC SHRINKFILE (CCCca_Analysis, TRUNCATEONLY);

DBCC SHRINKFILE (CCCca_AnalysisIdx3, TRUNCATEONLY);

DBCC SHRINKFILE (CCCca_AnalysisIdx, TRUNCATEONLY);

DBCC SHRINKFILE (CCCca_AnalysisIdx2, TRUNCATEONLY);

DBCC SHRINKFILE (CCCca_PrimeIdx, TRUNCATEONLY);

DBCC SHRINKFILE (CCCca_Word, TRUNCATEONLY);

DBCC SHRINKFILE (CCCca_WordIdx, TRUNCATEONLY);

DBCC SHRINKDATABASE (CCCca, TRUNCATEONLY);

but all I get is : "

DBCC SHRINKDATABASE: File ID 1 of database ID 5 was skipped because the file does not have enough free space to reclaim."

is this data base really 134534.56 MB or is it 3GB?

|||Truncating the log does not necessarily mean shrinking the database. It simply means you are freeing up space on your transaction log and committing the transactions in your database. Microsoft did not include the shrinking as part of the truncate option for the transaction log as this will incurr overhead when transactions starts occurring after the truncate command. You have to do them individually to shrink your database.|||I have same problem, I can't shrink the data and index files.... even there are unused space|||

Have you tried DBCC SHRINKFILE with the 'target_size' option specified