Showing posts with label sqlserver. Show all posts
Showing posts with label sqlserver. Show all posts

Tuesday, March 27, 2012

automatically set database to simple recovery upon creation

Is there a way to set the recovery model of any new databases created on SQL
Server 2005 to Simple instead of Full? I would like the recovery model to
default to Simple for any new databases created on the server.
Thanks for your help!
Recovery model is inherited from the model database. So you can set model to simple.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"mp3nomad" <mp3nomad@.discussions.microsoft.com> wrote in message
news:4B63FB22-E1A0-4E8F-895E-75E25FD089AA@.microsoft.com...
> Is there a way to set the recovery model of any new databases created on SQL
> Server 2005 to Simple instead of Full? I would like the recovery model to
> default to Simple for any new databases created on the server.
> Thanks for your help!
|||awesome! Thanks!
"Tibor Karaszi" wrote:

> Recovery model is inherited from the model database. So you can set model to simple.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> Blog: http://solidqualitylearning.com/blogs/tibor/
>
> "mp3nomad" <mp3nomad@.discussions.microsoft.com> wrote in message
> news:4B63FB22-E1A0-4E8F-895E-75E25FD089AA@.microsoft.com...
>

automatically set database to simple recovery upon creation

Is there a way to set the recovery model of any new databases created on SQL
Server 2005 to Simple instead of Full? I would like the recovery model to
default to Simple for any new databases created on the server.
Thanks for your help!Recovery model is inherited from the model database. So you can set model to
simple.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"mp3nomad" <mp3nomad@.discussions.microsoft.com> wrote in message
news:4B63FB22-E1A0-4E8F-895E-75E25FD089AA@.microsoft.com...
> Is there a way to set the recovery model of any new databases created on S
QL
> Server 2005 to Simple instead of Full? I would like the recovery model to
> default to Simple for any new databases created on the server.
> Thanks for your help!|||awesome! Thanks!
"Tibor Karaszi" wrote:

> Recovery model is inherited from the model database. So you can set model
to simple.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> Blog: http://solidqualitylearning.com/blogs/tibor/
>
> "mp3nomad" <mp3nomad@.discussions.microsoft.com> wrote in message
> news:4B63FB22-E1A0-4E8F-895E-75E25FD089AA@.microsoft.com...
>

Tuesday, March 20, 2012

Automatic Update Not Working

SQL Server 2000. Windows Small Business Server 2003. Windows automatic
update keeps trying to install the same "critical security" update to SQL
Server Desktop Engine. Apparently it is not installing, as I find two event
s
in the event view each time. The automatic update is attempted almost every
time I log onto the server. Any ideas? The following is the event
information:
Event Type: Error
Event Source: MsiInstaller
Event Category: None
Event ID: 10005
Date: 12/5/2005
Time: 9:54:07 AM
User: GNJPM\administrator
Computer: HQSERVER
Description:
Product: Microsoft SQL Server Desktop Engine -- Internal Error 2727.
DatabaseRepl.185C1D8F_1545_4277_BB64_857D2622DB57
For more information, see Help and Support Center at
http://go.microsoft.com/fwlink/events.asp.
Data:
0000: 7b 36 35 36 35 37 43 35 {65657C5
0008: 39 2d 32 33 41 38 2d 34 9-23A8-4
0010: 39 37 34 2d 42 38 45 30 974-B8E0
0018: 2d 42 41 30 34 45 42 44 -BA04EBD
0020: 30 34 45 34 46 7d 04E4F}
Event Type: Error
Event Source: MsiInstaller
Event Category: None
Event ID: 1023
Date: 12/5/2005
Time: 9:54:07 AM
User: GNJPM\administrator
Computer: HQSERVER
Description:
Product: Microsoft SQL Server Desktop Engine - Update
'{1F506503-186B-4D88-81B3-7113B9457C9D}' could not be installed. Error
code
1603. Additional information is available in the log file C:\WMSDEHotfix.log
.
For more information, see Help and Support Center at
http://go.microsoft.com/fwlink/events.asp.
Data:
0000: 7b 36 35 36 35 37 43 35 {65657C5
0008: 39 2d 32 33 41 38 2d 34 9-23A8-4
0010: 39 37 34 2d 42 38 45 30 974-B8E0
0018: 2d 42 41 30 34 45 42 44 -BA04EBD
0020: 30 34 45 34 46 7d 20 7b 04E4F} {
0028: 31 46 35 30 36 35 30 33 1F506503
0030: 2d 31 38 36 42 2d 34 44 -186B-4D
0038: 38 38 2d 38 31 42 33 2d 88-81B3-
0040: 37 31 31 33 42 39 34 35 7113B945
0048: 37 43 39 44 7d 20 31 36 7C9D} 16
0050: 30 33 03
Dr. Doug Pruiett
Good News Jail & Prison Ministry
www.goodnewsjail.orgIt could be a lot of different things. Make sure your disk
space is okay. Make sure your temp directory is cleared out.
You may also want to check the following logs for more clues
as to what the problem is:
C:\WINDOWS\sqlsp.log
C:\WINDOWS\sqlstp.log
-Sue
On Mon, 5 Dec 2005 07:10:03 -0800, "Chaplain Doug"
<ChaplainDoug@.discussions.microsoft.com> wrote:

>SQL Server 2000. Windows Small Business Server 2003. Windows automatic
>update keeps trying to install the same "critical security" update to SQL
>Server Desktop Engine. Apparently it is not installing, as I find two even
ts
>in the event view each time. The automatic update is attempted almost ever
y
>time I log onto the server. Any ideas? The following is the event
>information:
>Event Type: Error
>Event Source: MsiInstaller
>Event Category: None
>Event ID: 10005
>Date: 12/5/2005
>Time: 9:54:07 AM
>User: GNJPM\administrator
>Computer: HQSERVER
>Description:
>Product: Microsoft SQL Server Desktop Engine -- Internal Error 2727.
>DatabaseRepl.185C1D8F_1545_4277_BB64_857D2622DB57
>For more information, see Help and Support Center at
>http://go.microsoft.com/fwlink/events.asp.
>Data:
>0000: 7b 36 35 36 35 37 43 35 {65657C5
>0008: 39 2d 32 33 41 38 2d 34 9-23A8-4
>0010: 39 37 34 2d 42 38 45 30 974-B8E0
>0018: 2d 42 41 30 34 45 42 44 -BA04EBD
>0020: 30 34 45 34 46 7d 04E4F}
>Event Type: Error
>Event Source: MsiInstaller
>Event Category: None
>Event ID: 1023
>Date: 12/5/2005
>Time: 9:54:07 AM
>User: GNJPM\administrator
>Computer: HQSERVER
>Description:
>Product: Microsoft SQL Server Desktop Engine - Update
>'{1F506503-186B-4D88-81B3-7113B9457C9D}' could not be installed. Error
code
>1603. Additional information is available in the log file C:\WMSDEHotfix.lo
g.
>For more information, see Help and Support Center at
>http://go.microsoft.com/fwlink/events.asp.
>Data:
>0000: 7b 36 35 36 35 37 43 35 {65657C5
>0008: 39 2d 32 33 41 38 2d 34 9-23A8-4
>0010: 39 37 34 2d 42 38 45 30 974-B8E0
>0018: 2d 42 41 30 34 45 42 44 -BA04EBD
>0020: 30 34 45 34 46 7d 20 7b 04E4F} {
>0028: 31 46 35 30 36 35 30 33 1F506503
>0030: 2d 31 38 36 42 2d 34 44 -186B-4D
>0038: 38 38 2d 38 31 42 33 2d 88-81B3-
>0040: 37 31 31 33 42 39 34 35 7113B945
>0048: 37 43 39 44 7d 20 31 36 7C9D} 16
>0050: 30 33 03

Monday, March 19, 2012

automatic number problem

Hi, i have imported an access database into sqlserver 2000. In access,
i have some table fields which were using automatic number as
datatype. But i see that there is not a datatype in sqlserver like
automatic no. I have to enter id numbers to my tables for each records
automatically. Would anybody help me about solving this problem? Any
idea? Thanksfatih kayaalp (kaya_alp@.hotmail.com) writes:
> Hi, i have imported an access database into sqlserver 2000. In access,
> i have some table fields which were using automatic number as
> datatype. But i see that there is not a datatype in sqlserver like
> automatic no. I have to enter id numbers to my tables for each records
> automatically. Would anybody help me about solving this problem? Any
> idea? Thanks

You can assign a column the IDENTITY property:

CREATE TABLE a (a int IDENTITY(1, 1) NOT NULL,

To get idenity value the most recently inserted row, use scope_identity().

--
Erland Sommarskog, SQL Server MVP, sommar@.algonet.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp|||>> I have some table fields [sic] which were using automatic number as
datatype [sic]. <<

You do not understand SQL or data modeling. Fields are not columns;
tables are not file; rows are not records. The entire concept of a
physical numbering of rows is not relational. Your original design
was wrong and you want to copy it into SQL. Why do you want to do
that again??

Take a course and take the time to learn to do it right.|||Joe, go back in the hole you came from, take an attitude course and then
come back. Not earlier.

"--CELKO--" <joe.celko@.northface.edu> wrote in message
news:a264e7ea.0401132113.38222a3a@.posting.google.c om...
> >> I have some table fields [sic] which were using automatic number as
> datatype [sic]. <<
> You do not understand SQL or data modeling. Fields are not columns;
> tables are not file; rows are not records. The entire concept of a
> physical numbering of rows is not relational. Your original design
> was wrong and you want to copy it into SQL. Why do you want to do
> that again??
> Take a course and take the time to learn to do it right.|||Martin Feuersteiner (theintrepidfox@.hotmail.com) writes:
> Joe, go back in the hole you came from, take an attitude course and then
> come back. Not earlier.

Joe on an attitude course? What a waste of time and money! That man is a
hopeless case!

--
Erland Sommarskog, SQL Server MVP, sommar@.algonet.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp|||>> Joe on an attitude course? What a waste of time and money! That man
is a hopeless case! <<

I was going to take a Dale Carnegie course, but the restraining order is
still in effect.

--CELKO--
===========================
Please post DDL, so that people do not have to guess what the keys,
constraints, Declarative Referential Integrity, datatypes, etc. in your
schema are.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Automatic Import of Emails

Is there a way to automatically import incoming emails into a SQL
Server Database?
I know it is inefficient, but we have to run a number of rules on the
email after it is received. Store it in a database and be able to
connect other things, meetings, contacts, etc. Moving it back and
forth in chunks can be difficult and the overhead could spiral out of
control.
So we were thinking of moving it to the DB as it was retrieved.
What do you think would be a better solution to retrieve it?
Does my email make sense?Am 14 Jul 2006 01:13:51 -0700 schrieb leeroy881:

Quote:

Originally Posted by

Is there a way to automatically import incoming emails into a SQL
Server Database?


Maybe not import, but read. See xp_readmail/xp_findnextmsg (in SQL2000 sp3
and up) in BOL. With this and ServerAgent you can implement an automatic
mail processing system.

bye, Helmut|||Thank you Helmut.
I'll check it out.

Helmut Woess wrote:

Quote:

Originally Posted by

Am 14 Jul 2006 01:13:51 -0700 schrieb leeroy881:
>

Quote:

Originally Posted by

Is there a way to automatically import incoming emails into a SQL
Server Database?


>
Maybe not import, but read. See xp_readmail/xp_findnextmsg (in SQL2000 sp3
and up) in BOL. With this and ServerAgent you can implement an automatic
mail processing system.
>
bye, Helmut

Sunday, March 11, 2012

Automatic failover with SQL Server Standard?

Hi,
We are trying to implement SQL server failover by using
Windows 2003 "Enterprise" clustering and SQL
Server "Standard" to try to save the cost of SQL Server
Etnerprise. From what I understand we cannot have
automatic failover of the SQL server service with this
configuration.
Could someone please explaing to me techinically why we
cannot do this:
- Implement W2003 Enterprise OS clustering.
- Install SQL server "standard" installed on both machines
in the OS cluster.
- Have the SQL server service start on the primary node in
the OS cluster and manage the database. Then ...
as part of the OS cluster confifuration, if the primary
node goes down, request that the SQL server service starts
up on the backup node as part of the OS failover.
Can't the clients continue to talk to the SQL server
database since it is not started up on the backup node and
has the same IP address?
Thanks!
As you rightly said, SQL Server 2000 Failover Clustering is NOT supported with SQL Server 2000 Standard Edition. It is fully supported on SQL Server 2000 Enterprise Edition.
You can install and configure any non-cluster aware application as a generic service on a cluster. You can even make notepad clustered as a generic service in a cluster if you like.
I have not seen anybody doing following this approach (using sql server 2000 std edition as a generic service). I wouldn't recommend it. This will be like a custom solution and if you have any issues with the failover
working properly, the support that you will get will be very limited. If you have to work with SQL Server 2000 Standard Edition then I would recommend exploring SQL Server Replication.
To get an idea of what SQL Server 2000 EE Failover Clustering does please refer to the following whitepaper.
Microsoft Whitepaper - SQL Server 2000 Failover Clustering
http://www.microsoft.com/technet/pro.../failclus.mspx
Cluster Support Policy
Microsoft's Cluster support policy is below
Cluster (General): http://support.microsoft.com/default...b;en-us;309395
Cluster (SQL): http://support.microsoft.com/default...b;en-us;327518
Best Regards,
Uttam Parui
Microsoft Corporation
This posting is provided "AS IS" with no warranties, and confers no rights.
Are you secure? For information about the Strategic Technology Protection Program and to order your FREE Security Tool Kit, please visit http://www.microsoft.com/security.
Microsoft highly recommends that users with Internet access update their Microsoft software to better protect against viruses and security vulnerabilities. The easiest way to do this is to visit the following websites:
http://www.microsoft.com/protect
http://www.microsoft.com/security/guidance/default.mspx
|||Note that Veritas support clustering SQL2000 Standard. When I've used it,
it's been just using VCS and not involving MCS at all but I believe it can
sit on top if it as well. I think they've rebranded recently so its called
Storage Foundation High Availability rather than Veritas Cluster Server to
reflect its reliance on Veritas Volume Manager (which is now called Storage
Foundation). I actually prefer the Veritas cluster management tools to the
MS tools and it's a lot cheaper than going to Enterprise Edition if the only
reason you need Enterprise is clustering (and not performance/large memory
support etc).
HTH
Jasper Smith (SQL Server MVP)
http://www.sqldbatips.com
I support PASS - the definitive, global
community for SQL Server professionals -
http://www.sqlpass.org
<anonymous@.discussions.microsoft.com> wrote in message
news:2ec3601c46d96$f335fc60$a601280a@.phx.gbl...
> Hi,
> We are trying to implement SQL server failover by using
> Windows 2003 "Enterprise" clustering and SQL
> Server "Standard" to try to save the cost of SQL Server
> Etnerprise. From what I understand we cannot have
> automatic failover of the SQL server service with this
> configuration.
> Could someone please explaing to me techinically why we
> cannot do this:
> - Implement W2003 Enterprise OS clustering.
> - Install SQL server "standard" installed on both machines
> in the OS cluster.
> - Have the SQL server service start on the primary node in
> the OS cluster and manage the database. Then ...
> as part of the OS cluster confifuration, if the primary
> node goes down, request that the SQL server service starts
> up on the backup node as part of the OS failover.
> Can't the clients continue to talk to the SQL server
> database since it is not started up on the backup node and
> has the same IP address?
> Thanks!
>

automatic disconnect inactive users

How can I setup SQLServer 2000 to automatically disconnect clients that have
been inactive for 2 hours? There was an option to do this in Sybase
SQLAnywhere, but I haven't found it SQLServer.
Thanks.
Hi
Nothing in SQL. If you need to do this, you need to write code that call the
KILL function.
The system stored procedure sp_who2 is a good code base to use.
Regards
Mike
"Daryl A." wrote:

> How can I setup SQLServer 2000 to automatically disconnect clients that have
> been inactive for 2 hours? There was an option to do this in Sybase
> SQLAnywhere, but I haven't found it SQLServer.
> Thanks.

Automatic deletion to allow import

Greetings All
I'm new to SQL. I'm using Standard edition (SP3)
I have recently had to sort out the import of a Unisys dbs into our SQL
server. This dbs needs to be imported a minimum of 3 times per week. It won'
t
overwrite an existing dbs so the only way I can think to do this is by
deleting the existing dbs before the scheduled import. I know Unisys can
provide a componant that allows synchronisation but as with everything that
costs mucho money.
Is there a was to delete the existing dbs automatically so that the dbs will
be imported through Data Transformation Services, local packages?
Or am I, due to my lack of knowledge going about this the wrong way.
Andy
--
Ah! thats what pushing the button does.!!!I don't know what a dbs is. Is it a table? And entire database of
many tables?
It is possible for DTS to delete the rows in a table before importing
new data. In the DTS wizard click on the Transform column to find the
option, to the right of the targe table you select. Save the package.
Roy
On Tue, 25 Jul 2006 08:18:01 -0700, sage
<sage@.discussions.microsoft.com> wrote:

>Greetings All
>I'm new to SQL. I'm using Standard edition (SP3)
>I have recently had to sort out the import of a Unisys dbs into our SQL
>server. This dbs needs to be imported a minimum of 3 times per week. It won
't
>overwrite an existing dbs so the only way I can think to do this is by
>deleting the existing dbs before the scheduled import. I know Unisys can
>provide a componant that allows synchronisation but as with everything that
>costs mucho money.
>Is there a was to delete the existing dbs automatically so that the dbs wil
l
>be imported through Data Transformation Services, local packages?
>Or am I, due to my lack of knowledge going about this the wrong way.
>Andy|||Thanks Roy
dbs = database (Sorry for confusing you)
The problem is we have at least 150 tables.
A coleague found the "Drop" command .. do you know if this could be used?
Andy
--
Ah! thats what pushing the button does.!!!
"Roy Harvey" wrote:

> I don't know what a dbs is. Is it a table? And entire database of
> many tables?
> It is possible for DTS to delete the rows in a table before importing
> new data. In the DTS wizard click on the Transform column to find the
> option, to the right of the targe table you select. Save the package.
> Roy
>
> On Tue, 25 Jul 2006 08:18:01 -0700, sage
> <sage@.discussions.microsoft.com> wrote:
>
>|||Are you figuring on...
Ddropping and re-creating the database?
Dropping and recreating the tables?
Truncating the tables and reloading the data?
What tool are you using for the load? Something from Unisys? Have
you already gone through the process the first time, and just trying
to make it run three times a week? Or is that first load still ahead
of you?
In general, DROP will let you drop a database or a table. TRUNCATE or
DELETE will let you remove the data from a table.
I have always found that the table definitions generated by automatic
load tools leave something - usually a great deal - to be desired.
Having all the character columns end up as NVARCHAR(4000), and all the
numbers end up as FLOAT, is not my idea of good data type choices. So
what I generally do is load the first time using whatever tool builds
the tables, then script the tables and fix the definiions. Those new
table definiions replace the first versions of tables, and I then
rework the load process to load into existing tables rather than
creating them.
Roy Harvey
Beacon Falls, CT
On Wed, 26 Jul 2006 06:28:02 -0700, sage
<sage@.discussions.microsoft.com> wrote:

>Thanks Roy
>dbs = database (Sorry for confusing you)
>The problem is we have at least 150 tables.
>A coleague found the "Drop" command .. do you know if this could be used?
>Andy|||Well we have successfully done a copy already and found that if we wanted to
keep the database uptodate we needed to copy 3 times per week (for our
purposes) If the database exists it fails to copy. So we had looked at
deleting manually but then someone suggested that if we could incorporate
this in the import then that would solve it all in one go.
Basically I'm just trying to achive a copy of the Unisys database to the SQL
server using DTS on a schedual.
As for the table definitions I have a colleague who may have the skills
required. If we achive this can the import into existing tables be done via
DTS?
Andy
--
Ah! thats what pushing the button does.!!!
"Roy Harvey" wrote:

> Are you figuring on...
> Ddropping and re-creating the database?
> Dropping and recreating the tables?
> Truncating the tables and reloading the data?
> What tool are you using for the load? Something from Unisys? Have
> you already gone through the process the first time, and just trying
> to make it run three times a week? Or is that first load still ahead
> of you?
> In general, DROP will let you drop a database or a table. TRUNCATE or
> DELETE will let you remove the data from a table.
> I have always found that the table definitions generated by automatic
> load tools leave something - usually a great deal - to be desired.
> Having all the character columns end up as NVARCHAR(4000), and all the
> numbers end up as FLOAT, is not my idea of good data type choices. So
> what I generally do is load the first time using whatever tool builds
> the tables, then script the tables and fix the definiions. Those new
> table definiions replace the first versions of tables, and I then
> rework the load process to load into existing tables rather than
> creating them.
> Roy Harvey
> Beacon Falls, CT
> On Wed, 26 Jul 2006 06:28:02 -0700, sage
> <sage@.discussions.microsoft.com> wrote:
>
>|||If you have already loaded the data onece you are well along.
Yes, import to existing tables can be done using DTS. If you start
with the import wizard, there is a spot where you can choose an
existing table (the Destination column), and next to that (the
Transform column) specify that the existing data in the table is to be
deleted before the fresh data is loaded. I generally use the wizard
to get me started, telling it to save the package, then edit the
package as required.
Once choice you have to make is whether to make one huge DTS package,
an individual package for each table, or something in between.
Combining all the tables into one package is a bit less work to set
up, perhaps, and simpler to schedule, but has major shortocomings when
you need to run just one bit. Also, the tools for editing packages,
with the graphical representation of the objects, isn't the greatest
for working with large numbers of objects. So I would be inclined
toward an individual package for each table. A compromise would be to
use individual packages for large or problematic tables, and then
group the rest of the tables into logical sets, a package for each.
Roy Harvey
Beacon Falls, CT
On Wed, 26 Jul 2006 07:28:02 -0700, sage
<sage@.discussions.microsoft.com> wrote:

>Well we have successfully done a copy already and found that if we wanted t
o
>keep the database uptodate we needed to copy 3 times per week (for our
>purposes) If the database exists it fails to copy. So we had looked at
>deleting manually but then someone suggested that if we could incorporate
>this in the import then that would solve it all in one go.
>Basically I'm just trying to achive a copy of the Unisys database to the SQ
L
>server using DTS on a schedual.
>As for the table definitions I have a colleague who may have the skills
>required. If we achive this can the import into existing tables be done via
>DTS?
>Andy|||Thanks very much for this Roy. I apriciate you taking the time to expliain
it. I think I'll follow your guidence here and although more work initialy,
do seperate packages. I'll see how it goes
Thank you once again
Andy
"Roy Harvey" wrote:

> If you have already loaded the data onece you are well along.
> Yes, import to existing tables can be done using DTS. If you start
> with the import wizard, there is a spot where you can choose an
> existing table (the Destination column), and next to that (the
> Transform column) specify that the existing data in the table is to be
> deleted before the fresh data is loaded. I generally use the wizard
> to get me started, telling it to save the package, then edit the
> package as required.
> Once choice you have to make is whether to make one huge DTS package,
> an individual package for each table, or something in between.
> Combining all the tables into one package is a bit less work to set
> up, perhaps, and simpler to schedule, but has major shortocomings when
> you need to run just one bit. Also, the tools for editing packages,
> with the graphical representation of the objects, isn't the greatest
> for working with large numbers of objects. So I would be inclined
> toward an individual package for each table. A compromise would be to
> use individual packages for large or problematic tables, and then
> group the rest of the tables into logical sets, a package for each.
> Roy Harvey
> Beacon Falls, CT
> On Wed, 26 Jul 2006 07:28:02 -0700, sage
> <sage@.discussions.microsoft.com> wrote:
>
>

Thursday, February 16, 2012

Auto starting the sqlserver service

Hello all,
I am by no means a SLQ admin/DBA I am the Layer2/3 network admin who somehow
got thrown into figuring out how to fix an issue on one of our production
servers. We have a machine that is regularly rebooted (this is a whole
'nother story) and at times when it comes back on it does not start the
sqlserver service.
I was wondering if anyone knew how to right a batch file that would
regularly check, say every 15min, to see if the service was running, and if
not to star it.
Any help or even a nudge in the right direction would be ever so appreciated
.go to start-->run-->services.msc-->look for MSSQLSERVER and double
click on that-->change the startup type to Automatic...|||It has been verified to be set at automatic. For some reason the
sqlserveragent does not start at bootup on occasion. If we go into the
services panel and right click "start" the service will come up fine. But
unfortunatly we do not know until the end user complains.
We are currently implementing MOM which may help us monitor when the service
is not running.
"Shadow" wrote:

> go to start-->run-->services.msc-->look for MSSQLSERVER and double
> click on that-->change the startup type to Automatic...
>|||Use this to check the sqlagent status:
exec xp_servicecontrol 'querystate', 'sqlserveragent'
If it returns "stopped" then start the service by:
exec master..xp_servicecontrol N'start', N'sqlserveragent'
"FranklinST_Admin" <FranklinSTAdmin@.discussions.microsoft.com> wrote in
message news:F6293761-0C54-4BB4-B6CD-390A8C27C584@.microsoft.com...
> Hello all,
> I am by no means a SLQ admin/DBA I am the Layer2/3 network admin who
> somehow
> got thrown into figuring out how to fix an issue on one of our production
> servers. We have a machine that is regularly rebooted (this is a whole
> 'nother story) and at times when it comes back on it does not start the
> sqlserver service.
> I was wondering if anyone knew how to right a batch file that would
> regularly check, say every 15min, to see if the service was running, and
> if
> not to star it.
> Any help or even a nudge in the right direction would be ever so
> appreciated.

Auto starting the sqlserver service

Hello all,
I am by no means a SLQ admin/DBA I am the Layer2/3 network admin who somehow
got thrown into figuring out how to fix an issue on one of our production
servers. We have a machine that is regularly rebooted (this is a whole
'nother story) and at times when it comes back on it does not start the
sqlserver service.
I was wondering if anyone knew how to right a batch file that would
regularly check, say every 15min, to see if the service was running, and if
not to star it.
Any help or even a nudge in the right direction would be ever so appreciated.
go to start-->run-->services.msc-->look for MSSQLSERVER and double
click on that-->change the startup type to Automatic...
|||It has been verified to be set at automatic. For some reason the
sqlserveragent does not start at bootup on occasion. If we go into the
services panel and right click "start" the service will come up fine. But
unfortunatly we do not know until the end user complains.
We are currently implementing MOM which may help us monitor when the service
is not running.
"Shadow" wrote:

> go to start-->run-->services.msc-->look for MSSQLSERVER and double
> click on that-->change the startup type to Automatic...
>
|||Use this to check the sqlagent status:
exec xp_servicecontrol 'querystate', 'sqlserveragent'
If it returns "stopped" then start the service by:
exec master..xp_servicecontrol N'start', N'sqlserveragent'
"FranklinST_Admin" <FranklinSTAdmin@.discussions.microsoft.com> wrote in
message news:F6293761-0C54-4BB4-B6CD-390A8C27C584@.microsoft.com...
> Hello all,
> I am by no means a SLQ admin/DBA I am the Layer2/3 network admin who
> somehow
> got thrown into figuring out how to fix an issue on one of our production
> servers. We have a machine that is regularly rebooted (this is a whole
> 'nother story) and at times when it comes back on it does not start the
> sqlserver service.
> I was wondering if anyone knew how to right a batch file that would
> regularly check, say every 15min, to see if the service was running, and
> if
> not to star it.
> Any help or even a nudge in the right direction would be ever so
> appreciated.

Auto starting the sqlserver service

Hello all,
I am by no means a SLQ admin/DBA I am the Layer2/3 network admin who somehow
got thrown into figuring out how to fix an issue on one of our production
servers. We have a machine that is regularly rebooted (this is a whole
'nother story) and at times when it comes back on it does not start the
sqlserver service.
I was wondering if anyone knew how to right a batch file that would
regularly check, say every 15min, to see if the service was running, and if
not to star it.
Any help or even a nudge in the right direction would be ever so appreciated.go to start-->run-->services.msc-->look for MSSQLSERVER and double
click on that-->change the startup type to Automatic...|||It has been verified to be set at automatic. For some reason the
sqlserveragent does not start at bootup on occasion. If we go into the
services panel and right click "start" the service will come up fine. But
unfortunatly we do not know until the end user complains.
We are currently implementing MOM which may help us monitor when the service
is not running.
"Shadow" wrote:
> go to start-->run-->services.msc-->look for MSSQLSERVER and double
> click on that-->change the startup type to Automatic...
>|||Use this to check the sqlagent status:
exec xp_servicecontrol 'querystate', 'sqlserveragent'
If it returns "stopped" then start the service by:
exec master..xp_servicecontrol N'start', N'sqlserveragent'
"FranklinST_Admin" <FranklinSTAdmin@.discussions.microsoft.com> wrote in
message news:F6293761-0C54-4BB4-B6CD-390A8C27C584@.microsoft.com...
> Hello all,
> I am by no means a SLQ admin/DBA I am the Layer2/3 network admin who
> somehow
> got thrown into figuring out how to fix an issue on one of our production
> servers. We have a machine that is regularly rebooted (this is a whole
> 'nother story) and at times when it comes back on it does not start the
> sqlserver service.
> I was wondering if anyone knew how to right a batch file that would
> regularly check, say every 15min, to see if the service was running, and
> if
> not to star it.
> Any help or even a nudge in the right direction would be ever so
> appreciated.

Sunday, February 12, 2012

auto indexes

Using sp_helpindexes on a table, I found some indexes that is auto created
by SQLServer. The indexes' name all started with hind_. Does anyone know
what database options cause the server auto creating these indexes?
Thanks,
LijunThey are not indexes, they are statistics and are normal. They get created
automatically by the engine if you have Auto Create Stats turn on (which is
the default) and are nothing to worry about. They are actually a good
thing.
--
Andrew J. Kelly
SQL Server MVP
"Lijun Zhang" <nospam@.nospam.nospam> wrote in message
news:%23XnkwvOYDHA.736@.TK2MSFTNGP09.phx.gbl...
> Using sp_helpindexes on a table, I found some indexes that is auto created
> by SQLServer. The indexes' name all started with hind_. Does anyone know
> what database options cause the server auto creating these indexes?
> Thanks,
> Lijun
>|||These are created by the Index Tuning Wizard
FIX: Index Tuning Wizard Fails to Remove Hypothetical Clustered Indexes
http://support.microsoft.com/default.aspx?scid=kb;en-us;290414
BUG: Hypothetical Clustered Index From Index Tuning Wizard May Cause
Recompile Loop
http://support.microsoft.com/default.aspx?scid=kb;EN-US;293177
--
HTH
Jasper Smith (SQL Server MVP)
I support PASS - the definitive, global
community for SQL Server professionals -
http://www.sqlpass.org
"Lijun Zhang" <nospam@.nospam.nospam> wrote in message
news:%23XnkwvOYDHA.736@.TK2MSFTNGP09.phx.gbl...
Using sp_helpindexes on a table, I found some indexes that is auto created
by SQLServer. The indexes' name all started with hind_. Does anyone know
what database options cause the server auto creating these indexes?
Thanks,
Lijun|||That's twice so far today I spaced out when reading a post. Jasper and
Wayne are or coarse correct. Statistics show up as _WA_...
--
Andrew J. Kelly
SQL Server MVP
"Andrew J. Kelly" <sqlmvpnooospam@.shadhawk.com> wrote in message
news:ewXNZKPYDHA.2384@.tk2msftngp13.phx.gbl...
> They are not indexes, they are statistics and are normal. They get
created
> automatically by the engine if you have Auto Create Stats turn on (which
is
> the default) and are nothing to worry about. They are actually a good
> thing.
> --
> Andrew J. Kelly
> SQL Server MVP
>
> "Lijun Zhang" <nospam@.nospam.nospam> wrote in message
> news:%23XnkwvOYDHA.736@.TK2MSFTNGP09.phx.gbl...
> > Using sp_helpindexes on a table, I found some indexes that is auto
created
> > by SQLServer. The indexes' name all started with hind_. Does anyone know
> > what database options cause the server auto creating these indexes?
> >
> > Thanks,
> > Lijun
> >
> >
>

auto increment in SServer 2005

I want to create a table under sqlserver 2005 with a primary key field as: auto increment concatenated with with the current year.

example:

For year 2007, the primary key field must be like:

02007

12007

22007
.
.
.
3652007
For year 2008, the primary key field must be like:
02008
12008
32008
.
.
.
3652008
etc

Can you help to do it.

Thanks.

HI!,

Sorry for the blank post, my suggestion is to do it from front end. Since you can't use auto number, If you are using stored procedure for inserting then you can keep the logic inside it also.

Hope this will help

auto increment datatype

Hi,
Do we have "Auto Increment" DateType in SQLServer 2000?
Thanks for help.
Jason
Hi Jason
It's not a datatype, it's a property of any exact numeric column. Look up
IDENTITY in the Books Online
HTH
Kalen Delaney, SQL Server MVP
www.solidqualitylearning.com
"Jason Huang" <JasonHuang8888@.hotmail.com> wrote in message
news:uOidWGJ9FHA.1420@.TK2MSFTNGP09.phx.gbl...
> Hi,
> Do we have "Auto Increment" DateType in SQLServer 2000?
> Thanks for help.
>
> Jason
>

auto increment datatype

Hi,
Do we have "Auto Increment" DateType in SQLServer 2000?
Thanks for help.
JasonHi Jason
It's not a datatype, it's a property of any exact numeric column. Look up
IDENTITY in the Books Online
HTH
Kalen Delaney, SQL Server MVP
www.solidqualitylearning.com
"Jason Huang" <JasonHuang8888@.hotmail.com> wrote in message
news:uOidWGJ9FHA.1420@.TK2MSFTNGP09.phx.gbl...
> Hi,
> Do we have "Auto Increment" DateType in SQLServer 2000?
> Thanks for help.
>
> Jason
>

auto increment datatype

Hi,
Do we have "Auto Increment" DateType in SQLServer 2000?
Thanks for help.
JasonHi Jason
It's not a datatype, it's a property of any exact numeric column. Look up
IDENTITY in the Books Online
--
HTH
Kalen Delaney, SQL Server MVP
www.solidqualitylearning.com
"Jason Huang" <JasonHuang8888@.hotmail.com> wrote in message
news:uOidWGJ9FHA.1420@.TK2MSFTNGP09.phx.gbl...
> Hi,
> Do we have "Auto Increment" DateType in SQLServer 2000?
> Thanks for help.
>
> Jason
>

auto increament

how to auto increament fieldname id which is set as a primary key in sqlserver 2005 inasp.net2.0

You can't really do this from within ASP.NET. The only real way to do this is to change your key to be an identity field within SQL server.

Auto importing files

Hi, I am running sqlserver and I have a directory taking file dumps, what I need to do is have the database auto import the file into a table, but I want to avoid using asp.net (I had considered using a filecatcher), I want to limit what I use to VB or sqlserver components so other people in my area can also support it.

any help or pointers in the right direction would be appreciated.

which version of sql server you have? if its sql server 2000 you can try DTS and if its 2005 try 2005. BTB what type of file you receive?

Madhu

|||I am using 2005|||

Hope its not Express. if its express SSIS will not work. otherwise , you can create SSIS for file porting and you can schedule as u want using sql server job

Madhu