I have a friend who is a contract developer working remotely for a company on a SQL Server + VB project. He is having difficulty because someone at the company is making changes to the database tables without informing him, and of course then there are numerous application errors. This has happened far too many times for him to dismiss it. Examples of these changes are changing field names, deleting fields, changing datatypes, even changing the server name. My question is does SQL Server automatically log changes to the database, and if so, how can this log be read?
Hello everyone,I have a webcontrol that uses database-structures alot, it uses the system tables in SQL to read column information from tables. To ease the load of the SQL server I have a property that stores this information in a cache and everything works fine.I am doing some research to find if there are anyway to get information from the SQL server that the structure from a table has changed.I want to know if a column or table has changed any values, like datatype, name, properties, etc.Any suggestions out there ?!
I am developing a package on my local workstation. I have defined two logging service providers. One is for SQL Server and the other is for the Windows Event Log. I am using the Dts.Log method in a script task to write log entries.
Logging is working properly with the SQL Server provider and rows are being inserted into the sysdtslog90 table. However, the only events that are being logged in the Windows Event Log are the package start and end events which I believe SSIS is doing automatically anyway.
Is there something I need to do to enable WIndows Event Log logging other than defining a log provider and making sure it is checked active? Won't SSIS write to two different logs with one Dts.Log call? Any ideas on what might be going wrong with my approach?
Hi, I have a complicated sql server mobile database (.sdf) and need to create a SQL SERVER database with the same tables. How can I do it without scripting the whole thing? I thought of using the views.information_schema databases, but it is still a lot of coding.
Hi, I decided to use the SQL Server log provider to store logging data of all my Integration Services packages. I also created some reports about this data for operating purposes. I have a problem occurs the name of the executing package is not always written to the log,but the name of the single task which failed. But that is not very useful information for operating, because I do not see any chance to get the name of the package by the information which is logged in the sysdtslog90 table in the database which I defined for SSIS Logging.
How do I configure the package to always log the package information into the table, too?
Hello I am a final year student and for my final year project I have decided to try and create a price comparison website due to the fact that i feel it would be a good project to work on and develop my technical skills in C# and microsoft sql server 2005, since these are mainly the two programs I would say i have more experience with. Basically I want to create a website such as www.pricerunner.com. At this point in time i have started playing around with how i feel the database will look, in terms of tables and columns, below is what i have produced; Company Company_ID Company_name ADDRESS Website link contact Products Product_ID Product_name Product_Category Product_Price
I am now stuck as how i will link each company with a product bearing in mind a company will stock different categories of products, also do you think i need any more columns in any of the above tables, as well as am i missing out on anything, I am hoping someone with more knowlegde than myself can shed some knowledge on my problem, thank you.
I'm sure there is a simple way to do this but I cannot think of it.I have an ASP.NET application that I am publishing to a webhost. I have chosen to use FTP to copy my files (aspx, etc.). They work as far as links etc. Now, the next step is to create my SQL database on their server as they instruct, which I have done in name only. (Oh, if it makes a difference, I access the hosting service using Plesk control panel.) Is there any simple way to get my database structure from my PC to the host server? All responses welcome. Thanks.
Hi All, I need to get some info on how I can get the script of the entire database stucture. I need to write a procedure to do this. I know in SQL Server I could get the script in a mouse click. But I need to write a procedure to do the task. Is there a package in SQL Server that I could use to accomplish this task? Any thoughts will be of help. Thanks in advance. sj
I am very new to SQL server, and am completely stumped here. I need to transfer the data from an old database to a new one (both SQL Server 6.5 DBs.) The only problem is that the database has been restructured, and I can't for the life of me figure out how to get the data imported. I am working on manually making all of the structure changes, but there must be a better way. Any ideas? Thank you SO much!
This is a sort of database structure question that could I guess apply to any type of database...
Say I have 4 production lines and I want to log serial numbers on the start of every line and off the end of every line.
Is there any advantage in having a separate table for each Production Line and serial number logging point? (i.e. t_Line1Start, t_Line1End, t_Line2Start etc) or is it just the same as having one big table and having a LineNumber field and a StartEnd field?
Is SQL Server just as happy dealing with fewer transactions to several tables as it is to many transactions to one table?
Is there a way I can copy my SQL 2000 database including procedures, views tec. the whole works but not the data in any table.
I want to share with a relative a copy of my application (web based) he has his own SQL 2000 server but I do not want to give my data just the database so the application will run and he can start inputting his own data.
How can I do this like a backup which has everything but with no data.
I tried scripting it using the EM but it did not give me everything just the system db's
I'm designing a web application that acts as business management software for many small autobody shops. This method was chosen because it creates a central point of administration for the software and I believe that a properly configured cluster of services will meet performance requirements. Using SQL Server 2k5 as my backend, I need to structure my DB(s) so that performance and size are kept to a minimum.
That being said, the first problem I encounter is in creating a structure that supports multiple businesses, each with their own unique dataset.
For example, each business will have work orders specific to their business. This necessitates a uniqueness constrained by businessID (hereafter titled "BizID") and WorkOrderID (WoID). The first solution I happened on was the simplest: A composite primary key composed of BizID (int) and WoID (int). The unfortunate consequence of this, as I soon realized, was that *every* table containing multiple business' data would need this composite key structure. The second problem with this method is that there is no such thing (to my knowledge) as a composite identity. I could identify WoID as the identity column, but it would not iterate WoID for BizID x properly if any other Biz added a work order to the table. (i.e. biz 1 adds three work orders (identitied 1, 2, 3), biz 2 adds one work order (would identity as 4) and Biz 1 adds another (would identity as 5), leaving us with 1, 2, 3, 4, 5 across two businesses, rather than 1, 2, 3, 4 for biz 1 and 1 for Biz 2)
The second idea I considered was one DB per business. I didn't consider that for very long, since I assumed size considerations would be blown out of the water if I had 50 business and 50 DBs. I could be wrong, as I am decidedly a novice at this. It does benefit from not putting all my eggs in one basket though and makes backup/recovery/troubleshooting much simpler.
The third idea I considered was one table per business. This suffers from the same issues as #2 above with not as many of the benefits.
Both ideas 2 and 3 would need a master table relating logins to the DBs they belong to, which would not be hard to implement at all, but the implications of using this method are unknown to me.
So quite obviously, I'm a novice at this. Perhaps I took a project on that was too big for my britches, but just getting out of college puts me in a good place to take a risk and I will learn a great deal from putting a complex (is it so?) system like this into action.
I appreciate any and all responses, thanks in advance for your replies!
I have one databaseand I create new database by copy everything from first db I then alter some column on new database and now I would like to compare two databaseHow can I do it ?
I am thinking of doing a fake PC company site for my ASP project. so what they will have is a chat, products with reviews, and users can have "Buddies".So my DB so far (Tables):ProductPC - ID, Processor, RAM, HDD, Graphics, LCD ...ProductHardware - ID, Title (Like "Intel C2D E6600"), Description, Price, Rating (0-5 stars, so integer), Category (CPU, HDD, Graphics)ProductSoftware - ID, Title (eg. "Adobe CS3"), Description, Price, Rating, Category (eg. Design, Programming)Reviews - ID, ProductID, Title, Content, DateChat - ID, TopicID, Title, Content, DateUsers - ID, Username, Password,The problem, how do i connect Reviews to the products since they are from diff tables.How do i get the "buddy" system workingChat i think its not as simple as thatBut i just need a simple ASP project, so no need to get too complex, but i still hope to learn as much.
Hey, I havent been working with databases for quite a while but now im in charge of creating a rather powerful website with webzine (online magazine) among other things. Within this magazine there are several different categories of articles such as concerts, album reviews, interviews, product reviews etc etc which obviously recquire rather differently structured tables. Multiple images are going to be uploaded to all articles and users are going to be able to comment on all the articles. Since the comments and image tables dont differ between the articles i would much rather store all comments for example in the same table, but wont i get relationship problems? Perhaps I could have a column referring to a certain kind of article, and then a second column with the id of that specific article? Or is the best way simply to have a seperate image and comment table for each set of articles?
Hi i have a student table and also an societies table, and a student can belong to as many societies as possible, for example student John Taylor belongs to the Football society, rugby societey and dance society, where as student Jim Jenkins belongs to the Football society, rugby society, arts society and graphics society. My tables so far look like this; STUDENTS; student_id, student_name SOCIETIES; society_id, society_name
My question is how can i make the scenario above reflect in my table structure, would i need to create another table, if so what fields or columns should i place in this new table, thank you.
Hello all! I'm working on an application that requires a bit of tricky database development, and I was hoping to get some advice from you. The best way to describe the application, is to use an example, and the best I can think of is Facebooks news feed, where you can see if any of your friends have become friends with other members, or joined any groups, if your friends have completed quizs, attended any meetups, got arrested at the weekend etc etc.. My application is similar, but requires a lot less features. It will only tell show you if any of your friends have become friends with other members, or joined any groups (example: your friend Dave is friends with Jane). Currently in my database, I have... users table (that holds a list of registered users) friends table (that links users who have decided to become friends with other users)groups table (that holds different groups)user_joined_groups table (that links users to groups they have decided to join). Its simple and it works fine. So to get around the newsfeed problem, I thought of doing this, creating 2 new tables. The first table will hold the news type and give it an ID... NewsTypeTable============NewsTypeID NewsType1 NewFriend2 JoinedGroup The next table will be FriendsNewsTable, and everytime a user joins a group, or makes a friend with another user, details are added in here... FriendsNewsTable=============NewsID NewsTypeID FriendID newFriendID newGroupID datecreated1 1 225 156 2 2 95 52 Ok, so above in the FriendsNewsTable, the first record shows that the user has made friends with someone, and the second record shows that a user has joined a group. I though that this approach might work. but then I though... If I have 20 friends, that means I am going to have to search with each one through FriendsNewsTable, which could contain 30,000 records (wishful thinking!) So this is bound to make the page crawl to say the least. So does anyone have any advice how I should go about this? Thanks! Matty
What method would you suggest is the best way to deal with a website?
Say for example, writing SQL. Am I better using Stored Procedures and adding methods for accessing there or just writing the SQL inline. What do you think about this? Is it totally overkill to use stored procedures in a small website?
I'm trying to design a site for parent conference scheduling. Usually we have a couple of days appointment time, for example 5/8/2008, and 5/9/2008. and the time usally start at 7:00 and ends at 9:00. one appointment time lasts about 20 minutes. I would put a page something like this, after parent or student login, 1. they are asked to choose a date, 2.after the date is chosen, show available teacher names, 3, after the teachers are selected, for each teacher, it will show a list of radio buttons for parents to select the time period open, For example: teacher: John smith. time: 7:00; radio button 7:20 radio button 7:40 Booked............... 8:40 radio button 4, the student choose the available time, and then enter student name, then submit. I would like to know how to setup the database table and present to the users. Currently for this scheduling part I have tables like teachertable, scheduling table, Appointment table. Teacher table: teacherID, name, email, course,Scheduling table: appointD, TeacherID, room, appt date I think I will prepopulate the two tabels before conference time. and after user submit the selection, insert into Appointment table the other fields like scheduling ID, appoint time, and studentname. The things confuse me, is how can I deal with the appointment time fields, shall I add another table for appt time? should this field be prepopulatd to the table and pull from the table for student to select or something else? HOw can I do with this: if a teacher not available after 8, how can I excluded the time period for the teacher? Thanks
Hello,I am upgrading my (simple) cms from one menu layer to two layers. So i have two tables in de my DB- table_mainmenu- table_submenuThe submenu records are linked to the mainmenu records on the mainmenu id. So far so good. Heres my problem, i cant figure out how to change the order of the pages...!? What is the theory behind recording the stacking order of the menu items? How can i record this information in the DB?I just need the theory, i can figure out the details for myself. Thanks in advance!Corstiaanp.s. is the the right forum to post this?
I want to copy a production database schema to an archiving database, only the structure : tables, views, defaults, rules,UDTs. For achieving that I am trying to use SQL/DMO functions, "CopyAllTables" for example. My script works with no error but unfortunately the destination database contains no objects. Why, have I missed something ? Does anyone know how to do that?
Hi.We have a .NET programmer using our SQL server. The database is roughly8GB at this point, full of all of our inventory, payroll data, etc. forrunning reports.This is on a dual-xeon 3.2Ghz, 4GB DDR, 3x15k RPM SCSI RAID-5, gigabitethernet, etc server.Yet, every once in a while it slows to an absolute crawl. IIS6 is thefront-end, and its limited to a web garden with 4 threads. However,sometimes only 1 processor does any real work, even when multiplepeople are running reports.Blocking is NOT a problem, however I've seen 300,000+ locks/secrequested occasionally (not waiting or anything like that, justopened).Cache hit ratios are roughly 99%.One issue that I suspect is that the programmer is using varchar(50)for EVERY column in EVERY table (except unique keys).My question: In this configuration, would varchar(50)s be the cause ofthe awful slowdowns?I know its all cached in memory, but on these older xeons (533fsb,DDR266) the memory subsystem could be better. If we are pulling THATmuch excessive data on an already congested bus (since its dualintels), would it cause a dramatic slowdown?The reports we run are highly intensive, but usually do not take afraction of the time that they do when the server exhibits thesebehaviors.I really could use anyone's input on the matter. I've read onlineguides, 2 performance optimization books, and seemingly created optimalindexes, but none of that has led me to a real solution.ThanksMortrek
Is there a way to copy a structure of one database (tables and fields) to another database WITHOUT copying the data?? Someway to do that with replication??
I'm developing an application in ASP.Net that uses SQLServer. The database person in the team wants to have each user have a seperate login to the database so he can tell who has done what changes in the database. Is this a good practice? Or are their performancesecurity issues with this model?
I am a bit new to using MS-SQL, up till now my main adminstration was in Oracle.
I have a question, my developers make changes to my MS-SQL databases, however, they always login as a local admin or use their domain WIndows accounts - with the given privileges. Then they amend the database. My idea is to avoid logging into an MS-SQL server without using a Remote Desktop. So they will need some kind of a client.
What is your experience and what would be the best way to do this? Meaning, what software can I use that does not require a license fee?
With Oracle I can install the Oracle client which has an SQLPLUS to login remotely. Does MS-SQL have something similar?
Thanks in advance.
I did use Google to search, I also have an MS-SQL Developer Edition, but this seems to come with another server itself.
Hi i am creating a web page which will return the results of products, the store name and the distance of the store from the postcode which the user has put into a text box. My first question is how would my database structure look, below is what it looks like at the moment; Company; companyID, companyName, companyAddressLine1, companyAddressLine2, companyPostcode. and Products; productID, productName, companyID, price. In order to achieve the proximity search how would i alter the "Company" table, as in what columns will need to be added or removed, thank you.
I have written 5 content-management systems and am getting a little bored writing a lot of the same functionality and tweaking it for different datamodels. Is there a way within .NET to have visibility of a database's structure (ie, data type, column names, foreign keys etc)? I'd like to write up a dynamically generated form for any given table, displaying appropriate form controls based on data type and foreign keys.
I was wondering does anyone know a way to get the structure, with relationships, of a Sql Database and generate a XML Schema. I want to use the Schema to build a CrystalReport.
Hi i am creating a web page which will return the results of products, the store name and the distance of the store from the postcode which the user has put into a text box. My first question is how would my database structure look, below is what it looks like at the moment;