Showing posts with label time. Show all posts
Showing posts with label time. Show all posts

Thursday, March 29, 2012

Database startup time

Is it possible to find somewhere in the system table time of sql server startup?

Thanks

Hi, as the tempdb is created at very startup of the SQL Server service you can check the information on

sp_helpdb tempdb

HTH, Jens Suessmeyer,

http://www.sqlserver2005.de

sql

Monday, March 19, 2012

Database Seal: Transaction Log Backup, error in translog backup

I have changed the time for the maintenanceplan but i still get the same
message, could it be something wrong with the database?
a part from the last backuplog:
[31] Database SPS01_Config_db: Transaction Log Backup...
Destination: [D:\Program Files\Microsoft SQL
Server\MSSQL\BACKUP\SPS01_Config_db\SPS01_Config_db_tlog_200505100115.TRN]
** Execution Time: 0 hrs, 0 mins, 1 secs **
[32] Database SPS01_Config_db: Verifying Backup...
** Execution Time: 0 hrs, 0 mins, 1 secs **
Backup can not be performed on database 'VirtualCenter'. This sub task is
ignored.
End of maintenance plan 'UserDBs' on 2005-05-10 01:15:20
SQLMAINT.EXE Process Exit Code: 1 (Failed)You can not perform a transaction log backup on a database that uses the
simple recovery model. Set your database to either the full or bulk_logged
recovery model and you can make transaction log backups.
--
Jacco Schalkwijk
SQL Server MVP
"Biowaste" <Biowaste@.discussions.microsoft.com> wrote in message
news:35E8E641-6689-461A-A12C-CF1E69C08B8A@.microsoft.com...
>I have changed the time for the maintenanceplan but i still get the same
> message, could it be something wrong with the database?
> a part from the last backuplog:
> [31] Database SPS01_Config_db: Transaction Log Backup...
> Destination: [D:\Program Files\Microsoft SQL
> Server\MSSQL\BACKUP\SPS01_Config_db\SPS01_Config_db_tlog_200505100115.TRN]
> ** Execution Time: 0 hrs, 0 mins, 1 secs **
> [32] Database SPS01_Config_db: Verifying Backup...
> ** Execution Time: 0 hrs, 0 mins, 1 secs **
> Backup can not be performed on database 'VirtualCenter'. This sub task is
> ignored.
> End of maintenance plan 'UserDBs' on 2005-05-10 01:15:20
> SQLMAINT.EXE Process Exit Code: 1 (Failed)
>|||How and where do I change that in the maint. plan?
this has worked in the past... just a few weaks ago.
how come it is only one db that fails?
"Jacco Schalkwijk" wrote:
> You can not perform a transaction log backup on a database that uses the
> simple recovery model. Set your database to either the full or bulk_logged
> recovery model and you can make transaction log backups.
> --
> Jacco Schalkwijk
> SQL Server MVP
>
> "Biowaste" <Biowaste@.discussions.microsoft.com> wrote in message
> news:35E8E641-6689-461A-A12C-CF1E69C08B8A@.microsoft.com...
> >I have changed the time for the maintenanceplan but i still get the same
> > message, could it be something wrong with the database?
> >
> > a part from the last backuplog:
> > [31] Database SPS01_Config_db: Transaction Log Backup...
> > Destination: [D:\Program Files\Microsoft SQL
> > Server\MSSQL\BACKUP\SPS01_Config_db\SPS01_Config_db_tlog_200505100115.TRN]
> >
> > ** Execution Time: 0 hrs, 0 mins, 1 secs **
> >
> > [32] Database SPS01_Config_db: Verifying Backup...
> >
> > ** Execution Time: 0 hrs, 0 mins, 1 secs **
> >
> > Backup can not be performed on database 'VirtualCenter'. This sub task is
> > ignored.
> >
> > End of maintenance plan 'UserDBs' on 2005-05-10 01:15:20
> > SQLMAINT.EXE Process Exit Code: 1 (Failed)
> >
>
>|||This is a database option, not something you set in the maint plan. EM, right-click the database,
properties, options.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Biowaste" <kalmeborg@.hotmail.com> wrote in message
news:85A3F0C2-62B8-47E2-B424-09A2B5B245A4@.microsoft.com...
> How and where do I change that in the maint. plan?
> this has worked in the past... just a few weaks ago.
> how come it is only one db that fails?
> "Jacco Schalkwijk" wrote:
>> You can not perform a transaction log backup on a database that uses the
>> simple recovery model. Set your database to either the full or bulk_logged
>> recovery model and you can make transaction log backups.
>> --
>> Jacco Schalkwijk
>> SQL Server MVP
>>
>> "Biowaste" <Biowaste@.discussions.microsoft.com> wrote in message
>> news:35E8E641-6689-461A-A12C-CF1E69C08B8A@.microsoft.com...
>> >I have changed the time for the maintenanceplan but i still get the same
>> > message, could it be something wrong with the database?
>> >
>> > a part from the last backuplog:
>> > [31] Database SPS01_Config_db: Transaction Log Backup...
>> > Destination: [D:\Program Files\Microsoft SQL
>> > Server\MSSQL\BACKUP\SPS01_Config_db\SPS01_Config_db_tlog_200505100115.TRN]
>> >
>> > ** Execution Time: 0 hrs, 0 mins, 1 secs **
>> >
>> > [32] Database SPS01_Config_db: Verifying Backup...
>> >
>> > ** Execution Time: 0 hrs, 0 mins, 1 secs **
>> >
>> > Backup can not be performed on database 'VirtualCenter'. This sub task is
>> > ignored.
>> >
>> > End of maintenance plan 'UserDBs' on 2005-05-10 01:15:20
>> > SQLMAINT.EXE Process Exit Code: 1 (Failed)
>> >
>>

Database Seal: Transaction Log Backup, error in translog backup

I have changed the time for the maintenanceplan but i still get the same
message, could it be something wrong with the database?
a part from the last backuplog:
[31] Database SPS01_Config_db: Transaction Log Backup...
Destination: [D:\Program Files\Microsoft SQL
Server\MSSQL\BACKUP\SPS01_Config_db\SPS01_Config_d b_tlog_200505100115.TRN]
** Execution Time: 0 hrs, 0 mins, 1 secs **
[32] Database SPS01_Config_db: Verifying Backup...
** Execution Time: 0 hrs, 0 mins, 1 secs **
Backup can not be performed on database 'VirtualCenter'. This sub task is
ignored.
End of maintenance plan 'UserDBs' on 2005-05-10 01:15:20
SQLMAINT.EXE Process Exit Code: 1 (Failed)
You can not perform a transaction log backup on a database that uses the
simple recovery model. Set your database to either the full or bulk_logged
recovery model and you can make transaction log backups.
Jacco Schalkwijk
SQL Server MVP
"Biowaste" <Biowaste@.discussions.microsoft.com> wrote in message
news:35E8E641-6689-461A-A12C-CF1E69C08B8A@.microsoft.com...
>I have changed the time for the maintenanceplan but i still get the same
> message, could it be something wrong with the database?
> a part from the last backuplog:
> [31] Database SPS01_Config_db: Transaction Log Backup...
> Destination: [D:\Program Files\Microsoft SQL
> Server\MSSQL\BACKUP\SPS01_Config_db\SPS01_Config_d b_tlog_200505100115.TRN]
> ** Execution Time: 0 hrs, 0 mins, 1 secs **
> [32] Database SPS01_Config_db: Verifying Backup...
> ** Execution Time: 0 hrs, 0 mins, 1 secs **
> Backup can not be performed on database 'VirtualCenter'. This sub task is
> ignored.
> End of maintenance plan 'UserDBs' on 2005-05-10 01:15:20
> SQLMAINT.EXE Process Exit Code: 1 (Failed)
>

Database Seal: Transaction Log Backup, error in translog backup

I have changed the time for the maintenanceplan but i still get the same
message, could it be something wrong with the database?
a part from the last backuplog:
[31] Database SPS01_Config_db: Transaction Log Backup...
Destination: [D:\Program Files\Microsoft SQL
Server\MSSQL\BACKUP\SPS01_Config_db\SPS0
1_Config_db_tlog_200505100115.TRN]
** Execution Time: 0 hrs, 0 mins, 1 secs **
[32] Database SPS01_Config_db: Verifying Backup...
** Execution Time: 0 hrs, 0 mins, 1 secs **
Backup can not be performed on database 'VirtualCenter'. This sub task is
ignored.
End of maintenance plan 'UserDBs' on 2005-05-10 01:15:20
SQLMAINT.EXE Process Exit Code: 1 (Failed)You can not perform a transaction log backup on a database that uses the
simple recovery model. Set your database to either the full or bulk_logged
recovery model and you can make transaction log backups.
Jacco Schalkwijk
SQL Server MVP
"Biowaste" <Biowaste@.discussions.microsoft.com> wrote in message
news:35E8E641-6689-461A-A12C-CF1E69C08B8A@.microsoft.com...
>I have changed the time for the maintenanceplan but i still get the same
> message, could it be something wrong with the database?
> a part from the last backuplog:
> [31] Database SPS01_Config_db: Transaction Log Backup...
> Destination: [D:\Program Files\Microsoft SQL
> Server\MSSQL\BACKUP\SPS01_Config_db\SPS0
1_Config_db_tlog_200505100115.TRN]
> ** Execution Time: 0 hrs, 0 mins, 1 secs **
> [32] Database SPS01_Config_db: Verifying Backup...
> ** Execution Time: 0 hrs, 0 mins, 1 secs **
> Backup can not be performed on database 'VirtualCenter'. This sub task is
> ignored.
> End of maintenance plan 'UserDBs' on 2005-05-10 01:15:20
> SQLMAINT.EXE Process Exit Code: 1 (Failed)
>

Wednesday, March 7, 2012

Database reporting time differently than system

Hiya,

I have a database on a SQL Server 2000 (sp3a) installation. For some reason it's reporting time that is 7 hours ahead of the system time.

The application is on one server the DB is on a shared production server. The app server and the DB server are reporting the same system time and are using a network time server. All the other db's on the shared production db server are reporting time correctly.

My questions:

Is there a T-SQL query to use to see what the time/timezone is for that database?
Is there a T-SQL query I can use to set the db time (not the system time)?
Anyone have any other suggestions as to what could be wrong?

Thanks in advance for any help!
'cheleIs this from a select getdate() query in QA or the output of some app or stored proc? If app or stored proc, check for date manipulation. SQL Server picks up its time from the serer clock, there is no separate SQL Server clock.


Unless it is using the getutcdate(), which is also derived from the system date / time / time zone setting.

<QUOTE>
GETUTCDATE

Returns the datetime value representing the current UTC time (Universal Time Coordinate or Greenwich Mean Time). The current UTC time is derived from the current local time and the time zone setting in the operating system of the computer on which SQL Server is running.

Syntax

GETUTCDATE()

</QUOTE>|||Thanks for the help.

It's a canned app. Epolicy by McAfee, to be precise. I guess I will go to them for tech support now that I know it's probably not something I did.

Saturday, February 25, 2012

database refreshed using backup restore

Is there a system table or a way that allows you to check
when was the last time the database was refreshed (backup
restored) ? Sysdatabases shows the db creation date.
use msdb
go
select * from restorehistory
go
"J Reyes" <anonymous@.discussions.microsoft.com> wrote in message
news:155501c4f4d0$eb3dd750$a601280a@.phx.gbl...
> Is there a system table or a way that allows you to check
> when was the last time the database was refreshed (backup
> restored) ? Sysdatabases shows the db creation date.
>

database refreshed using backup restore

Is there a system table or a way that allows you to check
when was the last time the database was refreshed (backup
restored) ? Sysdatabases shows the db creation date.use msdb
go
select * from restorehistory
go
"J Reyes" <anonymous@.discussions.microsoft.com> wrote in message
news:155501c4f4d0$eb3dd750$a601280a@.phx.gbl...
> Is there a system table or a way that allows you to check
> when was the last time the database was refreshed (backup
> restored) ? Sysdatabases shows the db creation date.
>

database refreshed using backup restore

Is there a system table or a way that allows you to check
when was the last time the database was refreshed (backup
restored) ? Sysdatabases shows the db creation date.use msdb
go
select * from restorehistory
go
"J Reyes" <anonymous@.discussions.microsoft.com> wrote in message
news:155501c4f4d0$eb3dd750$a601280a@.phx.gbl...
> Is there a system table or a way that allows you to check
> when was the last time the database was refreshed (backup
> restored) ? Sysdatabases shows the db creation date.
>

Friday, February 24, 2012

Database Recovery Model Default value

Hi
I've been using SQL Server 2000 for quite some time. Every new database I
used to add, it would set the Database Recovery option to "Simple". Now
after shifting to SQL Server 2005, this option is being set to "Full" by
default for every new database. Can someone tell me where is this property
inherited from for every new database and can be changed so that each new
database may get default value of Recovery option to "Simple"
Thanks in advance
Usman
It is inherited from the recovery mode of you "model" database.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Usman" <usman@.advcomm.net> wrote in message news:u9mhHeJVGHA.5364@.tk2msftngp13.phx.gbl...
> Hi
> I've been using SQL Server 2000 for quite some time. Every new database I
> used to add, it would set the Database Recovery option to "Simple". Now
> after shifting to SQL Server 2005, this option is being set to "Full" by
> default for every new database. Can someone tell me where is this property
> inherited from for every new database and can be changed so that each new
> database may get default value of Recovery option to "Simple"
> Thanks in advance
> Usman
>

Database Recovery Model Default value

Hi
I've been using SQL Server 2000 for quite some time. Every new database I
used to add, it would set the Database Recovery option to "Simple". Now
after shifting to SQL Server 2005, this option is being set to "Full" by
default for every new database. Can someone tell me where is this property
inherited from for every new database and can be changed so that each new
database may get default value of Recovery option to "Simple"
Thanks in advance
UsmanIt is inherited from the recovery mode of you "model" database.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Usman" <usman@.advcomm.net> wrote in message news:u9mhHeJVGHA.5364@.tk2msftngp13.phx.gbl...[v
bcol=seagreen]
> Hi
> I've been using SQL Server 2000 for quite some time. Every new database I
> used to add, it would set the Database Recovery option to "Simple". Now
> after shifting to SQL Server 2005, this option is being set to "Full" by
> default for every new database. Can someone tell me where is this property
> inherited from for every new database and can be changed so that each new
> database may get default value of Recovery option to "Simple"
> Thanks in advance
> Usman
>[/vbcol]

Database Recovery Model Default value

Hi
I've been using SQL Server 2000 for quite some time. Every new database I
used to add, it would set the Database Recovery option to "Simple". Now
after shifting to SQL Server 2005, this option is being set to "Full" by
default for every new database. Can someone tell me where is this property
inherited from for every new database and can be changed so that each new
database may get default value of Recovery option to "Simple"
Thanks in advance
UsmanIt is inherited from the recovery mode of you "model" database.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Usman" <usman@.advcomm.net> wrote in message news:u9mhHeJVGHA.5364@.tk2msftngp13.phx.gbl...
> Hi
> I've been using SQL Server 2000 for quite some time. Every new database I
> used to add, it would set the Database Recovery option to "Simple". Now
> after shifting to SQL Server 2005, this option is being set to "Full" by
> default for every new database. Can someone tell me where is this property
> inherited from for every new database and can be changed so that each new
> database may get default value of Recovery option to "Simple"
> Thanks in advance
> Usman
>

Sunday, February 19, 2012

Database problems

I am new to ASP.Net so I have a bunch of beginner problems here. My first BIG one is that every time I try and make a database connection in my code, I get

"Login failed for user 'sa'. Reason: Not associated with trusted SQL Server connection"

I know 'sa' is a valid user for the database, and I have retreived data other ways through swlDataAdapters, sqlConnections, and Datasets from design view. Any idea why I cannot expictitly connection to my DB in my code?? Or is there something stupid and small that I am overlooking?

Any help will be greatly appreciated.::Or is there something stupid and small that I am overlooking?

It is, but given the maount of people stumbling over it - you are not alone.

SQL Server simply is set not to look for the password but to use Windows integrated authentication ONLY. In this case access is checked against the account asp.net is running under, which has not enough security rights.

You need to reconfigure SQL Server to use mixed mode authentication, so that the username/password parts of the connection string actually have a real meaning. Especially the password part.

Tuesday, February 14, 2012

Database Optimizations

We have a database that is getting fairly heavy use. Our client complained
that on a certain task it was performing slower than usual. The last time
this happened I manually ran our optimazations job and it fixed the problem.
After that I set up our optimazations job to run every night. This kept
anything from happening for a while but just today we got the same call
again and again it was fixed when I ran the optimazations job. How often
are heavly used databases typically suppose to run the optimizations? Any
help on this topic?
Thanks,
BrandonBrandon Owensby wrote:
> We have a database that is getting fairly heavy use. Our client
> complained that on a certain task it was performing slower than
> usual. The last time this happened I manually ran our optimazations
> job and it fixed the problem. After that I set up our optimazations
> job to run every night. This kept anything from happening for a
> while but just today we got the same call again and again it was
> fixed when I ran the optimazations job. How often are heavly used
> databases typically suppose to run the optimizations? Any help on
> this topic?
> Thanks,
> Brandon
What optimizations? How can you be sure you don't have performance
problems related to query performance? What about disk? CPU? There are a
number of issues that can be the cause. Most times it's the SQL itself.
Properly tuned queries reduce disk and CPU overhead greatly.
--
David Gugick
Imceda Software
www.imceda.com|||Brandon
It is time to start tuning your queries/sp/views. In my experience 80% of
such kind of problems is caused by application (poor written queries).
"Brandon Owensby" <123@.abc.com> wrote in message
news:%23KDUctfvEHA.1392@.TK2MSFTNGP14.phx.gbl...
> We have a database that is getting fairly heavy use. Our client
complained
> that on a certain task it was performing slower than usual. The last time
> this happened I manually ran our optimazations job and it fixed the
problem.
> After that I set up our optimazations job to run every night. This kept
> anything from happening for a while but just today we got the same call
> again and again it was fixed when I ran the optimazations job. How often
> are heavly used databases typically suppose to run the optimizations?
Any
> help on this topic?
> Thanks,
> Brandon
>