I need to create an audit to track all CRUD events for all the tables in a database ,
now i have more than 100 tables in the DB , is there a way to create the specification which will include all the tables in the DB ?
P.S : I am using SQL Server 2008
...
I have 3 tables (lets call them Foo, Bar and Baz.
Tables:
Foo
FooId
Bar
BarId
FooId
Baz
BazId
BarId
AnotherValue
Obviously the foreign keys make it so that each Baz is associated with a Bar, and hence, associated with a Foo.
Now I want to ensure that for each set of Baz with the same "AnotherValue" all the associated Foo's ...
how to add an exam booking audit trail to the database, where we can determine when and who has uploaded exam results
...
Hello,
i aked myself if it is possible in MS SQL-Server 2005 to get information of a running stored procedure. Because meanwhile it is executing for more than 8 hours, i would like to know on what step it is or if it is even actually running at all. MS SSMS says that it is still executing the query.
Thanks in advance,
Tim
...
Can I use sql bulk copy to copy data within the same server ?
...
Using T-SQL, I'm trying to find the easiest way to make:
"abc.def.ghi/jkl" become "abc/def/ghi.jkl"?
Basically switch the . and /
Thank you
...
Hi,
I have a table which have more than 380 million records....
I have a stored procedure which
1. Delete some records in that
2. Insert something into it.
The total procedure takes around 30 minutes to execute. Out of this DELETE takes 28 minutes.
Delete is a simple statement -> Delete a where condition_1 AND condition_2 AND c...
Table Capture image : http://img844.imageshack.us/img844/6213/99730337.jpg
------------ PositionTable------------
ID ContentFK Position
11 100 1
12 101 1
13 104 2
14 102 2
15 103 2
16 105 3
17 106 3
18 1...
I have installed SQL server 08 express edition and then tried to connect using SQL server management studio, but getting below error:
TITLE: Connect to Server
Cannot connect to My-PC\SQLSERVER.
------------------------------ ADDITIONAL INFORMATION:
A network-related or instance-specific
error occurred while establish...
I'm working on data migration from an old IBM Universe-based system to a new enterprise-level data-information management system, and learning about database design in the process.
I took a look at the back-end database structure of the new system (it's a MS SQL DB, with about 100 tables), and find some things pretty odd. But I don't k...
Hi Folks
I understand that Composite Indexes are always used Left to Right (e.g. if an Index was on City, State, WHERE City = "Blah" or WHERE City = "Blah" AND State = "AA" would work fine but WHERE State = "AA" would not).
Does this same principle apply to INCLUDE indexes?
Thanks in advance!
Clay
...
I have SQL 2005 Express installed. I then installed SQL Server 2008 R2 and am running both instances successfully. They are named:
COMPUTERNAME\SQLEXPRESS (2005)
COMPUTERNAME\INSTALL2 (2008)
I am trying to figure out how to specify the 2008 instance as the default server. I have tried:
Data Source=.\local; ...
Data Source=.; ...
Da...
On our dev boxes, our database resides entirely in the PRIMARY filegroup, and everything works fine.
On one of our production servers, recently upgraded from 2005 to 2008, we noticed it was performing slower than it should. On this machine, there are two filegroups - PRIMARY and INDEXES. Both filegroups contain 1 file per logical vo...
I need to Extract data from a SQL repository Process It and then save it in 2nd Repository.
Nature of data:
Transfer selected users data, though the tables are similar in both repository but not same,
and some amount of processing needs to be done on the data to be transferred.
The volume data is very large 5,00,000.
What technique ...
I am using my custom CSVDataReader : IDataReader {} to insert Bulk values in a Database table.
Every datatype but the Bit (from "1"/"0") is parsed perfectly. I am getting the following error
" value of type String from the data source cannot be converted to type bit" while parsing 0 or 1 as bool
If I change these values to "true"/"fal...
What is the best way to create Sql Server tables from business objects. For example I'm writing an application that has a user object to store user information. What's the best practice for creating tables from these objects? Create the objects first and then define the database or is there a tool to transform business objects into table...
Writing a stored procedure in MS SQL Server 2008 R2, I want to avoid using DSQL...
I would like the sort method (ASC or DESC) to be conditional.
Now, with a numeric column I would simply use a case statement and negate the value to emulate ASC or DESC...
That is:
... ORDER BY CASE @OrderAscOrDesc WHEN 0 THEN [NumericColumn] ELSE -[Num...
What kind of basic management/audit scripts do you run in your databases or in an instance? There may be lots of them, but I would like to know (get hints) what kind of task would be most valuable when managing databases or an instance. And also what kind of reporting do you have from your databases (in a management perspective)?
...
I have a table called Animals. I pull data from this table to populate another system.
I get Excel data with lists of animals that need to go in the Animals table.
The Excel data will also have other identifiers, like Breed, Color, Age, Favorite Toy, Veterinarian, etc.
These identifiers will change with each new excel file. Some may...
I want to know if any tools exist to explore the data in a relational database, and to drill through master-detail relationships.
I already know how to view the data in a single table, and I know how to construct SQL queries that JOIN tables. However, to get N-levels deep, I have to write a SQL statement, find the ID of the item I'm in...