Author |
Topic |
Willio
Starting Member
20 Posts |
Posted - 2007-07-04 : 07:07:36
|
Hello all,I'v got a database full with an administration. This database needs to be protected and can not be accessed from the internet. Now we are making an internetpage for the employees and i want to read from the database who's working here.For the security i want to copy some database data from one database to another... Is that possible? With a script ore something?Thanks i advance!Willio |
|
coolerbob
Aged Yak Warrior
841 Posts |
Posted - 2007-07-04 : 08:09:58
|
Dear oh dear,Right-mouse click on databaseTasks/Export Data |
 |
|
Willio
Starting Member
20 Posts |
Posted - 2007-07-04 : 08:45:41
|
quote: Originally posted by coolerbobRight-mouse click on databaseTasks/Export Data
Should say that it's oke. But then i think i forgot to give some information. I needs to be done on the moment something change in the employee table. So I have to write some kind of a trigger.... |
 |
|
coolerbob
Aged Yak Warrior
841 Posts |
Posted - 2007-07-04 : 11:26:37
|
tilt! |
 |
|
Willio
Starting Member
20 Posts |
Posted - 2007-07-05 : 05:56:12
|
Could you be more specific?? :-) |
 |
|
Carat
Yak Posting Veteran
92 Posts |
Posted - 2007-07-05 : 06:01:22
|
You have to create a trigger on the table where the data is updated.CREATE TRIGGER dbo.TestTrigger ON schema.TableName AFTER UPDATEAS---------------Statements---------------You can use the tables deleted and inserted to control whether a row has changed . |
 |
|
coolerbob
Aged Yak Warrior
841 Posts |
Posted - 2007-07-05 : 12:16:05
|
quote: Originally posted by Willio Could you be more specific?? :-)
Tilt is what you do on a Pinball machine when you're in trouble.It's an expression for when you're in trouble.Newbies should not muck around with triggers - I can say that from my own experience.Does the data need to be copied instantly or can you do it nightly? |
 |
|
Willio
Starting Member
20 Posts |
Posted - 2007-07-11 : 04:02:02
|
Yes oke and how do i get data to another database.What will be the statement if i have 2 databases with the table employee and i want to copy it.Greetingsb.t.w. it could be done over night but better is instantly... |
 |
|
rmiao
Master Smack Fu Yak Hacker
7266 Posts |
Posted - 2007-07-11 : 12:48:57
|
Can you use replication? |
 |
|
Willio
Starting Member
20 Posts |
Posted - 2007-07-12 : 07:58:38
|
quote: Originally posted by rmiao Can you use replication?
If i can trigger the replication and can choose which fields i can replicate.I will look in to it!Any other suggestions? :DThanks!Edit: Seems like an replication is a copy of an complete table / database. And now i am looking into problem i would like to preform a query and write the result in another database. The database will be on the same server. That should make it a bit easier right?? |
 |
|
rmiao
Master Smack Fu Yak Hacker
7266 Posts |
Posted - 2007-07-13 : 18:27:35
|
No, you can choose tables and columns to replicate. |
 |
|
|