Showing posts with label log. Show all posts
Showing posts with label log. Show all posts

Thursday, March 29, 2012

create and attach data base

Hi, i want to create a database with out the LOG file I did not find a way to do that, I want to create database in 2 ways

1. With CREATE DATABASE command.

2.Attach an exsiting MDF file.

is there any way i can do that, my problem is that i'm creating the data base on my local computer the using sp_detach_db to detach the DB files, then trying to attach DB files from remote computer on the LAN that i dont have write premmsion on, but then i get an error from SQL server saying:

"[Microsoft][SQL Native Client][SQL Server]Unable to open the physical file "\\lab11\sqltest\pppSignaling_log.ldf". Operating system error 5: "5(Access is denied.)"."

what can i do to solve this problem?

thanks ishay

More about storage in network path in SQL Server can be found here:

http://support.microsoft.com/kb/304261/en-us

Generally spoken, this is not supported.

HTH, Jens Suessmeyer.

http://www.slqserver2005.de

Create alert for table activity

Is it possible to create an alert to notify a user when a record is added to
a specific table? This is a error log table so the activity would/should be
very minimal.
"doug" <doug@.discussions.microsoft.com> wrote in message
news:44FA91DE-1435-40E3-B5B4-B6C62088678B@.microsoft.com...
> Is it possible to create an alert to notify a user when a record is added
> to
> a specific table? This is a error log table so the activity would/should
> be
> very minimal.
Triger for Insert.
|||doug wrote:
> Is it possible to create an alert to notify a user when a record is
> added to a specific table? This is a error log table so the activity
> would/should be very minimal.
On SQL 2005 you can use an insert trigger with Notification Services. On SQL
2000, you can still use an insert trigger that updates a ntification table.
Then you can create an Agent job that watches that table and sends an email
or page to the proper user.
David Gugick
Quest Software

Create alert for table activity

Is it possible to create an alert to notify a user when a record is added to
a specific table? This is a error log table so the activity would/should be
very minimal."doug" <doug@.discussions.microsoft.com> wrote in message
news:44FA91DE-1435-40E3-B5B4-B6C62088678B@.microsoft.com...
> Is it possible to create an alert to notify a user when a record is added
> to
> a specific table? This is a error log table so the activity would/should
> be
> very minimal.
Triger for Insert.|||doug wrote:
> Is it possible to create an alert to notify a user when a record is
> added to a specific table? This is a error log table so the activity
> would/should be very minimal.
On SQL 2005 you can use an insert trigger with Notification Services. On SQL
2000, you can still use an insert trigger that updates a ntification table.
Then you can create an Agent job that watches that table and sends an email
or page to the proper user.
David Gugick
Quest Software

Create alert for table activity

Is it possible to create an alert to notify a user when a record is added to
a specific table? This is a error log table so the activity would/should be
very minimal."doug" <doug@.discussions.microsoft.com> wrote in message
news:44FA91DE-1435-40E3-B5B4-B6C62088678B@.microsoft.com...
> Is it possible to create an alert to notify a user when a record is added
> to
> a specific table? This is a error log table so the activity would/should
> be
> very minimal.
Triger for Insert.|||doug wrote:
> Is it possible to create an alert to notify a user when a record is
> added to a specific table? This is a error log table so the activity
> would/should be very minimal.
On SQL 2005 you can use an insert trigger with Notification Services. On SQL
2000, you can still use an insert trigger that updates a ntification table.
Then you can create an Agent job that watches that table and sends an email
or page to the proper user.
--
David Gugick
Quest Softwaresql

Thursday, March 22, 2012

Create a log from insert and delete tables

How can I create a log with informations about create and delete tables from
my database?
I use a SQl Server 2000 and Visual Interdev where I can acess all my databas
e
using Data Connection creating, modifying and deleting tables.
I wanna create a log with the information about create and delete tables to
know what is happen in my database.> How can I create a log with informations about create and delete tables
> from
> my database?
> I use a SQl Server 2000 and Visual Interdev where I can acess all my
> database
> using Data Connection creating, modifying and deleting tables.
> I wanna create a log with the information about create and delete tables
> to
> know what is happen in my database.
The SQL Profiler, a tool shipped with SQL Server, is your friend here. Do
please check it in Books OnLine - I think this is what you need.
Dejan Sarka, SQL Server MVP
Mentor, www.SolidQualityLearning.com
Anything written in this message represents solely the point of view of the
sender.
This message does not imply endorsement from Solid Quality Learning, and it
does not represent the point of view of Solid Quality Learning or any other
person, company or institution mentioned in this message

create a log file of a script

I'm am new to using SQL Server. In Oracle, when I create scripts to
manipulate data, I have a log file automatically created from within the
script by issuing the SPOOL command. Is there a similar functionality in SQL
server? besides the log file which records each transaction. Is there any
other way to run a script (automatically) besides cut & paste into SQL query
analyzer?
ThanksLee Ann,
The transaction log for the database is the only automatic record of the
transactions that I'm aware of. You could implement a custom solution using
a trigger/audit table or use a third-party log viewing tool. If you're
trying to test out the command prior to having it automatically commit
(admin type stuff) you can embed the code in a user-defined transaction
(BEGIN TRAN...COMMIT TRAN/ROLLBACK TRAN).

> Is there any other way to run a script (automatically)
You can use schedule a job: T-SQL, schedule a job - DTS, use OSQL and
Windows scheduler, auto-startup procs.
HTH
Jerry
"Lee Ann" <LeeAnn@.discussions.microsoft.com> wrote in message
news:1CA21C9E-3E8B-4265-B7A3-EBF26811AE94@.microsoft.com...
> I'm am new to using SQL Server. In Oracle, when I create scripts to
> manipulate data, I have a log file automatically created from within the
> script by issuing the SPOOL command. Is there a similar functionality in
> SQL
> server? besides the log file which records each transaction. Is there any
> other way to run a script (automatically) besides cut & paste into SQL
> query
> analyzer?
> Thanks|||Lee Ann,
One other approach would be to add auditing code (INSERTs and PRINTs) into
your original script.
HTH
Jerry
"Jerry Spivey" <jspivey@.vestas-awt.com> wrote in message
news:Ovq8PAqyFHA.1856@.TK2MSFTNGP12.phx.gbl...
> Lee Ann,
> The transaction log for the database is the only automatic record of the
> transactions that I'm aware of. You could implement a custom solution
> using a trigger/audit table or use a third-party log viewing tool. If
> you're trying to test out the command prior to having it automatically
> commit (admin type stuff) you can embed the code in a user-defined
> transaction (BEGIN TRAN...COMMIT TRAN/ROLLBACK TRAN).
>
> You can use schedule a job: T-SQL, schedule a job - DTS, use OSQL and
> Windows scheduler, auto-startup procs.
> HTH
> Jerry
> "Lee Ann" <LeeAnn@.discussions.microsoft.com> wrote in message
> news:1CA21C9E-3E8B-4265-B7A3-EBF26811AE94@.microsoft.com...
>|||Thanks Jerry...I will go and read up on your suggestions and then try it
out.
Lee Ann
"Jerry Spivey" wrote:

> Lee Ann,
> One other approach would be to add auditing code (INSERTs and PRINTs) into
> your original script.
> HTH
> Jerry
> "Jerry Spivey" <jspivey@.vestas-awt.com> wrote in message
> news:Ovq8PAqyFHA.1856@.TK2MSFTNGP12.phx.gbl...
>
>sql

Create a DTS package to retrieve records from db & schedule to send the email at

hi,
i would like to create a DTS package to retrieve records from database , this records i retrieve is from the error log table ( ERROR_LOG_TB),the scheduler will run at 9 am daily and will retrieve the records if there is a error and the error information will be capsulate and sent through email.
Can i know how to know how to graphically do in DTS ? i am running SQL Server 2000.The thing that you are looking for can be done thru a "execute sql task" and using xp_sendmail. do you have any prior experience with DTS?
-rohit|||i got some prior experience in DTS but jus not sure how to do this in graphically . programming wise i know how to do it , i just want to get some knowledge how to do it in DTS|||Get in touch with http://www.sqldts.com website which has got plenty of DTS resources and code examples.

Also refer to books online for information about DTS as a first hand help.sql

Wednesday, March 7, 2012

CPU messages in log

Running x64 AMD procs and receive the following types of messages in our SQL
log
The time stamp counter of CPU on scheduler id 3 is not synchronized with
other CPUs.
I have seen a lot of postings about this, but have not been lucky to stop
it.
Do we know what the latest is on this and what the actual fix is if any ?
ThanksSee http://support.microsoft.com/kb/931279
Linchi
"Hassan" wrote:
> Running x64 AMD procs and receive the following types of messages in our SQL
> log
> The time stamp counter of CPU on scheduler id 3 is not synchronized with
> other CPUs.
> I have seen a lot of postings about this, but have not been lucky to stop
> it.
> Do we know what the latest is on this and what the actual fix is if any ?
> Thanks
>
>|||See the workaround section of this article:
http://support.microsoft.com/kb/931279
HTH,
Plamen Ratchev
http://www.SQLStudio.com|||we tried those and they still pop up.
Have you guys used those workarounds and made them disappear ?
Its not annoying so far, but was curious to know.
"Plamen Ratchev" <Plamen@.SQLStudio.com> wrote in message
news:B633FD5B-849E-45AD-8F4A-6F1BADEC302A@.microsoft.com...
> See the workaround section of this article:
> http://support.microsoft.com/kb/931279
> HTH,
> Plamen Ratchev
> http://www.SQLStudio.com|||I have seen this happen only once on a development machine and disabling CPU
frequency variation in BIOS did the trick.
Plamen Ratchev
http://www.SQLStudio.com|||We never tried to make the messages go away since having the messages is a
minor annoyance. I probably won't try it unless the clock drift starts to
cause real problem for the SQL trace metrics.
Linchi
"Hassan" wrote:
> we tried those and they still pop up.
> Have you guys used those workarounds and made them disappear ?
> Its not annoying so far, but was curious to know.
> "Plamen Ratchev" <Plamen@.SQLStudio.com> wrote in message
> news:B633FD5B-849E-45AD-8F4A-6F1BADEC302A@.microsoft.com...
> > See the workaround section of this article:
> > http://support.microsoft.com/kb/931279
> >
> > HTH,
> >
> > Plamen Ratchev
> > http://www.SQLStudio.com
>
>