title: Create SQL Job that runs for different databases in the same server
body: <p>I am using <code>SQL Server 2008 R2</code>. I have different <code>five databases on the same server.</code> The <code>tables and stored procedure schema of all of them are the same</code> but the <code>data are different</code> as I have pointed them to different sites. Now, I want to create an <code>sql job</code> that runs at 9:30 pm everyday. And get data from database tables and store it to a temporary table. And one more sql job that writes the temporary table's data to LOG file. </p>
  
  <p>I have created <code>two different stored procedures</code> for this -One fetches data and other writes it, and both are working OK for each database. </p>
  
  <p>But the issue is, In sql server agent I don't want to create 2 SQL jobs for each database that gets the store procedure name and execute it (Total 10 sql jobs). Instead of that, I want to create <code>ONLY TWO SQL JOBS</code>. One will execute the stored procedure to fetch data into temporary tables and the other will be executed after the first completed and write data into log files for each database's saperate directory in the server. </p>
  
  <p>As, I have the same stored procedure names and table names in the all five databases, is it possible? </p>