This Q is so easy I can't find the answer anywhere!
Why is SQL Server called 'Server' ? I understand it is a lot more capable and robust than Access but where does 'server' come into it.
I currently use ASP and Access for dynamic websites but it is time to move up a notch.
Do I just buy SQL Server, make a database, upload it to the same place as before and hey presto?
can I run lots of websites (on different domains and servers) from databases created with my single license standard edition?
Thanks
M
I need copy one database from one server into another server. Both servers have SQLSERVER 2000. One way is copy the LDF files directly but I need to stop the engine to do that, I€™m sure there are many other ways more efficiently. I do need an advice. Thanks in advance
to create a code. Hi everyone, I have SQL SERVER 2005 on my desktop and i need to run queries from remote machines on my SQL SERVER. I thought it would be a good i idea to create a web page on my machine to where remote users can contact and activate SQL QUERIES. My question is very simple and i wonder i a simple answer is available: How do i run SQL queries whereby ASP code ? How do i make a connection between a web page (.asp code) and a SQL sever ? If the answer is complicated as i'm afraid it is, could any one provide me a link for a tutorial dealing with the above issues ? Thanks a lot !
Hi,I am trying to set up a DTS Package to transfer data from a remoteMySQL server to a local MS SQL database. The source tables will remainstatic as will the destination however I only want to copy down datathat does not already exist in the local database.I have two different methods of which to identify the new rows, on sometables it is by a unique ID thus in TSQL I would say WHERE ID x.Other tables are by date where I would want to do something like WHERECreateDate >= GetDate()-1How would I go about performing such clauses using DTS?ThanksMike
Hi,I'm enclosed a snippet of test code which highlights my problem. The Storedprocedure insertValue should insert text into the parent, then insert othertext into the child table but the 2 tables should auto increment in sync(i.e. so that they both end up with the same id numbers). I've tried takingthe auto increment out of the child table but then I don't know how to getthe right parent id into the child table.Any advice appreciated - this is my first database, so I'm just in thelearning process really. Code follows:CREATE TABLE Parent(id INTEGER DEFAULT AUTOINCREMENT,parenttext VARCHAR(16),PRIMARY KEY (id))!CREATE TABLE Child(childID INTEGER INTEGER DEFAULT AUTOINCREMENT,childtext VARCHAR(16),FOREIGN KEY (childid) REFERENCES Parent(id),PRIMARY KEY (childID))!CREATE PROCEDURE insertValues(in p VARCHAR(16), in c VARCHAR(16))BEGINinsert into parent (parenttext) values (p);insert into child (childtext) values (c);END!call insertValues('from parent', 'from child')!select * from parent, child where parent.id = child.childid!
I'm attempting to use a JOIN for the first time and I'm getting about 94,000 rows returned when I should only be getting about 270. Something must not be unique (possible DSN) but I can't figure out why the join is not working. I know it must be difficult to determine the problem without actually seeing the tables but could somebody with a lot of SQL experience spot any glaring problems with this query? Thanks!
SELECT DS.DSNName AS DSN, S.ServerName AS WebServer, DBs.DBName, A.ServerName AS SQLServer FROM DSNs DS, Servers S, DBs, DSNs LEFT OUTER JOIN Servers A ON DSNs.SQLServerID = S.ServerID WHERE DBs.Status = 1 AND DS.WebserverID = S.ServerID AND DBs.DBID = DS.DBID ORDER BY DSN
This has all the earmarks of a procedural error on my part. I have it occuring on two computers with the same sequence and exceptions and with clean databases. Note: The code is from Doug Lowe's ASP.NET 2.0 Everyday Apps For Dummies 2006 loaded from the CD. The database is generate from a script provided by the author. I will paste it in at the end.
I'm hoping you all can provide me with a little advice? I just landed my first DBA position with a company that runs different versions of SQL Server (7.0, 2000, 2005) on many different boxes. The databases I will be managing are in the 10-30TB ranges. Mostly the databases are for OLAP access by the company’s customers. I will need to bring myself up to speed on everything because there is no DBA at the company to transfer information.
Can anyone provide any advise on how I should approach this task of learning my position and/or useful links to resources? Thank you in advance!
I'm working on a website remotely through a VPN and my client uses SQLServer. There's a requirement for a database and my client uses SQLServer 2000.Is it possible to administer this database remotely, just like I dowith MySQL/PHP MyAdmin?Please elaborate.Thanks,Marjorie
I imagine a data-retrieval scenario where data destined for several different tables are collected and initially placed into one 'collector' table (say, ALLDATA); a stored procedure then kicks in and passes the records to individual destinations. For example, I might want to have data for two persons, Ann and Betty, come in and be routed to table_ann and table_betty respectively, with the correspondence stored in table LOOKUP:
id output_table Ann table_ann Betty table_betty
How could this be implemented? Perhaps with some kind of loop over the rows of LOOKUP, with table name retrieved and entered into a (EXEC-written?) query
insert into <table_name> from alldata where id in (select distinct id from lookup where output_table = <table_name>)
But how could one iterate over the list of table names? (These could be placed in table, of course, and the question become 'how could one iterate over a table's rows?')
I hope that this is an easy question for SQL Server pros, and will be grateful for a brief pointer/code snippet. (I may have given more background then necessary, but perhaps there are better solutions available there as well?)
Im not sure how to explain this or if this is the correct forum but here it goes.
I have created a report from a view that gives me court hearing dates on a defendent. When I run the report/view I get two different dates for the person such as, 12/14/2006 and 12/15/2006. How can I get it to show only the later date (12/15/2006)? I pull information from a mainframe that almost always gives me 2 different dates, but we only need the most recent date.
Here is my query for the view
SELECT dbo.CASES.CaseID, dbo.CASENUMBERS.CaseNumber AS Arrest_Number, dbo.CASENUMBERTYPES.CaseNumTypeCode AS Arrest_NumType, CASENUMBERS_1.CaseNumber AS JN_Number, CASENUMBERTYPES_1.CaseNumTypeCode AS JN_NumType, dbo.ROLETYPES.RoleTypeDesc, dbo.ACTORS.SIDNum, dbo.ACTORLOCATIONS.ActorLocDesc, dbo.CHARGENUMBER.ChargeDescription, dbo.DEFCHARGES.OffenseDate, dbo.fnNameReverse(dbo.ACTORNAMES.LastName, dbo.ACTORNAMES.FirstName, dbo.ACTORNAMES.MiddleName, dbo.ACTORNAMES.Suffix) AS NameRev, dbo.EVENTS.ev_StartDate AS PreHearingSetDate, dbo.OFFENSELEVELS.OffenseLevelDesc, dbo.CASES.UnitID FROM dbo.CASES INNER JOIN dbo.CASENUMBERS ON dbo.CASES.CaseID = dbo.CASENUMBERS.CaseID INNER JOIN dbo.CASENUMBERTYPES ON dbo.CASENUMBERS.CaseNumTypeID = dbo.CASENUMBERTYPES.CaseNumTypeID INNER JOIN dbo.CASENUMBERS AS CASENUMBERS_1 ON dbo.CASES.CaseID = CASENUMBERS_1.CaseID INNER JOIN dbo.CASENUMBERTYPES AS CASENUMBERTYPES_1 ON CASENUMBERS_1.CaseNumTypeID = CASENUMBERTYPES_1.CaseNumTypeID INNER JOIN dbo.CASEPARTIES ON dbo.CASES.CaseID = dbo.CASEPARTIES.CaseID INNER JOIN dbo.ROLETYPES ON dbo.CASEPARTIES.RoleTypeID = dbo.ROLETYPES.RoleTypeID AND dbo.CASEPARTIES.RoleTypeID = dbo.ROLETYPES.RoleTypeID INNER JOIN dbo.ACTORNAMES ON dbo.CASEPARTIES.ActorNameID = dbo.ACTORNAMES.ActorNameID INNER JOIN dbo.ACTORS ON dbo.ACTORNAMES.ActorID = dbo.ACTORS.ActorID INNER JOIN dbo.ACTORLOCATIONS ON dbo.ACTORS.ActorLocationID = dbo.ACTORLOCATIONS.ActorLocationID INNER JOIN dbo.DEFCHARGESUMMARY ON dbo.CASES.CaseID = dbo.DEFCHARGESUMMARY.CasesCaseID INNER JOIN dbo.DEFCHARGES ON dbo.DEFCHARGESUMMARY.DefChargeID = dbo.DEFCHARGES.DefChargeID INNER JOIN dbo.CHARGENUMBER ON dbo.DEFCHARGES.ChargeNumberID = dbo.CHARGENUMBER.ChargeNumberID INNER JOIN dbo.COURTS ON dbo.CASES.CaseCourtID = dbo.COURTS.CourtID INNER JOIN dbo.EVENTS ON dbo.CASES.CaseID = dbo.EVENTS.CaseID INNER JOIN dbo.EVENTTYPES ON dbo.EVENTS.EventTypeID = dbo.EVENTTYPES.EventTypeID INNER JOIN dbo.OFFENSELEVELS ON dbo.CHARGENUMBER.OffenseLevelID = dbo.OFFENSELEVELS.OffenseLevelID WHERE (dbo.CASENUMBERTYPES.CaseNumTypeCode = 'NM' OR dbo.CASENUMBERTYPES.CaseNumTypeCode = 'MC' OR dbo.CASENUMBERTYPES.CaseNumTypeCode = 'CM' OR dbo.CASENUMBERTYPES.CaseNumTypeCode = 'JP') AND (CASENUMBERTYPES_1.CaseNumTypeCode = 'JN') AND (dbo.ROLETYPES.RoleTypeDesc = 'Defendant') AND (dbo.EVENTTYPES.EventTypeDesc = 'PRE-HEARING SET') AND (dbo.DEFCHARGES.OffenseDate > CONVERT(DATETIME, '2006-01-01 00:00:00', 102))
In the 'PRE-HEARING SET' table is where I receive the two dates. Is there a way to filter out the first date? I just want to show the most recent date.
Hi everyone, This is a beginner's question: I know that in order to run a package i need to press ctrl_f5 but i also know that there should be an icon (dimmed green arrow) to do that but i cant find it on the toolbar! I only see the "debug" green arrow. Can anyone help me find the lost "play" (or "run") green arrow ? on which toolbar is it situated ? Thanks
I am about to buy some database hardware, and am considering buying adual 64-bit opteron server. In the past, we have run been running the32-bit version of SQL Server 2000.Has anybody tried the new 64-bit version of Sql Server 2000? Can weassume that something that works in the 32-bit world will work in the64 bit, or are we going to spend time debugging Microsoft code? Also,which flavor of 64-bit windows operating system did you use?Any experiences you want to share are much appreciated...-Cheers,Richard
We currently have a propriety in memory DB that is used to store the latest transactions in the system and we have a service that copies the data to a SQL Server every couple of seconds - For historical reporting purpose.
We would like to move into a more standard DB as our real time DB, since we have scalability and availability issues. We taught about using SQL Server since this is the DB we know, but I'm not sure it's built to handle real time data.
Does someone has any experience in using SQL Server for "Real Time" applications?
Does someone has any experience in storing the data files on RAM?
Does MS has a solution similar to Oracle's TimesTen, which is their real time DB?
I am having a problem connecting to my SQL Server 2005 database at the same time with SQL Management Studio Express and from the website at the same time. Everytime I want to view any pages in my site that access the database, I have to close management studio and restart the server for some reason or i get a failed login error message. Is it NOT possible to work on the database at the same time as viewing pages in the website that access the database? This freaking error is realy starting to bug me. I sure hope that there is a work around or something for this.
I have a field of type Real in my SQL 2K database. I stored a value of..35 in the field.When I "Open Table"->"Return All Rows" in the Enterprise Manager I getback .35 for the field value.I went to The SQL Query Analyzer and executed the following T-SQL:SELECT fieldFROM tableI got back 0.34999999 for the field.When running stored procs against the field I also get back 0.34999999.This is causing problems in my app. I can use the Round T-SQLstatement to get back the value I expect, but this causes appdevelopment problems. For a goof I put 1.35 in the field and T-SQL didreturn 1.35. This problem only seems to occur with 0.nnn values. Ialso tried a float data type for the field but I had the same problemsI had with real.Why is T-SQL returning 0.34999999 for my field?
I saw a presentation last week where the speaker created some sorta sql server "watch window" (in Sql Server Management Studio I think) where he could watch all the commands being executed on his sql server database in real-time. For example he could navigate to web pages (that hit the database) and as he pressed buttons you could see the sql commands execute in this "watch window." If other users hit the database at the same time you could see those sql queries execute as well. I didn't think at the time to ask how he did it - does anyone know how to set this up? I have a problem with my sql server right now and it would be useful to see which sql queries (etc) are being executed when. Thanks in advance,J. Shane Kunklejkunkle@vt.edu
Hell, I host web pages on a server(s) that I own, located in a datacenter.I am trying to figure out how to properly liscnese sql server 2005.I have called microsoft, and the people i talk to dont seem to understand my situation. They keep asking me about the number of employess i have, which is totally irrelevant. Let me give you a basic example.Example 1.My personal web page has a blog on it. The blog data is stored in a SQL database. Its a popular blog, thousands of anonymous people reading my blog every month via my webpage. The only "thing" accessing the SQL databse is an asp.net script i write, which then turns around and presents the data via html over the www. just like every other blog in the universe. Example 2.I sell artwork over the internet via my web page. My web page uses a shopping cart system which makes use of an SQL database to keep track of inventory and orders etc. No one ever tries to connect to my database, they just use the shopping cart on my web page which of course connects to the database.Now according to the MS liscensing documentation it seems that i can buy sql server w/ 5 device CAL's. Since I only have 1 or 2 webservers accessing the database server, that should be no problem right?So my basic question is this: is a single Device CAL enough to allow one webserver to connect to one sql server and then show dynamic content to thousands of anonymous users (whoever happens to visit my sites?).Thank you very much for any help you can provide.
When I first installed MS SQL Server 2005 Express Editon, I didn't I selected Windows Auth instead of mixed mode, so I uninstalled sql server and then attempted to reinstall. On the earlier installtion I did setup to instances which show in the "Control Panel/admin tool/services". Anyway, I used the unistall through the control panel, but on installing again it told me that I had instances aready running and needed to stop them. Couldn't work out how to do that. So after many different things, including using the MS's removal tool and windows installer clean up, I still failed. Now however I get the following error message:
Setup failed because Service MSSQL$SQLExpress is disabled for the current hardware profile. Services must be set with the current Hardware Profile logon property profile enabled. For more information on how to enable the hardware profile logon property refer to the product documentation.
So for the last week of my life, literally, I have been trying to import excel files, text files, etc through the bcp utility, link server and also trying bulk insert....I am really, really tired of this not working and I am starting to think there is a bug in express. I first thought these issues might have to do with Vista but I have even tried and failed with XP SP2. I am not new to SQL Server, nor am I a new developer - I have over five years experience so I am really pissed about it at this point! I know most professional developers use SQL Server 2005 Enterprise or something other than Express which is why I am probably not getting answers. btw, this is not the first time I have posted about these issues either. I have referenced multiple sources including forums, books on-line and I even resorted to getting a SQL Server 2005 EXPRESS book for dummies! I have enabled remote connections for both named pipes and tcp/ip. I have started the sql browser service. I have given the correct permissions to the file I want to import and to the table I want to import the data to. The file contains the int values 1,2,3,4,5,6,7,8,9 --> I have even tried saving this file as a .csv -- thanks a whole bunch sql server 2005 dev team for getting rid of the import/export wizard found in 2000, arrrrrgh!
BULK INSERT TestDB.dbo.tblTestData FROM 'C:datamyData.txt' WITH (DATAFILETYPE = 'char', FIELDTERMINATOR =','); GO
Msg 4864, Level 16, State 1, Line 1 Bulk load data conversion error (type mismatch or invalid character for the specified codepage) for row 1, column 1 (columnValue).
Can ANYONE give me a real answer on h ow I can get this to actually work?
Hello all,my question might be trivial but since my background isn't DB i'll dareto ask it any way:how to create a real (not virtual) table from view1 & view2 ni sqlserver?what should i do specificly in the sql server application & what is thesyntax for that?i thank all of you,groupy.
I installed Visual Studio 2005 and an SQL Server 2000 enterprice. I called my SQL-Server instance "PALAGSQL". My computer is called "PEARL" when I try to create a connection in VisualStudio2005 ,I put Server-Name : "PEARL/PALAGSQL" .......but I receive error 40 "Could not open a connection" What did I miss ? What shall I do.
Is there a way to set up the SQL Server Log files so that it automatically creates a new one (or overwrites the old one) when the old one is full?
We keep having people shut out of our web site due to the log file being full. Since we have no DBA I volunteered to try to find out how we can avoid this faux pas in the future.
I have been using SQL Server 2K for a couple of months now and I have been entering data into my tables through Enterprise Manager. I do this by selecting the table, right-clicking on it, and selecting Return All Rows.
After months of use, this method of entering data has become tedious and cumbersome. Is there an easier way to enter data into SQL Server? I don't know how to program Visual Basic, but I know how to create dynamic websites.
Microsoft Access offers the ability to make Forms, so that data entry is easier. Can SQL Server offer anything similar? Maybe SQL Server 2005 offers a GUI for data entry?
I know about @@version and SERVERPROPERTY, but I am looking for a query that will determine between SQL Server 2000 and 2005. I need to write an if/then statement and don't want to have to add all of the 9.xxx.xx versions for 2005 and keep that updated with each hotfix that comes out. -Kyle
I am not very good in queries. Could you please suggest me some web site/Tutorial/Artical where i can get Study Material for complex and real life queries. I know the syntexes, I just need to practice queries to enhance my skills
I am running SQL Server Desktop Engine on Windows XP. I am developing in .NET framework v1.1.
I intend to u/g to the express edition 2005 however should this old version of the engine be OK (particularly considering that Windows updates are being often run)?
Main question.
For ages the database has worked well then one day recently (just after running a Windows update) the following error occurred SQL Server does not exist or access denied .
I followed my code and this is the result of an exception being thrown in my code due to one of two obvious possibilities.
Everything looks fine as far as SQL Server DEsktop Engine (including services and TCP/IP protocols. Yes I have check cliconf.exe and svrnetcn.exe !!)
I specified mixed mode access (at setup) and In .NET my connection string is :
I notice that when I try to login to the database engine with OSQL it does not recognise the original sa password??
Somehow this has been changed (I definitely have not)
Q1. Is it possible that a virus (Worm) could have done this?
Q2. I think that I am stuffed(sorry) because now the sa has changed I cannot perform any admin functions (like resetting the sa pw) Is there any way to change the sa password in this sitatuon?
Q3. The database is locally setup on my development system. When I use the above mentioned connection string I assume that because I do not mention a userid and password that database access is being achieved via Windows authentication (I did specify mixed mode at setup) Is this correct?
Q4. I can appreciate the severity of the sa password being altered. However if Windows authentication is being used by my application, why should this matter? How does Windows authentication work?
Q5. I do have a backup of all the databases including master, model, temp... (I think that the sa password is stored in master). Would the crude approach of simply copying the backup of these backup database files (like master.mdf and master.ldf) suffice in fixing this problem?
I think this is probably an easy question for you. I have installed MSDE and SS Desktop Edition on two different machines (Windows 98). Each time I try to look at the Properties menu for SS Agent in Enterprise Manager, EM hangs. I installed Service Pack 2 on one machine, but that did not fix the problem. Also if I change SA password to something other than the default, SS Agent will not start. It only starts with the default password; shouldn't I change this for security reasons. I have SS7 running on another Windows NT box with none of these problems.
I am new to using SQL Server but will be having to get to know it at work and have downloaded SQL Server 2005 Express to tinker with at home.
What are the easiest methods to set up a relational database?
Are there any tools you can download to give SQL Server or the express version functionality similar to Access?
Can you get a tool to allow you to not only design tables in design view but then go on to create relationships and a database model?
Please excuse my ignorance if this is possible already, can anyone provide any links to getting started links?
There seems to be plenty out there about writing queries and stored procedures etc. but I haven't found as much about setting up a database from scratch.
Hi List Im trying to set up an implementation of Project Real --it works like this- Create two system environment variables called REAL_Root_Dir and REAL_Configuration with the values given below. Click on Start -> Control Panel -> System. Go to the Advanced Panel, click Environment Variables button, then New in the System variables box.
If the Project REAL files were installed at C:Microsoft Project REAL, then the variable values will be:
The package OLEDB connections work like this First read enviroment variable to get location of config file Next read Config File to get connection string for Config Database <?xml version="1.0"?> <DTSConfiguration> <Configuration ConfiguredType="Property" Path="Package.Connections[SQL - Configuration].Properties[ConnectionString]" ValueType="String"> <ConfiguredValue>Data Source=(local);Initial Catalog=DataWarehouseABC;Provider=SQLNCLI.1;Integrated Security=SSPI;</ConfiguredValue> </Configuration> </DTSConfiguration> Next read Config database to get connection strings for Source and Destination databases
Destination database is called "DataWarehouseABC" Source database is called "SnapshotABC"
the Source database OLEDB connection works 100% however the destination OLDB connection we get this error below PS--Both source and destination databases are on the same development machine , however both databases are restored bak files from another production machine
Error 1 Error loading LoadGroup_Daily.dtsx: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80004005. An OLE DB record is available. Source: "Microsoft SQL Native Client" Hresult: 0x80004005 Description: "Login failed for user 'xxxxxx'.". An OLE DB record is available. Source: "Microsoft SQL Native Client" Hresult: 0x80004005 Description: "Cannot open database "DataWarehouseABC" requested by the login. The login failed.".
Any ideas on how one OLEDB Connection in this package can get this corruption