Results 1 to 7 of 7
  1. #1
    Join Date
    Sep 2006
    Posts
    4

    Unanswered: pull subscription

    My name is Tech guy,

    I want to use window script program to execute a pull subscription installed on SQL 2005 express edition. Because it free for downloand.
    is there a script that can call an existing pull subscription execution.

  2. #2
    Join Date
    Jan 2006
    Location
    USA
    Posts
    115
    I want to use window script program to execute a pull subscription installed on SQL 2005 express edition.
    Do you mean VB or Java script...?

    Using Enterprise Manager you can generate a SQL script.

    select Pull Subscription -> Press Right Hand Key -> Generate SQL Script.

    Modify script for subscriber name, subscriber DB etc.
    Rajesh Patel

    Everybody says - mistake is the first step of success, but it's not true. The correction of the mistake is the first step of success.

  3. #3
    Join Date
    Sep 2006
    Posts
    4

    execute pull subscription package from window

    thanks Rajesh for replying my question.
    Here is the problem. I created a pull subscription and pull subscription script file in SQL 2005 Management express. but the express does not have option to run a schedule job. I want to create a vb script to run that pull subscription script file. I cannot find a command for execute the pull subscription package in vb script.
    example:
    dim objserver
    set objserver = createobject("SQLDMO.SQLserver")
    obvjserver.loginsecure = true
    objserver.connect "."
    objserver.script, "myPullSubscription.sql"
    set objserver = nothing

    I need a vb command to execute mypullscubscription.sql because the one I used above does not work.

  4. #4
    Join Date
    May 2004
    Location
    Seattle
    Posts
    1,313
    You could launch osql.exe (or sqlcmd.exe in 2005) to execute any .sql script from a shell script.

  5. #5
    Join Date
    Sep 2006
    Posts
    4

    osql

    Can you give me an example script using osql to execute a pull subscription file. do I need to log on SQL management in order to run qsql?

  6. #6
    Join Date
    May 2004
    Location
    Seattle
    Posts
    1,313
    there are many resources on the net for osql. just google "osql syntax". Here's an example:

    http://www.sql-server-performance.com/rd_osql.asp

    it's a console app that you can use to execute arbitrary scripts. If you are on 2005, use sqlcmd.exe though. it's better.

  7. #7
    Join Date
    Jan 2006
    Location
    USA
    Posts
    115
    Using osql you can run any TSQL script, it's command prompt utility. You can refer Books OnLine from Query Analyzer.
    Rajesh Patel

    Everybody says - mistake is the first step of success, but it's not true. The correction of the mistake is the first step of success.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •