SQL Server 2005 Views data automated.

Hi Team,
Very Good morning to you. I am Asif Ali working as Software Engineer in TESCO HSC, Bangalore, India.
We are using SQL Server 2005 as our database. From the production environment every week I need to fetch weekly data from 3 different views and put into an excel sheet and then I have to mail this. This is a manual work. Is there any way to automate it so
that every week automatically the report should be sent to email ids, OR is there any way at least every week automatically data is pasted to excel sheet and then manually can be emailed to recipients. Till now: fetching data from view, paste data into an
excel sheet and then mail that sheet, all three activities are manual. I want to automate this at least at some extent. I am new to SQL Server world. I have knowledge of Java, VB Script and little bit of .NET.
Please help me on this.
Thanks in Advance
Regards,
Asif Ali
Contact #  +91- 7204574734, [email protected]

You can use  a SSIS Package to export the data from SQL to a excel sheet, Here is a simple project you can have a look at it
http://www.codeproject.com/Articles/402958/SSIS-Package-Export-Data-from-Database-Daily-to-Ne
Later after you design the SSIS package , you can schedule a SQL Agent job 
1. The first step will be to run the SSIS package 
2. Second step to send the email.
Configure SQL Server Agent
to know about sending emails from SQL Server have a look at this link
Send email from SQL
Satheesh
My Blog |
How to ask questions in technical forum

Similar Messages

  • SQL Server 2005 huge data migration. Taking more than 18 hours ...

    Hi,
    We are migrating an SQL server 2005 DB to Oracle 10 g 64 bit 10.2.0.5. The source sql server DB has few tables (<10) and only few stored procedure(<5). However one table of source is very huge, it has 70 million records in it. I started the migration process; it was running till 18 hours passed away then I cancelled it. I am using SQL Developer 3.1.0.7 with online migration.
    Kindly let me know if I choose offline migration will it reduce the data move time. Is there some other tool by oracle that can migrate huge data (records in millions) quickly. Is there some configuration in SQL Developer that can catalyses the process?
    Kindly help.
    Best Regards!
    Irfan

    I tried using SQL Loader to move data. The file exported by SQL server for the transaction table is of size around 17 GB. The sql loader stopped giving error on file size limit. The error is given below:
    SQL*Loader: Release 10.2.0.5.0 - Production on Thu Mar 22 15:15:28 2012
    Copyright (c) 1982, 2007, Oracle. All rights reserved.
    SQL*Loader-510: Physical record in data file (E:/mssqldata/transaction.txt) is longer than the maximum(1048576)
    SQL*Loader-2026: the load was aborted because SQL Loader cannot continue.
    C:\Users\Administrator\Desktop\wuimig\datamove\wuimig\2012-03-22_14-20-29\WUI\dbo\control>
    Please help me out how do I move such huge data to oracle from sql server.
    Best Regards!

  • Creating Sql Server 2005 External Data Source

    Hey guys, I'm trying to connect to an SQL Server 2005 database directly from the BAM external Data Source.
    I have the driver name and the connection string, login and password. I also have the driver, but BAM doesn't seem to have a "drivers" folder. So when I try to connect, I get:
    BAM-00008: Invalid Oracle driver name
    Source: "java.lang.ClasssNotFoundException: com.microsoft.sqlserver.jdbc.SQLServerDriver" ID: "InvalidOracleDriverName"
    Has anyone done this before? Am I only allowed to connect to an Oracle Database from BAM? Thanx!

    Hi,
    I use BAM with SQL Server External Data Source and works fine.
    In the Architect set this parameters on conection with SQL Server (EXTERNAL DATA SOURCE):
    Driver: SQL Server
    Connection string / URL: SERVER=<host>;DATABASE=<name_db>;
    <host> = ip or name of the server
    <name_db> = name of the database on the SQL Server
    I use BAM 10.1.3.3.0 with SQL Server 2005
    Regards

  • SQL Server 2005 Hierarchical Data concatenation

    Hi Folks,
    Please help me on the following data concatenation using hierarchical Query
    Table Data:
    Level Id     ParentTbl     PatCol
        ChildTbl    ChildCol    
    1                  
    A                 
    a          
    B            b
    1                  
    A                  a           C            c
    2             
         C                  c           D            d
    3                  
    D                  d           E            e        
    Excepted Result:
    Level Id     ParentTbl     PatCol
        ChildTbl    ChildCol         SQLString
    1                  
    A                 
    a          
    B            b            A.a =B.b
    1                  
    A                  a           C            c            A.a
    = C.c
    2             
         C                  c           D            d      
         A.a = C.c =D.d
    3                  
    D                  d           E            e           
    A.a = C.c = D.d =E.e  
    Thanks
    Narendran 
    Narendran

    Declare @SampleData Table ([Level Id] int, ParentTbl varchar(256), PatCol varchar(256), ChildTbl varchar(256), ChildCol varchar(256));   
    Insert @SampleData([Level Id], ParentTbl, PatCol, ChildTbl, ChildCol)
    Select 1,                   'A',                  'a',           'B',            'b'
    Union All Select 1,                   'A',                  'a',           'C',            'c'
    Union All Select 2,                   'C',                  'c',           'D',            'd'
    Union All Select 3,                   'D',                  'd',           'E',            'e';
    ;With cte As
    (Select [Level Id], ParentTbl, PatCol, ChildTbl, ChildCol, Cast(ParentTbl + '.' + PatCol + ' = ' + ChildTbl + '.' + ChildCol As varchar(max)) As SQlString
    From @SampleData
    Where [Level Id] = 1
    Union All
    Select s.[Level Id], s.ParentTbl, s.PatCol, s.ChildTbl, s.ChildCol, c.SQlString + ' = ' + s.ChildTbl + '.' + s.ChildCol
    From cte c
    Inner Join @SampleData s On s.[Level Id] = c.[Level Id] + 1 And s.ParentTbl = c.ChildTbl And s.PatCol = c.ChildCol
    Select [Level Id], ParentTbl, PatCol, ChildTbl, ChildCol, SQlString
    From cte;
    Tom

  • SQL SERVER 2005 - part of the tables where migrated

    Hello.
    I'm trying to convert a SQL SERVER2005 DB to ORACLE 10g.
    The sql-developer is converting all the objects from the DB, but builds DDL comands for 43 table insted of 320 tables .
    All the tables are on schema dbo.
    The user connecting to the sql server 2005 is data base owner (dbo).
    After building the repository, on MD_TABLES there are only 43 records.
    Any idea where to search the problem?
    Thanks
    Reuven
    Message was edited by: reuven
    user533419
    Message was edited by: reuven
    user533419
    Message was edited by: reuven
    user533419

    Reuven,
    We are finalizing our production release and would like to get to the bottom of the problem.
    -You can run the workbench/SQLDeveloper so that you can see Java 'Stack traces' from exceptions (errors) in the output:
    [from the SQLDeveloper forum under Unable to start sql developer :]
    There is another [sqldeveloper.exe] that you should try from the command line:
    <sqldevroot>\sqldeveloper\sqldeveloper\bin\sqldeveloper.exe
    This will run in debug mode.
    If all else fails, try the .bat file in that same folder.
    -Are you using a case sensitive database?
    -For the pre-production release workbench currently uses SQL Server 2000 views rather than SQL Server 2005 altered to take allowance for the user/schema separation, this may cause unforeseen problems.
    -Can you send a test database to us with this problem?
    Regards,
    Turloch
    Oracle Migration Workbench Team

  • SQL Server 2005 High Availability and Disaster Recovery options

    Hi, We are are working on a High Availability & Disaster Recovery Planning solution for an application database which is on SQL Server 2005. What different options have we got to implement this for SQL Server 2005 and after we have everything setup how
    do we test the failover is working?
    Thanks in advance.........
    Ione

    DR : Disaster recovery is the best option for the business to minimize their data loss and downtime. The SQL server has a number of native options. But, everything is depends upon your recovery time objective RTO and recovery point objective RPO.
    1. Data center disaster
    Geo Clustering
    2. Server(Host)/Drive (Except shared drive) disaster
    Clustering
    3. Database/Drive disaster     
    Database mirroring
    Log shipping
    Replication
    Log shipping
    Log shipping is the process of automating the full database backup and transaction log on a production server and then automatically restores them on to the secondary (standby) server.
    Log shipping will work either Full or Bulk logged recovery model.
    You can also configure log shipping in the single SQL instance.
    The Stand by database can be either restoring or read only (standby).
    The manual fail over is required to bring the database online.
    Some data can be lost (15 minutes).
    Peer-to-Peer Transactional Replication
    Peer-to-peer transactional replication is designed for applications that might read or might modify the data in any database that participates in replication. Additionally, if any servers that host the databases are unavailable, you can modify the application
    to route traffic to the remaining servers. The remaining servers contain same copies of the data.
    Clustering
    Clustering is a combination of one or more servers it will automatically allow one physical server to take over the tasks of another physical server that has failed. Its not a real disaster recovery solution because if the shared drive unavailable we cannot
    bring the database to online.
    Clustering is best option it provides a minimum downtime (like 5 minutes) and data loss in case any data center (Geo) or server failure.
    Clustering needs extra hardware/server and it’s more expensive.
    Database mirroring
    Database mirroring introduced in 2005 onwards. Database Mirroring maintain an exact copy of a database on a different server. It has automatic fail over option and mainly helps to increase the database availability too.
    Database mirroring only works FULL recovery model.
    This needs two instances.
    Mirror database always in restoring state.
    http://msdn.microsoft.com/en-us/library/ms151196%28v=sql.90%29.aspx
    http://blogs.technet.com/b/wbaer/archive/2008/04/19/high-availability-and-disaster-recovery-with-microsoft-sql-server-2005-database-mirroring-and-microsoft-sql-server-2005-log-shipping-for-microsoft-sharepoint-products-and-technologies.aspx
    http://www.slideshare.net/rajib_kundu/disaster-recovery-in-sql-server
    HADR Considerations
    Need to Understand the business motivations and regulatory requirements that are driving the customer's HA/DR requirements. Understand how your customer categorizes the workload from an HA/DR perspective. There is likely to be an alignment between the needs
    and categorization.
    Check for both the recovery time objective (RTO) and the recovery point objective (RPO) for different workload categories, for both a failure within a data center (local high availability) and a total data center failure (disaster recovery). While RPO and
    RTO vary for different workloads because of business, cost, or technological considerations, customers may prefer a single technical solution for ease in operations. However, a single technical solution may require trade-offs that need to be discussed with
    customers so that their expectations are set appropriately.
    Check and understand if there is an organizational preference for a particular HA/DR technology. Customers may have a preference because of previous experiences, established operational procedures, or simply the desire for uniformity across databases from
    different vendors. Understand the motives behind a preference: A customers' preference for HA/DR may not be because of the functions and features of the HA/DR technology. For example, a customer may decide to adopt a third-party solution for DR to maintain
    a single operational procedure. For this reason, using HA/DR technology provided by a SAN vendor (such as EMC SRDF) is a popular approach.
    To design and adopt an HA/DR solution it is also important to understand the implications of applying maintenance to both hardware and software (including Windows security patching). Database mirroring is often adopted to minimize the service disruption
    to achieve this objective.
    HADR Options :
    Failover clustering for HA and database mirroring for DR.
    Synchronous database mirroring for HA/DR and log shipping for additional DR.
    Geo-cluster for HA/DR and log shipping for additional DR.
    Failover clustering for HA and storage area network (SAN)-based replication for DR.
    Peer-to-peer replication for HA and DR (and reporting).
    Backup & Restore ( DR)
    keep your server DB backups in network location ( DR)
    Always keep your sql server 2005 upto date, in case if you are not getting any official support from MS then you have to take care of any critical issues and more..
    Raju Rasagounder Sr MSSQL DBA

  • Automating Data Migration from SQL Server 2005

    Hi All,
    I need to migrate data from SQL Server 2005 to Oracle DB ( Datawarehouse). The data migration involves updating Dimensions and Fact table. I have got painful job of switching topology to point to over 100 different weekly SQL DBs ( in sequence) and pull the data into DW. How can I automate my ODI process to switch from one after the other.
    Any Ideas?
    KS

    ODI Variables are there to help you with this. Please go through this post at [http://blogs.oracle.com/dataintegration/2009/05/using_odi_variables_in_topolog.html] .
    This will show you how to use a variable Oracle data server.
    On similar lines you should be able to switch to any of your 100 weekly SQL server DBs.
    And loop in a sequence to load data from all of them.
    Hope that helps

  • Creating and Using View Objects on JDev 10g against SQL Server 2005

    I'm currently working on this project on Jdeveloper against a SQL Server 2005 DB (I couldn't talk this people to migrate to Oracle... :-( ), and it's the first time I work with JDev against a database other than 10g.
    I had no problem making the connection, and I can see the DB in Conections->Databases, but when I create an app. module, and create entities and views and add them to the app. module to access them through the Data Controls, these don't work. I can see the view on the Data Controls, and when I drag them to my jspx page it shows the menu that let's me choose whether I want to create a table, or a selection, or a tree, but once I choose one, it does nothing.
    I've search all over the internet and haven't found a solution, so I come to this forum desperate for help, seriously.
    Please get in touch; if anyone knows another solution that doesn't involve not using JDev or SQL Server 2005, please let me know, because I basically need to have a few selectonechoice showing some data from a few tables.
    Thanks for reading this post, and hope to get help.
    Carlos.

    Hi,
    can you run the model in the ADF BC tester ? If this is possible the SQL Server doesn't seem to be the problem. Are you on JDeveloper 10.1.3.3? If not, just get this latest build
    Frank

  • Creating multiple graphs dashboard in Crystal XI using a single View from MS SQL Server 2005

    How to create multiple graphs dashboard in Crystal XI using a single View from MS SQL Server 2005?
    I need to use Crystal XI and create a dashboard which shows some sales data and stuff, multiple graphs on a single screen.
    My tech team says they can display one graph per page but not 4 graphs on the same page as it uses a common view from SQL Server 2005.
    How to manage this? Can we call in multiple views / graphs in the same page? Say 4 graphs on the same page?
    We use ASP or .NET for calling crystal reports into the App.
    Regards,
    Akshay.
    INDIA

    Have you tried creating multiple sections, putting each graph in a separate section and then underlaying the sections so they appear next to each other?

  • Export SharePoint List data to SQL Server 2005 Database

    Hello Everybody,
    I am presently working on a project which handles much larger amount of data. The architecture of the application demands extracting records from the SharePoint (WSS 3.0) and insert into a SQL Server 2005 database. I need to run this job as daily basis. I am thinking of using SSIS (SQL Server Integration Service) for this purpose. But I am new to this technology and I'd like to know how effective this idea to do the job.
    I'd also like to know more about SharePoint's ability to handle huge amount of data when it comes to Reporting.
    thank you,
    Arun

    For Reporting Services, There are web parts available which can be used to render a reporting service report in sharepoint. I have also used a reporting service report directly using Page Viewer Web Part so displaying a reporting services report in sharepoint is very simple task. Important part is to transfer data from Sharepoint list to SQL 2005. so if you want to use SSIS package and there is only one or two list then approach is to write a simple query based on your list id and extract information from sharepoint content database from UserData table, since it is a read only operation so it can work this way. Another way to do it is to write a Sharepoint Timer JOB which runs on a defined schedule and will read your list values and will transfer to your SQL 2005, Another way could be to write your custom web service and write code to transfer from list to SQL 2005. Custom code you will write inside timer or web service will be same code so it is just a different shell you can say. in case of web service, use it in some other application as a regular web service.  
    Let me know if you need further help, You did not mention how many list you have?
    Regards,
    BizWorld.

  • Can't see data in data tab - sql server 2005

    hello,
    i am connected to a sql server 2005 database (with jtds driver), the connection is ok, i see the tables but i can't see data in data tab.
    i have an error : incorrect syntax
    somebody can help me ?
    thank's in advance
    alex

    definitely. I was going to say, make sure you have the privileges to read data.
    From Microsoft SQL Server 2000 on, it is recommended that you are a member of the db_datareader - so that data in the database can be read
    Barry

  • INSERTING DATA INTO A SQL SERVER 2005 TABLE, WHICH HAS A IDENTITY COLUMN

    Hi All,
    I have to insert the data into a SQL SERVER 2005 Database table.
    I am able to insert the data into a normal SQL Server table.
    When I am trying to insert the data into a SQL Server table, which has a identity column (i.e. auto increment column in Oracle) I am getting error saying that can't insert value explicitly when IDENTITY_INSERT is set to OFF.
    Had anybody tried this??
    There are some SRs on this issue, Oracle agreed that it is a bug. I am wondering if there is any workaround from any one of you (refer Insert in MS-SQL database table with IDENTITY COLUMN
    Thanks
    V Kumar

    Even I had raised a SR on this in October 2008. But didn't get any solution for a long time, finally I had removed the identity column from the table. I can't to that now :).
    I am using 10.1.3.3.0 and MS SQL SERVER 2005, They said it is working for MS SQL SERVER TABLE, if the identity column is not a primary key and asked me to refer to note 744735.1.
    I had followed that note, but still it is not working for me.
    But my requirement is it should work for a MS SQL SERVER 2005 table, which has identity column as primary key.
    Thanks
    V Kumar

  • SQL Server 2005 data pull from Oracle

    Hi, I am learning how to use Oracle and I ran into this problem.
    My database is running on SQL Server 2005.
    I have an ODBC connection to Oracle. I also have a VB .Net script that queries the Oracle table that the data resides in.
    When the job is running, and if it stalls, I do not get a timeout error. It locks down my database and no other source systems can feed data to me; these are back logged in the queue.
    Is there an easier way for me to make a connection that will pull data on a consistent basis? Please help ...
    Student Learner

    Learning how to use Oracle does not include taking data from Oracle and putting it into SQL Server.
    From your description of what is happening I agree with BluShadow. This is not an Oracle issue. This is a coding in VB .NET issue.
    Posting the statements you are executing against some unknown version of Oracle would be a good starting point.

  • Update data automatically in sql server 2005 based on condition proplem

    Hi guys i have problem I have two table
    First one is
    Second One is Vacation
    as relation one to many (vacation has foreign key of Contract No OF Table Contract) 
    what i need is to update Contract table with field status =Finish where start vacation date >end contract Date
    How i do that in sql server 2005 to make update automatically
    Ex
    contract table
    status             nvarchar(20)
    end contract    date time
    vacation table
    start vacation date time
    end vacation date time
    start vacation date is 23/10/2014
    and End
    is 26/10/2014
    Now not update status in contract table to finish because vacation date start is less from end contract
    but when date today is 27/10/2014 update contract table field status to finish
    automatically with sql server 2005 
    How i do that condition to make update to data automatically based on changing on date
    Update statement i need is 
    update Contract set status = finish where start vacation>end contract
    but problem how i write this statement to update data automatically based on date today

    Please post DDL, so that people do not have to guess what the keys, constraints, Declarative Referential Integrity, data types, etc. in your schema are. Learn how to follow ISO-11179 data element naming conventions and formatting rules. Temporal data should
    use ISO-8601 formats. You failed again. Code should be in Standard SQL as much as possible and not local dialect. 
    This is minimal polite behavior on SQL forums. Now we have to write the DDL that you did not bother with! What you did post was wrong! There is no key or constraints. There is no generic “status” in RDBMS; a "<something in particular>_status"
    is a state of being, so it needs a temporal duration. The correct idiom for this data model is: 
    CREATE TABLE Vacations
    (vacation_contract CHAR(15) NOT NULL PRIMARY KEY,
     vacation_start_date DATE NOT NULL,
     vacation_end_date DATE,
     CHECK(vacation_start_date < vacation_end_date),
    Oh, a field is nothing like a column. You need to read a basic SQL or RDBMS book; you do not know the basics. 
    --CELKO-- Books in Celko Series for Morgan-Kaufmann Publishing: Analytics and OLAP in SQL / Data and Databases: Concepts in Practice Data / Measurements and Standards in SQL SQL for Smarties / SQL Programming Style / SQL Puzzles and Answers / Thinking
    in Sets / Trees and Hierarchies in SQL

  • Importing data from SQL Server 2005 database

    Dear Friends
    Scenario:
    We have built an application for which the database is SQL Server 2005.
    Now, we have planned to switch over to Oracle 8i database.
    There is a field with data type as Varchar(Max) – which can hold data with a maximum length of 231 characters (SQL Server 2005)
    In Oracle 8i, the Varchar2 max size 4000 bytes or characters.
    We want to import the data from SQL Sever 2005 database into Oracle 8i database.In the process, the value for the particular field whose data type set as Varchar(Max) in SQL Server 2005 and contains more than 4000 characters gets automatically truncated while importing into oracle.
    We want the entire characters stored in the field to be imported into oracle database.
    Please suggest solutions.
    Thanks and regards
    Bharath Kumar V

    Use CLOB if the data is purely text data. BLOB otherwise.
    But the question is why you want to switch over to an Oracle version which is de-supported by Oracle?

Maybe you are looking for

  • Upgraded to SL - phpMyAdmin-3.2.1 :  PHP cannot load mcrypt extension

    after upgrade to SL, I run phpMyAdmin-3.2.1, and PHP 5.3.0 (in SL) I get this message in phpMyAdmin : cannot load mcrypt extension ; check the PHP config ... what could be wrong with the OS X version of PHP 3.0 ? thanks for your lights erwin

  • Help for dms blue print

    hi all, basically i am mm consultant ,now I am alloted a new project in DMS module.Please help me in getting the following.. 1. SAP DMS Business Blueprint 2. Question - Answer Database of Client. my mail [email protected] useful help awarded be sure.

  • ACS Database type (e. g. mysql,sql,postgre)

    Can anyone tell me what is the database of cisco ACS 4.2. And one more thing how can i access the ACS database to view the infos of the DB.

  • The ringer symbol will not leave the screen ?

    Hello, I'm having trouble getting rid of the ringer symbol that is sitting in the middle of the screen. I'm also having problems with the volume not being able to turn down.  I think this is all related.  Any ideas?

  • VF03 transaction error in output for hungary language

    hi,    While issing an output in hungary language we are getting an error in VFO3. The error states that  Language environment for language HU cannot be set. This only happens for language HU and this only happens in the development server .Could som