What's a good starting point to learning the native c++ OLEDB structure for accessing SQL Server Compact databases? I see several links into the msdn library, but the library seems to hold a ton of links with little to no actual content. I just need to learn how to do the basics...open a database and run simple queries (select, insert, and update). The examples look incredibly convoluted and don't seem to make sense.
I will be developing for a console program in windows ce 5 on VS2005 if that helps, so I don't need all the windows gui code.
Hi all, I want to select a column which is store email address. How to use the substring function from starting point '@' to end of string? Here is my syntax : select substring(emailaddress, [what syntax] ,len(emailaddress)) from table Thanks!
First off, I appreciate the time that those of you reading and responding to this request are offering. My quesiton is a theoretical and hopefully simple one, and yet I have been unable to find an answer to it on other searches or sources.
Here's the situation. I am working with SQL Server 2005 on a Windows Server 2003 machine. I have a series of databases, all of which are in Full recovery mode, using a backup device for the full database backups and a separate device for the log backups. The full backups are run every four days during non-business hours. The log backups are run every half hour.
Last week, one of my coworkers found that some rarely-used data was unavailable, and wanted to restore a database to a point in time where the data was available. He told me that point in time was some time back in November.
To accomplish this, I restored the database (in a separate database, as to not overwrite my production database) using the Point in Time Recovery option. I selected November from the "To a point in time" window (I should note that this window is always grey, never white like most active windows, it seems), and the full database backup and the subsequent logs all became available in the "Select the backup sets to restore" window.
I then tried a bevy of different options from the "Options" screen. However, every restore succeeds (ie: it doesn't error out), but seems to be bringing the database back to a current point in time. It's never actually going back to the point in time I specify.
My questions are as follows:
a) Is it possible to do a point in time recovery to a point in time BEFORE the last full database backup?
b) If so, what options would you recommend I use? (ie: "Overwrite the existing database", restore with recovery, etc etc).
I again appreciate any and all advice I receive, and I look forward to hearing from anyone and everyone on this topic. Thank you.
When our rep distribution services time-out (several times a day) some dba's just restart the service while others restart the rep job which starts the service. Are there any differences between these two methods? Does restarting the service inherit any changes made to the job's attributes?
We have SQL 2000 (SP2) , Our SQL server agent showing green light as started from EM , It is succussfully restarting from NT Services too . But When I open the properties of the jobs from EM its gives error message SQL DMO error " SQl Agent is starting , try later " . And in EM Next run Date & Time not available .
MDDB database is accessable & in Log file its recovered fully
I'm running SQL Server 2005 on a Server 2003 machine serving both our home network as well as a remote site through a point-to-point T1. While file transfer speeds are up to par, the remote site's interaction with SQL Server (Point of sale system) is very slow. After testing I am certain that it has nothing to do with the actual physical machine in place neither is it an issue with the program itself since speeds are as they are supposed to be over the home network lan. It seems that there might be a packet size issue or something of the sort. Has anyone dealt with this before or have any thoughts?
hello i am just starting to learn sql and know the basics, but now im looking for a good book to learn some more. A book that covers stored procedure would be very useful. If possible a book with q and a would be very good because i feel this tests if u understand what was just explaned. but if there is a good book without this it is ok. All sugestions welcome
hii am using vs2005 for development of web application for reporting with sqlexpress05 as back end .later when project is ready for deployment i have to deploy the project on remote hosting server where i have limited access and sqlserver2000 database to use.i want to ask is there are any limitation or problem of sqlexpress while deploying it on remote sqlservre 2000.and should i have to to continue with sqlexpress as back end.is there any problems for using dynamic database connections(by using smart tags) other than programaticaly connecting database to asp.net ie by writing code.i am new in developmentplease guide me, please guide
hello all..i have make a searching, but is not good. my code like that:Public Class getall Public Function getitem(ByVal id As String) As DataSet Dim con As SqlConnection = New SqlConnection("Data Source=BOYsqlexpress;Initial Catalog=GAMES;User ID=ha;Password=a") Dim ds As New DataSet() Dim adapter As New SqlDataAdapter("select * from [item] where name like '%" & id & "%'", con) Try con.Open() adapter.Fill(ds, "user") Return ds Catch ex As Exception Console.Write(ex.Message) Finally con.Close() con = Nothing End Try ' Next Return ds End Functionand class my item in database is containning dragon ball 3, counter strikeif i insert dragon, it can display dragon ball 3.but if i insert dragon 3, it not display dragon ball 3.it should display dragon ball 3 .how should i change my code?thx...
So, as you can see, at first it appears that I'm after a LEFT JOIN - meaning that the grandparents don't need to have child records to be returned, but, then it turns out that I need INNER JOINS - to limit grandparents when I choose children.
I'm wondering if there's a better SQL Editor than MS Query Analyzer on the market? I like a lot of the functionality provided by QA but want extra stuff like you get in VB6: intelli-sense (sytanx prompting), auto-complete (CTRL+Space provides list of sp's and tables, etc.) plus any other time saving features.
I've tried a few products but nothing quite hits the mark. Is there a program you use and recommend I trial?
Folks, i've got a table with a column; ACCOUNT VARCHAR(30). All the values numeric though. (leave abt the datatype yet). The column is clustered indexed.
SELECT * FROM MYTABLE WHERE LEFT(ACCOUNT,3)='123' execution plan shows CLUSTERED INDEX SCAN.
SELECT * FROM MYTABLE WHERE ACCOUNT LIKE '123%' execution plan shows CLUSTERED INDEX SEEK.
How, why. Why doesn't the optimizer works good for the first query?
Hi, ive got some work to do on SQL queries, the scenario is below and at the bottom is my attempt at answering in the questions: Could somebody simply tell me if the answer at the bottow are correct, if not what I have done wrong.
A local company that produces machine parts has decided to develop an in-house database system. They have identified the following tables: -
tblOrders OrderNo, CustomerNo, Date, OrderTotal
tblCustomers CustomerNo, Name, Street, Town, County, Postcode
tblParts PartNo, Description, UnitCost
tblItems OrderNo, PartNo, Quantity, ItemTotal
Create SQL queries to produce the following: -
a) Details of all orders over £1000 sorted by customer number.
b) A list of all part descriptions and their quantities appearing on order 39
c) Delete all orders placed by customers in Wrexham.
d) Archive all orders placed by customer Clarke into a new table called tblArchive.
e) Increase the price of all parts whose description includes the word “washer” by 4%.
These are my answer, which im not too sure if they are correct. If any1 could tell me if there correct or not that would be great, thanks.
a) SELECT * FROM tblOrders ORDERBY CustomerNO WHERE OrderTotal > 1000
b) SELECT tblParts.PartNo, tblParts.Description, tblItems.Quantity FROM tblItems INNER JOIN tblParts ON tblItems.PartNo = tblParts.PartNo; WHERE OrderNo = 39
c) DELETE tblOrders.* FROM tblOrders INNER JOIN tblCustomers ON tblOrders.CustomerID = tblCustomers.CustomerID WHERE Town = “Wrexham”
d) INSERT INTO tblArchive SELECT * FROM tblOrders INNER JOIN tblCustomers ON tblOrders.CustomerID = tblCustomers.CustomerID WHERE Name = “Clarke”
e) UPDATE tblParts SET UnitCost = [UnitCost]*1.04 WHERE Description LIKE “*washer” or Description LIKE “washer*” or Description LIKE “*washer*”
I'm about 6 weeks into SQL and SQL Server (7) - I was wondering whether you could share your opinions about which language to use as a programming tool for developing apps for & with SQL Server. I'm choosing between C++ (Visual) or JAVA.
I already know C and the DB-Libe contains a lot of it but I'm kinda trying to expand some horizons. I'm ok with either C++/VC++ or JAVA but I only have time to learn (or be good at) one.
Any suggestions? (I'd like to hear what you think even if you say neither C++ or JAVA - maybe VB? What's easy and marketable is what matters most.)
I've been a SQL Server dba for 5 or 6 years now. With the upcoming release (eventually, I'm sure) of Yukon/SQL2005, I've read that it's important for DBA's to pick up one of the .NET languages - I've figured, I'll try to learn VB.NET - I've had a little exposure to it, and can usually figure out what's going on in VB code I've read - however, I seriously doubt I could write anything in it from scratch - I want to learn it in a bad way - can you all recommend any self-paced books that will walk me thru it? I've never had any formal training with it, don't know a class from a DLL....Thanks in advance for your help!!
Hi guysWe have a following problem. For security reasons in each table in ourDB we have addition field which is calculated as hash value of allcolumns in particular row.Every time when some field in particular row is changed we create andcall select query from our application to obtain all fields for thisrow and then re-calculate and update the hash value again.Obviously such approach is very ineffective, the alternative is tocreate trigger on update event and then execute stored procedure whichwill re-calculate and update the hash value. The problem with thisapproach is that end user could then change the date in the tables andthen run this store procedure to adjust hash value.We are looking for some solution that could speed up the hash valueupdating without allowing authorized user to do itThanks in advance,Leon
hello, for a new job i might have to learn SQL. i've neverworked with databases or SQL, so i'll need to learn. cananybody advice me on what would be a good book to learnfrom? i'm quite an experienced programmer, so it doesn'thave to be a dummies guide, and preferably not a bulky booklike the "SQL bible" or something.oh, one of my 'favourite' computer books of all times is"thinking in Java" by bruce eckel, to give you an idea.mike--not sure if there's a better group to ask these questions
Hi all, I have couple of databases in access which i want to spilit them in backend and frontend, and then put the backend( just tables) in sql and keep frontend in access. which version of sql is good for me to do that? by the way there are more than 10 users want to access the front end for dataentry. all the databases and the sql server can be in the same server.
I've read frequently how stored procedures we create shouldn't be named withsp_ since SQL Server will first check the master db before the current dbwhen trying to find the sp to execute. I always nodded and thought how Iwas glad I hadn't done that. For some reason it never clicked that UDFbehavior could be the same.I have several UDFs that start fn_... When I reference a UDF as dbo.fn_...does SQL Server check the master db for these and only upon not finding themcheck the current db? If so, is there a performance hit for this?TIA,John
I'm quite new to this forum. I've a fair experience in Databases and Programming. Now that I want to take a stride into Data Mining and Warehousing. Experts please suggest me where I can start from and any learning path ?
I am just starting out on SSIS, and have the following business challenge that I would like to solve utilizing SSIS. There are two SQL Server data stores, one would be the source, and other would be the destination. I need to grab some data from store 1, and insert that data into store 2. Here are my questions:
1) Before i move the data to store 2, i have to check some criterias by callin some sps, and then the end result would need to be inserted into the destination database. Can anyone tell me how would i setup the control flow, to accomodate that in SSIS?
2) Can someone email me a sample package that does something similar?
I just need a starting point so i can build the design of my package. Basically i need to call three sps during the process to move data. First one will compile a list of all the records to process. Second one, will pick those up, make some calls to set some other parameters, and then finally insert it into some staging tables. Third one should simply pick up the data from staging tables, to a replica of those tables in the actual destination db. I would really appreciate if I can get some response to this post soon. Also, I would appreciate if you can point me in the right direction in terms of how to design this using SSIS. Basically i need a starting point control flow design(rough) to understand what control flow items would be used in this case. Thanks.
I'm looking to buy a book about SQL, T-SQL, stored procedures, etc. I'm a web developer, so I don't need a book for a SQL Server administrator. I need a book that tells me what I as a developer need to know about SQL. I'm currently using Visual Studio, SQL Server 2005, ASP.NET 2.0, and VB.NET (and fairly new to all of those) if that makes any difference. The bulk of my web developing experience has been with PHP and MySQL so this is new territory for me. I hope all that makes sense. I would appreciate any suggestions for such a book. Thanks! -Mathminded p.s. I bought a bunch of Wrox books and haven't had them long enough to decide if I like them: "Professional ASP.NET 2.0", "Professional ASP.NET 2.0 Security, Membership, and Role Management", "ASP.NET 2.0 Website Programming", and "Visual Basic 2005". I thought I'd check with the experts before investing in another book. :-)
I am new to SQL2005 and have been given the task of writing some SSIS packages to import some CSV files. I need to cleans the data as it is imported from my CSV files before it reaches my SQL DB. I am currently Googling the internet to discover how to do this. Can anyone recommend a good SSIS book? I am a C# developer, so a book that has lots of SSIS C# examples would be good. Any help appreciated. Regards, Paul.
HiI have a field containing numbers. I want to do some simple arithmetics with it, say value=value+1 or value=value-1 or or even value+2. What is to be done, is fixed at design time. I think this could be done by loading the row or record to my program and doing the calculations there. And then storing the record back. But this seems too complicated.Is there a single query doing that in data table.
hello, i am wondering, for what i use relations between tables? if i make sure that the data inserted into the table matches, for what i need table relationships? i have a table named Pictures with: PictureID, UserID, UserName, PictureName, Description... do i have to make relationships between UserID from Pictures and UserId from aspnet_Users? and the second table PicturesComments witch has: CommentID, PictureID, UserID, UserName... do i have to makre relationship between PictureID from PictureComments and PictureID from Pictures AND between UserID from Pictures and UserId from aspnet_Users? sorry for this stupid questions... thanks