How to implement & run VBScript within SQL 2008?

Hello what are the steps to implement/configure a VBScript (with .config file) with SQL 2008?
(The VBScript file is a sync process that does DMLs within the SQL Server DB that it's on and also updates data on an exterior DB.)
(Perhaps within a Stored Procedure-Job best way?)
Thanks in advance.

Although you could probably accomplish this with a SQLCLR proc, my opinion is an ETL process is better suited for SSIS.  I suggest a job that executes an SSIS package with a Script task.  You can use SSIS configurations to pass the configurable
value to the script at run time via package variables. 
Dan Guzman, SQL Server MVP, http://www.dbdelta.com

Similar Messages

  • How to uninstall Reporting Services on SQL 2008 R2?

    Hi folks,
      Does anyone know how to uninstall (and intall) Reporting Services without uninstalling SQL server.   I have a reporting Services Instance that has gone wrong (Virtual Directories do not exist in IIS) and the RS Configuration tool will not
    let me create a new set of directories (Option remains greyed out).
    The SQL Server Repair option did not work when I tried that.

    Hi AndyW2007,
    From SQL Server Reporting Services(SSRS) 2008, the SSRS is Internet Information Server(IIS) independence. This means there is no directory for Reporting Services under IIS.
    In this case, please make sure the SSRS service is running, otherwise, we are not able to configure the Web Service URL and the Report Manager URL(means configuring the virtual directories). 
    Anyway, in order to uninstall SQL Server Reporting Services without uninstalling other SQL Server components, please follow this guide:
    In Add/Remove programs
    Click the 'Uninstall/Change' button for "SQL Server 2008 R2"
    In the coming dialog, click 'Remove'
    Click 'OK'
    In the 'Select Instance' dialog,  select the appropriate instance, and then click 'Next'
    In the 'Select Features' dialog, please only select 'Reporting Services'
    Then click 'Next' and 'Next' till the uninstalling process starting
    If you have any more questions, please feel free to ask.
    Thanks,
    Jin Chen
    Jin Chen - MSFT

  • How can implement running total in oracle forms

    I want to implement a running total in oracle form
    like
    100 100
    300 400
    200 600
    500 1100
    200 1300
    100 1400
    PROCEDURE calculate_srno IS
    current_rownum     integer:=:System.Cursor_Record;
    starting_srno integer:=:rs_1;
    last_rownum integer;
    BEGIN
         last_record;
         last_rownum:=:system.cursor_record;
         go_record(1);
         FOR counter IN 1..last_rownum LOOP
              :sum_1:=:rs_1;
              :rs_1:=:sum_1+:rs_1;
         --     :offered_srno_to:=starting_srno;
              if last_rownum=:System.Cursor_Record then exit;
              end if;
         END LOOP;
    END;
    it is not working after want to insert between in the table

    Why write code for this? Oracle Forms 10g has Calculated/Summary fields that will do this for you without the need of writing any PL/SQL.
    Simply add a non-table item to the data block with the item you want to keep the running total for. Then change the following properties of the item:
    Data Type: Number
    Calculation Mode: Summary
    Summary Function: Sum
    Summarized Block: <Your Data Block>
    Summarized Item: <Your Block Item>
    Number of Items Displayed: 1 (if your item is in a Multi-Record (Tabular) layout else you don't need to change this property.
    You will also need to change the following property of the block: Query All Records: Yes
    If changing the Block's "Query All Records" property causes your form to be too slow because of the number of records in your block, then you could keep a running total manually by using a combination of the Post-Query and When-Validate-Item (WVI) triggers. If your block does not allow data entry, then you could do this with just the Post-Query trigger. For example:
    BEGIN
      /* This code sample assumes you have added a non-table item */
      /* to your block called SUMMARY.  */
      :YOUR_BLOCK.SUMMARY := :YOUR_BLOCK.SUMMARY + NVL(:RS_1,0);
    END;If your block allows data entry, then you would add the following to your existing WVI trigger.
    BEGIN
      /* Perform your data entry validation logic first... */
      IF ....
      ELSE
        ...Validation is successful...
        :YOUR_BLOCK.SUMMARY := :YOUR_BLOCK.SUMMARY + NVL(:RS_1,0);
      END IF;
    END;Hope this helps.
    Craig...

  • How do I move a P6 SQL 2008 database to SQL 2012

    I have backed up and restored P6 from one server to another server. I have ran a couple of suggested scripts to sync the PMDB database with the Master database with little success. I am still unable to logg on to the PMDB database with P6 Pro. I would appreciate any help that is available.
    Thanks

    KB http://digital.ni.com/public.nsf/allkb/E076A0661E03F1EB862571A800079E7B?OpenDocument
    Ryan Shi
    National Instruments

  • How to implement email facility in PL/SQL programs.

    Is there any Oracle package which supports email facility?
    I have some dbms automatic jobs fires every half hour, in case there is any failure in the process I would like to send an email to user or the person who is running the job.
    Can some body tell me how to implement it in PL/SQL?????????????

    You might find this article useful..
    visit..
    http://www.oracle.com/oramag/code/tips2000/090400.html

  • Disable 'sa' login on SQL 2008 ?

    Hello, what are the downsides/risks in disabling 'sa' login within SQL 2008 ?  Like potential issues on system backend processes, reboots, patching, etc...?  Noticed it can be disabled and still continue to own & run SQL Agent jobs I believe
    which sounds like a good thing.
    Thanks in advanced.

    Well. The permission for changing both is the same.
    But "locking a user out" is just not what one would expect to be on purpose.
    So I would highly recommend using the appropriate techniques to avoid confusion and errors coming from them. Always go for the most stable method.
    Here I just happen to have published a short blog post on disabled/denied Logins, which somehow is related to your question:
    DISABLE and DENY LOGIN, DENY USER & Effect on Impersonation and Permissions
    Andreas Wolter (Blog |
    Twitter)
    MCM - Microsoft Certified Master SQL Server 2008
    MCSM - Microsoft Certified Solutions Master Data Platform, SQL Server 2012
    www.andreas-wolter.com |
    www.SarpedonQualityLab.com

  • Install Cumulative update in sql 2008

    Can any one tell me how to install Cumulative update in sql 2008 r2

    See info at: Update Center for Microsoft SQL Server
    Kalman Toth Database & OLAP Architect
    SQL Server 2014 Database Design
    New Book / Kindle: Exam 70-461 Bootcamp: Querying Microsoft SQL Server 2012

  • How does one install a express sql server to run with Visual Web Developer 2008?

    I successfully installed .NET framework v 3.5 and VWD 2008 on a new Vista laptop. When I want to add a Sql Server database to a website, errors tell me to install SS 2005 Express. MSDN SS 2005 Express download tells me I MUST  first install .NET framework v 2.0 before SS 2005. When I try to install framework v 2.0, I'm sent to v. 3.5 and no way to download SS 2005.
    How does one install a express sql server to run with Visual Web Developer 2008?   

    Momark,
    Do you still need help with this?
    Thank you!
    Ed Price, Power BI & SQL Server Customer Program Manager (Blog,
    Small Basic,
    Wiki Ninjas,
    Wiki)
    Answer an interesting question?
    Create a wiki article about it!

  • How to implement multi threading in pl/sql

    Hi,
    I have to run a pl/sql procedure which calls multiple instances of another procedure of some other package.
    How should I proceed to do it?
    Bhaskar.

    Actually the final table that need to be updated has
    millions of records.
    Hence I am thinking of multithreading.1) Why are you updating millions of records? Frequently, it is more efficient to do a direct path insert of the final data from a staging table into the final table rather than trying to update millions of rows in place.
    2) Are you using parallel DML? SQL already provides the ability to enable parallelism if that is going to improve the performance of your queries. There is, in general, no need to re-implement that in PL/SQL.
    And all the information are communicated within the
    same session.I'm not sure I understand what you're saying here...
    Justin

  • How to change the default directory from within SQL*Plus ?

    Hello,
    I want to change the default directory directly from within SQL*Plus to be able to launch my command files with simple instructions like :
    @my_command.sql
    If I haven't launched SQL*Plus from the directory containing the file my_command.sql, how do I change the default directory to the directory of my command files ?
    I've searched through the Oracle documentation, there's no SET DEFAULTDIR or something like that. When I do a SHOW ALL, there's no variable containing the default directory.
    If you have an idea...
    regards,
    Jérôme.

    Hi Jérôme (J鲴me ?),
    You cannot directly do that, but you can use @@ instead of @ to run subscripts in the same directory as the superscript
    # head /tmp/tl30/xxx/[xyz].sql                    
    ==> /tmp/tl30/xxx/x.sql <==
    prompt call y
    @y
    prompt call z
    @@z
    quit
    ==> /tmp/tl30/xxx/y.sql <==
    prompt i am in y
    ==> /tmp/tl30/xxx/z.sql <==
    prompt i am in z
    # pwd                                             
    /root
    # sqlplus -s scott/tiger@lsc62 @/tmp/tl30/xxx/x.sql
    call y
    SP2-0310: Datei "y.sql" konnte nicht geöffnet werden
    call z
    i am in zKind regards
    Laurent Schneider
    OCM DBA

  • How can I enable embedded pl/sql gateway to run on port 80

    I have a new 11G install on OEL 4.0, database created. I would like to be
    able to access the instance using the pl/sql gateway. Works fine with
    port 8080, the default. How to I enable it to run on port 80?
    I found this statement in the following docuementation:
    http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14259/xdb22pro.htm#ADXDB2500
    Using HTTP(S) on Nonstandard Ports
    By default, HTTP listens on a nonstandard, unprotected port: 8080. To use HTTP(S) on
    the standard port, such as 80, your DBA must chown the TNS listener to setuid ROOT
    rather than setuid ORACLE, and configure the port number in the Oracle XML DB
    configuration file /xdbconfig.xml.I have root priviledges on the box.
    I've tried setting the listener file permissions:
    chown root:dba /u01/app/oracle/product/11.1.0/db_1/bin/tnslsnr
    chmod 6775 /u01/app/oracle/product/11.1.0/db_1/bin/tnslsnr
    Also put root in the dba group.
    The permissions turn out like this:
    -rwsr-sr-x 1 root dba 830854 Jun 17 21:04 /u01/app/oracle/product/11.1.0/db_1/bin/tnslsnr
    I stopped the listener, bounced the database, and started the listener again.
    But it still shows the process being owned by oracle:
    oracle 29682 1 0 21:08 ? 00:00:00 /u01/app/oracle/product/11.1.0/db_1/bin/tnslsnr LISTENER -inherit
    Changing the port is easy:
    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    SYS>select dbms_xdb.gethttpport as "HTTP-Port" , dbms_xdb.getftpport as "FTP-Port" from dual;
    HTTP-Port FTP-Port
    8080 2100
    At this point, I can access the apex home page with the following url:
    http://hostname:8080/apex/f?p=4550:10:1454849288245548
    I can than change it to port 80:
    SYS>begin
    dbms_xdb.sethttpport('80');
    dbms_xdb.setftpport('2100');
    end;
    2 3 4 5
    PL/SQL procedure successfully completed.
    SYS>SYS>select dbms_xdb.gethttpport as "HTTP-Port" , dbms_xdb.getftpport as "FTP-Port" from dual;
    HTTP-Port FTP-Port
    80 2100
    When I try to access apex with the following url:
    http://rmdcopslnx1.us.oracle.com/apex/f?p=4550:10:1454849288245548
    I get the following:
    Failed to Connect
    Firefox can't establish a connection to the server at hostname.com.
    Though the site seems valid, the browser was unable to establish a connection.
    * Could the site be temporarily unavailable? Try again later.
    * Are you unable to browse other sites? Check the computer's network connection.
    * Is your computer or network protected by a firewall or proxy? Incorrect settings
    * can interfere with Web browsing.I can set the port. Just can't talk to it.
    This is the entry from the listener log:
    <msg time='2008-07-03T15:40:09.741-06:00' org_id='oracle' comp_id='tnslsnr'
    type='UNKNOWN' level='16' host_id='hostname'
    host_addr='xxx.xxx.xxx.xxx'>
    <txt>TNS-12546: TNS:permission denied
    TNS-12560: TNS:protocol adapter error
    TNS-00516: Permission denied
    Linux Error: 13: Permission denied
    </txt>
    </msg>
    So this looks like an permissions problem. But where? I posted
    this on the apex forum here:
    Re: How can I enable embedded pl/sql gateway to run on port 80
    They suggested asking here.

    No, that thread did not provide the information that I need. Some more data:
    I have the port set to 8080:
    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    SYS>select dbms_xdb.gethttpport as "HTTP-Port" , dbms_xdb.getftpport as "FTP-Port" from dual;
    HTTP-Port FTP-Port
    8080 2100
    At this point, I can access the apex home page with the following url:
    http://hostname:8080/apex/f?p=4550:10:1454849288245548
    I can than change it to port 80:
    SYS>begin
    dbms_xdb.sethttpport('80');
    dbms_xdb.setftpport('2100');
    end;
    2 3 4 5
    PL/SQL procedure successfully completed.
    SYS>SYS>select dbms_xdb.gethttpport as "HTTP-Port" , dbms_xdb.getftpport as "FTP-Port" from dual;
    HTTP-Port FTP-Port
    80 2100
    When I try to access apex with the following url:
    http://rmdcopslnx1.us.oracle.com/apex/f?p=4550:10:1454849288245548
    I get the following:
    Failed to Connect
    Firefox can't establish a connection to the server at hostname.com.
    Though the site seems valid, the browser was unable to establish a connection.
    * Could the site be temporarily unavailable? Try again later.
    * Are you unable to browse other sites? Check the computer's network connection.
    * Is your computer or network protected by a firewall or proxy? Incorrect settings can interfere with Web browsing.
    I can set the port. Just can't talk to it.

  • How to Configure Remote Connections To SQL Server 2008 R2 Express

    Post written June 10, 2010 and pertains to:
    SQL Server 2008 R2 Express on both my server and local machines: SQLX_SRV,
    SQLX_LOC
    SQL Server 2008 R2 Management Studio on both my server and local machines:
    MS_SRV, MS_LOC
    Windows Server 2008 R2 Enterprise installed on a Hyper-V VPS: WS
    SQL Server Configuration Manager on both my server and local machines:
    CMGR_SRV, CMGR_LOC
    Server Manager: SMGR
    I am connecting to my hosting server via Remote Desktop Connection: RDC
    I installed SQLX_SRV and MS_SRV on my hosting server and SQLX_LOC and MS_LOC on my local development machine.  I am able to use MS_LOC to connect to SQLX_LOC and to use MS_SRV to connect to SQLX_SRV.  However I am not able to use MS_LOC to connect
    with SQLX_SRV.  Here's what I have done so far:
    SMGR -> Configuration -> Windows Firewall to turn off the Windows Firewall for Domain, Private and Public profiles.  Obviously I'll change this later, but until I can connect I want to remove as many variables as possible.
    CMGR_SRV -> SQL Server Services to confirm that both SQL Server (SQLEXPRESS) and SQL Server Browser services were running.
    CMGR_SRV -> SQL Server Network Configuration -> Protocols for SQLEXPRESS to ENABLE the Shared Memory, Named Pipes, and TCP/IP protocols and DISABLE the deprecated VIA protocol.
    CMGR_SRV -> SQL Server Network Configuration -> Protocols for SQLEXPRESS -> double click TCP/IP to open the TCP/IP properties dialogue.  On the Protocol tab Enabled: Yes, Keep Alive: 30000, changed Listen All to No.  I've tried it both
    ways, but I've got six IP addresses on my server and I wanted to configure SQLEXPRESS to listen to only the first and primary IP.  On the IP Addresses tab went to IPALL and cleared the TCP Dynamic Ports field and entered 1433 in the TCP Port field. 
    For my first and primary IP Address I made sure that Enabled was Yes, I cleared the TCP Dynamic Ports field, and entered 1433 in the TCP Port field.  For all other IP Addresses Enabled was set to No and I cleared both the TCP Dynamic Ports and TCP Port
    fields.
    CMGR_SRV -> SQL Server Services -> SQL Server (SQLEXPRESS) right click and Restart.  This of course stopped and restarted my instance of SQLX_SRV enabling the TCP/IP configuration in the previous step to take effect.
    On my server, SQLX_SRV is the only instance of SQL Server running and so it's easy to hard wire it to the default port 1433.
    The instance name for both SQLX_SRV and SQLX_LOC is the default "SQLEXPRESS".  My server machine name is "SERVER1" on the EnglishBrains.com domain.  So the proper local name (local within the context of my remote server as connected via RDC) for
    my instance of SQLX_SRV would be:
    SERVER1\SQLEXPRESS 
    Note the use of a backslash NOT a forward slash. 
    Of course to connect remotely from my development machine, which is not on the same domain as my hosting server, I would need to specify the domain as well, so the SQL Server name becomes:
    SERVER1.EnglishBrains.com\SQLEXPRESS
    I must also use SQL Server Authentication.  Before I can use such a remote connection, however, there are still several configuration steps required.  So on my server (connected via RDC) I used MS_SRV to connect to SQLX_SRV using SERVER1\SQLEXPRESS
    for the server name and Windows Authentication.  Once connected I performed the following steps:
    MS_SRV -> right click the connected parent SERVER1\SQLEXPRESS instance node at the top -> Properties -> Security -> Server authentication: select "SQL Server and Windows Authentication mode".  This will enable connections using either type
    of authentication.
    Next, leaving the Server Properties dialogue open, Connections -> check "Allow remote connections to this server" box.
    Click OK to save these changes and close the Server Properties dialogue.
    MS_SRV -> Security -> right click Logins and select "New Login...", the Login - New dialogue opens.
    On the General page Enter a name for your new login
    Select SQL Server Authorization
    Enter and confirm a password
    Uncheck Enforce password expiration
    Select the default Database and Language
    On the ServerRoles page Public will be checked, also check SysAdmin.  This is probably not a good idea and I'll uncheck this as soon as I can connect to the SQLX_SRV.
    On the User Mapping page select the databases you want your new Login to access and enter the Default Schema of "dbo".
    At the bottom of the User Mapping page you'll see the Database Roles table.  Public will be selected by default.  Also select db_Owner.  Again this is probably not a good idea, and I'll refine this once I can connect.
    On the Status page confirm that "Grant" is checked under "Permission to connect to database engine" and "Enable" is checked under "Login".
    Click OK to save all changes and close the Login - New dialogue.
    With these steps completed you should now be able to use MS_SRV to connect to SQLX_SRV using SQL Server Authentication by supplying the name and password for your new Login.  I tried this and it worked fine.  Next I tried to use this same login
    remotely, that is I went to my local development machine and used MS_LOC to try and connect to SQLX_SRV by using
    SERVER1.EnglishBrains.com\SQLEXPRESS
    and opting for SQL Server Authentication and supplying the name and password of my new login.
    THIS DID NOT WORK??  Instead I get the following error message:
    Cannot connect to SERVER1.EnglishBrains.com\SQLEXPRESS.
    A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider:
    SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified) (Microsoft SQL Server, Error: -1)
    For help, click:
    http://www.microsoft.com/products/ee/transform.aspx?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLServer&EvtID=-1
    If you follow the suggested help link, you are told:
    The SQL Server client cannot connect to the server.  This error could be caused by one of the following reasons:
    A specified SQL Server instance name is not valid.
    The TCP, or named pipes protocols are not enabled.
    The firewall on the server has refused the connection.
    The SQL Server Browser service (sqlbrowser) is not started.
    WRONG on all 4 counts!  The instance name IS valid.  Both TCP/IP and Named Pipes protocols are enabled.  The firewall has been shut down, so it is not relevant.  Finally the SQL Server Browser IS started.
    The next thing I tried was to circumvent discovery by the SQL Browser service by using the following syntax to specify the IP address and port directly when specifying the SQL Server name.
    tcp:68.71.134.186,1433
    Using this in the Server Name field I was able to use MS_SRV to successfully connect to SQLX_SRV (using SQL Server Authentication of course) with or without the SQL Browser service running. 
    However when I tried to connect from MS_LOC to SQLX_SRV using this same login (WITH SQL Browser service running just for good measure) it does not work??  I get the following error message:
    Cannot connect to tcp:68.71.134.186,1433.
    A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider:
    TCP Provider, error: 0 - A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.) (Microsoft SQL Server, Error: 10060)
    For help, click:
    http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLServer&EvtID=10060&LinkId=20476
    If you follow the help link you are told:
    "The SQL Server client cannot connect to the server. This error could occur because either the firewall on the server has refused the connection or the server is not configured to accept remote connections."
    However, the firewall has been shut down and the server HAS been configured to accept remote connections! 
    I confirmed that i could indeed Ping to 68.71.134.186  and running NetStat -a |find /i "listening" on the server shows that the server is indeed listening at 68.71.134.186 Port 1433 -- which is why I was able to connect to SQLX_SRV using MS_SRV with
    tcp:68.71.134.186,1433 .
    IN SUMMARY: Even though I can connect to my SQLEXPRESS instance multiple ways from the server itself, I cannot connect remotely from my development machine! 
    If anyone can help me figure out why I would be very, very grateful!

    My two cents to help you out on c# code example to configure the remote sql server express.
    Hope it helps. It works, but you have to be extra carefull to read it all and setup the server configuration and netsh commands; also the port fowarding on the router.
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Data.SqlClient;
    namespace sqlremoteconnection
    class Program
    static void Main(string[] args)
    // this is the local sql server connection
    // 192.168.1.101\SQLEXPRESS
    // now, the configuration for remote access:
    // activate SQL SERVER BROWSER - set it to start "automatic"; then START UP
    // SQL Server Configuration Manager
    // --> SQL SERVER BROWSER -> properties -> Service -> Start Mode -> automatic -> apply
    // --> Log On -> Start -> Ok
                // netsh firewall set portopening protocol = TCP port = 1433 name = SQLPort mode = ENABLE scope = all profile = CURRENT
                // netsh firewall set portopening protocol = UDP port = 1434 name = SQLPort mode = ENABLE scope = all profile = CURRENT
                // netsh advfirewall firewall add rule name = SQLPort dir = in protocol = tcp action = allow localport = 1433 remoteip = any profile = PUBLIC
                // netsh advfirewall firewall add rule name = SQLPort dir = in protocol = udp action = allow localport = 1434 remoteip = any profile = PUBLIC
    // VERY IMPORTANT FOR REMOTE ACCESS: you have to add the rules on port fowarding
    // on the router!!!
    // TCP: 1433
    // UDP: 1434
    // or just a personal port like TCP 31433/UDP 31434
    // read carefully the netsh commands above
    // server name: 123.132.24.177\SQLEXPRESS
    // server name: anyurl.myftp.org\SQLEXPRESS,1433 <<-- regular port
    // server name: anyurl.myftp.org\SQLEXPRESS
    // server name: anyurl.myftp.org\SQLEXPRESS,31433 <<-- WOW different PORT here!!!
    SqlConnection myConnection = new SqlConnection(
    "user id=sa;" +
    "password=password_goes_here!;" +
    "server=anyurl.myftp.org\\SQLEXPRESS,31433;" +
    //"Trusted_Connection=no;" +
    "database=database_name_here; " +
    "connection timeout=30");
    try
    myConnection.Open();
    catch (Exception e)
    Console.WriteLine(e.ToString());
    try
    SqlDataReader myReader = null;
    SqlCommand myCommand = new SqlCommand("select * from mytable", myConnection);
    myReader = myCommand.ExecuteReader();
    while (myReader.Read())
    Console.WriteLine(myReader["tab01_name"].ToString());
    Console.WriteLine(myReader["tab01_age"].ToString());
    catch (Exception e)
    Console.WriteLine(e.ToString());
    try
    myConnection.Close();
    catch (Exception e)
    Console.WriteLine(e.ToString());
    Adelino Araujo

  • How to transfer the tables from one file group to another file group in SQL 2008.?

    Hello all,
    I have few issues regarding the transfer of the tables from one file group to another file group  in SQL 2008 and also How can we  backup
    and restore the particular database based on file group level.
    Let’s say I have a tables stored within the different FG. such as
    Tables                                                    
      File group
    Dimension tables                                              
                                                                     Primary
    Fact tables                                               
                                                                              FG1
               FG2…
    zzz_tables                                               
                                                                              DEFAULT_FG    
    dim.table1                                                                                                                          DEFAULT_FG
    dim.table2                                                                                                                          DEFAULT_FG
    Here all I want to transfer the dim.table1 ,dim.table2  from  DEFAULT_FG to the Primary File
    group .So is there simple methods for transfer the dim.table1,2  from one FG to another .I have tried somewhat but I couldn’t get the exact way .So if someone have better idea please share your knowledge that would be really appreciated.
    Secondly after moving those dim.table1 ,dim.table2 from DEFAULT_FG to Primary ,All I want to backup and restore the database only containing  the Primary and FG1,FG2… not
    a DEFAULT_FG.Is it possible or not.?
    Hope to hear from the one who knows better approach for this kind of task .Your simple help will be much appreciated.
    Regards,
    Anil Maharjan

    Well after all my full day research on this topic had paid off, I finally got the solution and am so happy to research on these things. It makes
    us feel really happy after all our research and hard work doesn't goes as waste.
    Finally I got what I am looking for and want to make sure that I am able to transfer the tables from DEFAULT_FG to another FG without tables
    having clustered index on that tables .
    With the help of the link below I finally got my solution where Roberto’s coded store procedure simply works for this.
    Really thanks to him for his great post and thanks to all for your response and your valuable time.
    http://gallery.technet.microsoft.com/scriptcenter/c1da9334-2885-468c-a374-775da60f256f
    Regards,
    Anil Maharjan

  • How to implement multiple Value Helps within the same Application ??

    Dear Experts,
    I want to implement multiple value helps in the same view.For that I have declared exporting parameters of type 'wdy_key_value_table.' within the component controller for each of the value helps.While I do activate and test the application I get the following error :
    The following error text was processed in the system HE6 : A row with the same key already exists.
    The error occurred on the application server hsdnt24s11_HE6_00 and in the work process 4 .
    The termination type was: RABAX_STATE
    The ABAP call stack was:
    Method: VALUESET_BSART of program /1BCWDY/9VSHJWRNR0EZPKFT3ZKC==CP
    Method: IF_PO_VIEW1~VALUESET_BSART of program /1BCWDY/9VSHJWRNR0EZPKFT3ZKC==CP
    Method: WDDOINIT of program /1BCWDY/9VSHJWRNR0EZPKFT3ZKC==CP
    Method: IF_WDR_VIEW_DELEGATE~WD_DO_INIT of program /1BCWDY/9VSHJWRNR0EZPKFT3ZKC==CP
    Method: DO_INIT of program CL_WDR_DELEGATING_VIEW========CP
    Method: INIT_CONTROLLER of program CL_WDR_CONTROLLER=============CP
    Method: INIT_CONTROLLER of program CL_WDR_VIEW===================CP
    Method: INIT of program CL_WDR_CONTROLLER=============CP
    Method: GET_VIEW of program CL_WDR_VIEW_MANAGER===========CP
    Method: BIND_ROOT of program CL_WDR_VIEW_MANAGER===========CP
    I dont know how to implement multiple value helps.Need your help on this.
    Regards,
    Mamai.

    Hi
    Hint is : A row with the same key already exists it means , It is assigning the same value/Key to row and you are calling it at WDDOINIT  so it giving error at the time of initialization .
    Better way to do the coding at some event in view OR if not possible than just execute the first value help in wddoinit later clear all the value before gettig the other Value help. Code it at WdDoModify View to get its run time behaviour.
    BR
    Satish Kumar

  • Error "Conversion failed when converting date and/or time from character string" to execute one query in sql 2008 r2, run ok in 2005.

    I have  a table-valued function that run in sql 2005 and when try to execute in sql 2008 r2, return the next "Conversion failed when converting date and/or time from character string".
    USE [Runtime]
    GO
    /****** Object:  UserDefinedFunction [dbo].[f_Pinto_Graf_P_Opt]    Script Date: 06/11/2013 08:47:47 ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    CREATE   FUNCTION [dbo].[f_Pinto_Graf_P_Opt] (@fechaInicio datetime, @fechaFin datetime)  
    -- Declaramos la tabla "@Produc_Opt" que será devuelta por la funcion
    RETURNS @Produc_Opt table ( Hora datetime,NSACOS int, NSACOS_opt int)
    AS  
    BEGIN 
    -- Crea el Cursor
    DECLARE cursorHora CURSOR
    READ_ONLY
    FOR SELECT DateTime, Value FROM f_PP_Graficas ('Pinto_CON_SACOS',@fechaInicio, @fechaFin,'Pinto_PRODUCTO')
    -- Declaracion de variables locales
    DECLARE @produc_opt_hora int
    DECLARE @produc_opt_parc int
    DECLARE @nsacos int
    DECLARE @time_parc datetime
    -- Inicializamos VARIABLES
    SET @produc_opt_hora = (SELECT * FROM f_Valor (@fechaFin,'Pinto_PRODUC_OPT'))
    -- Abre y se crea el conjunto del cursor
    OPEN cursorHora
    -- Comenzamos los calculos 
    FETCH NEXT FROM cursorHora INTO @time_parc,@nsacos
    /************  BUCLE WHILE QUE SE VA A MOVER A TRAVES DEL CURSOR  ************/
    WHILE (@@fetch_status <> -1)
    BEGIN
    IF (@@fetch_status = -2)
    BEGIN
    -- Terminamos la ejecucion 
    BREAK
    END
    -- REALIZAMOS CÁLCULOS
    SET @produc_opt_parc = (SELECT dbo.f_P_Opt_Parc (@fechaInicio,@time_parc,@produc_opt_hora))
    -- INSERTAMOS VALORES EN LA TABLA
    INSERT @Produc_Opt VALUES (@time_parc,@nsacos, @produc_opt_parc)
    -- Avanzamos el cursor
    FETCH NEXT FROM cursorHora INTO @time_parc,@nsacos
    END
    /************  FIN DEL BUCLE QUE SE MUEVE A TRAVES DEL CURSOR  ***************/
    -- Cerramos el cursor
    CLOSE cursorHora
    -- Liberamos  los cursores
    DEALLOCATE cursorHora
    RETURN 
    END

    You can search the forums for that error message and find previous discussions - they all boil down to the same problem.  Somewhere in your query that calls this function, the code invoked implicitly converts from string to date/datetime.  In general,
    this works in any version of sql server if the runtime settings are correct for the format of the string data.  The fact that it works in one server and not in another server suggests that the query executes with different settings - and I'll assume for
    the moment that the format of the data involved in this conversion is consistent within the database/resultset and consistent between the 2 servers. 
    I suggest you read Tibor's guide to the datetime datatype (via the link to his site below) first - then go find the actual code that performs this conversion.  It may not be in the function you posted, since that function also executes other functions. 
    You also did not post the query that calls this function, so this function may not, in fact, be the source of the problem at all. 
    Tibor's site

Maybe you are looking for

  • Is there a way to create a sequence by using multiple playlists?

    Is there a way to create a sequence so that music from several playlists is played in a specific order. For example: 1 song from playlist 1 3 songs from playlist 2 5 songs from playlist 3 1 song from playlist 4 After which it restarts.

  • Customise button wording for 'NEXT' that appears with Photo Gallery Thumbnails

    Is it possible to customise the wording of the 'NEXT' button that appears with the photo gallery thumbnails? ie, if you only have 5 thumbnails on page, but the gallery has more pics, a NEXT button is generated, but we'd like it to say MORE IMAGES ins

  • Need a 32-bit windows home server driver for a cp2025 printer

    I have a Windows Home Server 2011, and multiple Windows XP workstations. I need an XP driver for a CP2025DN printer that I can load onto the WHS 2011, as I want to configure the WHS as a Print Server. The WHS does not recognize (like) the HP Universa

  • Private Folder Help (Again...)

    Yes, I did it and now I am trying to recover my private folder from the trash. I have read several posts on here and other sites about how to move it from terminal and I can't seem to make it work. VK's help seems good and logical, but I am not sure

  • Fault Policy Management Framework in 10.1.3.3

    Hi, According to the Oracle Documentation, 10133technote. It says 1) "A fault policy can be associated at the following levels: Partner link,Port type, Process & Domain." - Here can you through a light on "Process" n what "Process" means - Is it Refe