Ask a Question related to Coldfusion Database Access, Design and Development.
-
Mattastic #1
sql server - automated task
Hi,
Is there anyway I can tell SQL server, to update a table in one db, with info
from a table in a diffferent db, each morning at a set time?
Currently I use scheduled tasks in CF, I would like to do all this in SQL
server though if possible.
Thankyou
Mattastic Guest
-
sql server and asp.net and automated payments
hi,, everybody i have an asp.net application, where members (clients) have their information stored in sql server Database. Now I want to... -
Cannot End Task w/Task Manager
I had a crash of FrameMaker, and Task Mgr would not end the task. It went through the routine (hour glass followed by offer to send report to... -
XP Home Networking (Not Enough Server Space To Complete The Task)
I have 4 XP Home machines. They all can see each other. They all can share printers. They all have permissions and log ons set. If you try to... -
block "new task" on task manager
We are limiting access to what a patron in the library can run from our pc's. We used gpedit and taskbar features to hide the run command and to... -
automated response
Hi... Just wanted to let you know we received your message. Corey and Jay http://www.coreyandjayshow.com... -
PaulH *ACE* #2
Re: sql server - automated task
Mattastic wrote:
schedule a job via enterprise manager. under management, sql server agent (which> Hi,
>
> Is there anyway I can tell SQL server, to update a table in one db, with info
> from a table in a diffferent db, each morning at a set time?
needs to be running to use the scheduler). it's pretty straight forward.
PaulH *ACE* Guest
-
Mattastic #3
Re: sql server - automated task
Thanks for your reply.
However, when I start a new job, I can only select tables from my current db, do you know how i can select a table from a different db?
Thankyou
Mattastic Guest
-
PaulH *ACE* #4
Re: sql server - automated task
Mattastic wrote:
how are you doing it now? just stuff your sql into each step you need. if you're> However, when I start a new job, I can only select tables from my current db, do you know how i can select a table from a different db?
doing it via cf (ie using cfoutput over cfquery) post your code.
PaulH *ACE* Guest
-
Mattastic #5
Re: sql server - automated task
I can figure out how to do it within a single db, table to table.
But, i have db on a different server, Im not sure how i can get data from that.
Thanks again
Mattastic Guest
-
PaulH *ACE* #6
Re: sql server - automated task
Mattastic wrote:
as long as you have a user w/permissions & this is on the same sql server, the> I can figure out how to do it within a single db, table to table.
>
> But, i have db on a different server, Im not sure how i can get data from that.
syntax is always the same:
dbName.dbOwner.tableName
SELECT name,accountBalance
FROM customer
INNER JOIN otherDB.dbo.accounting
ON customer.customerID = otherDB.dbo.accounting.customerID
PaulH *ACE* Guest
-
PaulH *ACE* #7
Re: sql server - automated task
Mattastic wrote:
messages seem to be doubling up....oh well, trying again.> But, i have db on a different server, Im not sure how i can get data from that.
as long as you have a user w/permissions & this is on the same sql server, the
syntax is always the same:
dbName.dbOwner.tableName
SELECT name,accountBalance
FROM customer
INNER JOIN otherDB.dbo.accounting
ON customer.customerID = otherDB.dbo.accounting.customerID
PaulH *ACE* Guest
-
philh #8
Re: sql server - automated task
If the tables are on separate instances or separate physical servers, the only
way to do this is to create a link server entry, which you can refer to in your
SQL statements through four-part naming.
So, if I have two servers, SQL1 and SQL2, and I want to update a table in SQL2
with data from SQL1, I would create a link server on SQL2 that points to SQL1.
Then a scheduled job can do operations on both servers, e.g.
INSERT INTO sql2.mydb.dbo.mytable
SELECT * from sql1.mydb.dbo.mytable
WHERE ....
But, seriously, if you need to update the target server on a regular basis,
use replication. That's what it's there for.
philh Guest



Reply With Quote

