Needs Help In Making Database
Jul 20, 2005
Please see the detail of tables with fields in SQL server 2000.
·TableStudent .Table Good Qualities
( It is a list of Students) (It is a list of Good Qualities)
1-Student Id (P.Key)1- Serial No. (P. Key)
2-Student Name 2- Good Quality
· Table Bad Qualities .Table Future Plans
(It is a list of Bad Qualities) (It is a list of Plans)
1-Serial No. (P. Key) 1- Serial No. (P. Key)
2-Bad Quality 2- Future Plans
·Table-Personality
1-Student Name/ID
2-Good Qualities
3-Bad Qualities
4-Future Plans
Data will store in Personality table like that
Student IDG.Q.No B.Q.NoF.P.No
101 3 2 1
101 4 5 NUll
101 8 Null Null
202 4 8 9
202Null 3 1
Required ResultNow I have to generate a report of One student and
sometimes of many students comprising of their Name, G.qualities, Bad
Qualities and Future Plan. To generate report User input will be only
student id.
I Need help in making relationship of these tables as well as in
Making a Query. Any suggestion to get the required result. Specially
please look at the Personality Table because I do not understand
Primary key for it. Should I just include the Serial No. as Primary
key.
Please make necessary changes to get the required result.
I shall be really thankful to you for your kind favor.
View 3 Replies
ADVERTISEMENT
Oct 12, 2005
Hello Experts,
Can anyone tell me, how can I make SQL server database empty.I mean i need to keep only restore the table structur, no table data.
View 1 Replies
View Related
Dec 9, 2005
I want to make a copy of our production database so I can do some testing stuff on it...
I basically want to just save the complete database with a name like testingXYZ.
Can I just do that through the normal file explore manager or is there some SQL Things I need to do?
View 3 Replies
View Related
May 27, 2007
Hi,
I use Sql server express 2005.I have two databases: db1 and db2.I use Studio Management. I connect with my administrator account 'admin'.
1) When i rightclick on db1 (and also on db2) and i take the properties / general, i see for both db: owner = servernameadmin .When i take properties / Files, i see for db1: owner = servernameadmin , but for db2, it remains empty.why and does it mean that db2 has no owner? But then, why do i see in properties / general : owner = servernameadmin?
2) i want to make 'admin' owner of db2 (for creating a database diagram), so in properties / Files, i click on the button with three dots.A windows "select database owner" appears, i click on button 'browse', but then all i see is:built-in administartorsbuilt-in userssa...
Whatever i choose (e.g; built-in administrators), i get the message: an entity of database cannot be owned by a role, group ... error 15353).
Why do i not get the account 'admin' in the browse windows and how to make 'admin' owner of db2?
Thanks for helpT.
View 3 Replies
View Related
May 1, 2008
Hi All,
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.
Regards,
Richard.
View 4 Replies
View Related
Mar 5, 2004
Hi
I have copied a sql server backup file. I would like to make it a live database. How would I do this??
View 13 Replies
View Related
Jul 23, 2005
Hello everyone!I'd like to know which method is better for making a copy of anexisting database in SQL Server 2000, restoring from a backup of theoriginal, or using DTS to copy the objects to the new database. Anycaveats or drawbacks to either method? I'm just trying to lay thegroundwork for internal policies for managing our databases, and I justwant to make sure we use the best method.Thanks!
View 2 Replies
View Related
Jul 20, 2005
I have a 6.5 db that I want to create a copy of, I can move it to eithera machine running 7 or 2000. I am more used to doing this in Oracle sopls bear with me...I don't want to have any downtime on the 6.5 db, so I'm thinking perhapsimport is the best way to go? I am assuming that 6.5 backups are notcomaptible with either 7 or 2000 restore, or I'd go that route.The database in question is fairly simple, pretty well just tables fullof data, no stored procs...suggestions?TIA
View 4 Replies
View Related
Mar 21, 2006
Hello
I am trying to maintain a small database on my iPAQ, can somebody tell me that would database be created in SQL Server Mobile on my iPaq and can my VB.net based Windows CE application can access data from the database on my iPAQ
tHNAKS
View 1 Replies
View Related
Dec 28, 2007
hello
here is my code int a = Convert.ToInt32(Request.QueryString["ProductID"]);
SqlConnection conn = new SqlConnection(ConnectionString);
SqlCommand command4 = new SqlCommand("myStoredProcedure", conn);
command4.CommandType = CommandType.StoredProcedure;
DbParameter param2 = command4.CreateParameter();
param2.ParameterName = "@ProductID";
param2.DbType = DbType.Int32;
param2.Value = a;
command4.Parameters.Add(param2);
param2 = command4.CreateParameter();
param2.Direction = ParameterDirection.Output;
param2.ParameterName = "@UserName";
param2.DbType = DbType.String;
command4.Parameters.Add(param2);
conn.Open();
command4.ExecuteReader();
conn.Close();
Label3.Text = command4.Parameters["@UserName"].Value.ToString();
}Exception Details: System.InvalidOperationException: String[1]: the Size property has an invalid size of 0.Line 48:
Line 49: conn.Open();
Line 50: command4.ExecuteReader();
Line 51: conn.Close();
and here is my stored procedure ALTER PROCEDURE dbo.myStoredProcedure
--
(@ProductID int,
@UserName varchar(255) OUTPUT)
AS
SET @UserName = (SELECT UserId FROM Products WHERE ProductID = @ProductID)
what is wrong? i never seen that error and i don't know from where could it came from
please help me,
thanks
View 2 Replies
View Related
Feb 7, 2008
How would I hide the sa account to be accessible under Logins for a restricted User in sql server 2005 and also other folders like Replication, Managment, etc need to be hidden too.
any idea,
thank,s
View 1 Replies
View Related
Dec 12, 2007
VWD 2005 Express. Visual Basic. Sql Server 2005. I am trying to establish a connection to a SQL database. The connection (and all other database reads and writes) work fine in debug and in "view in browser" from VWD. I am running the VWD on the same server that hosts the site. When on my server (Windows 2003 Server) under IIS, the connection attempt times out.
Below is the code that is failing (only on the server when deployed):
Private Shared Sub OpenConn(ByVal cmd As SqlCommand, ByVal Success As Boolean)
Dim conn As New SqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings("GoodNews_IntranetConnectionString").ToString)
'The connection string resolves to ("Data Source=HQSERVERHQSERVER;Initial Catalog=GoodNews_Intranet;Integrated Security=True"
Try
conn.Open()
cmd.Connection = conn
Success = TrueCatch ex As Exception
Success = False
End Try
End Sub
View 6 Replies
View Related
Jan 5, 2008
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately. Compiler Error Message: BC30456: 'InserParameters' is not a member of 'System.Web.UI.WebControls.SqlDataSource'.Source Error:
Line 15: registrationDataSource.InsertCommand = "INSERT TO Reputation (firstname, lastname)VALUES(@First Name, @Last Name)"
Line 16:
Line 17: registrationDataSource.InserParameters.Add("firstname", firstname.txt)
Line 18: registrationDataSource.InserParameters.Add("lastname", lastname.txt)
Line 19: Source File: C:UsersQaiphyx
eputationDefault.aspx.vb Line: 17
Show Detailed Compiler Output:
View 1 Replies
View Related
Jan 17, 2008
I am developing a web site with asp.net 2.0 and c#, using Visual Studio 2005 and Microsoft SQL Server 2005 ( I am still learning about these technologies and languages ).I transferred my web site files to my NEW computer. The web site worked fine when running inside Visual Studio, however when I tried to run it in its PUBLISHED format it was giving this error message:Server Error in '/MA' Application. Cannot open database "SiteData" requested by the login. The login failed.Login failed for user 'CENTAURUSASPNET'.I solved the problem by running SQL Server Management Stdio, right clicking “SiteData� database -> properties -> permissions->view server permissions then I chose “CENTAURUSASPNET� and since I DID NOT KNOW what grants are ESSENTIAL for the functioning of the database, I GRANTED EVERYTHING ( I ticked ALL the permissions).
But since, probably, a lot of GRANTS are not only unnecessary but also may compromise the security of the web site, I would like to know what are the ESSENTIAL OR MINIMUM GRANTS NECESSARY for making the database functional to the web site and what grants may represent a security risk.
View 5 Replies
View Related
Aug 21, 2012
I I work for a small business who has a somewhat successful ecommerce site. Our website is based on some VERY large DB's with 10's of millions of records, and 40+GB of images, so we choose to self host so we could easily manage the data. As things have grown and we've cobbled a fair amount of integration between the website databases and our internal systems. Fast forward 4-5 years, the website has grown to the point that self hosting is costing us a fortune in bandwidth costs, so I'm thinking of moving to a co-location facility. If I do that, I need to send the website tables along with it. Is there a replication stradagy that would allow us to have two independant DB's, both able to take updates that would sync with one another? My other thought is to spit the tables on two different DB's and let some of the data live in the co-location facility.. but I am worried about the performance impact for local users.
View 3 Replies
View Related
Jun 3, 2015
We have database when trying to make read only throwing below error: with stack dump
Location:Â Â Â Â Â Â Â Â Â Â Â Â Â recovery.cpp:4517
Expression:Â Â Â Â Â Â Â Â m_recoveryUnit->IsIntendedUpdateable ()
SPID:Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â 51
Process ID:Â Â Â Â Â Â Â Â Â 6448
Msg 926, Level 14, State 1, Line 1
Database 'XXXX' cannot be opened. It has been marked SUSPECT by recovery.
See the SQL Server errorlog for more information.
Msg 5069, Level 16, State 1, Line 1
ALTER DATABASE statement failed.
Msg 3624, Level 20, State 1, Line 1
A system assertion check has failed. Check the SQL Server error log for details. Typically, an assertion failure is caused by a software bug or data corruption. To check for database corruption, consider running DBCC CHECKDB. If you agreed to send dumps to Microsoft during setup, a mini dump will be sent to Microsoft. An update might be available from Microsoft in the latest Service Pack or in a QFE from Technical Support.
Msg 3313, Level 21, State 2, Line 1
During redoing of a logged operation in database 'XXXX', an error occurred at log record ID (0:0:0). Typically, the specific failure is previously logged as an error in the Windows Event Log service. Restore the database from a full backup, or repair the database.
Msg 3414, Level 21, State 1, Line 1
An error occurred during recovery, preventing the database 'XXXX' (database ID 7) from restarting. Diagnose the recovery errors and fix them, or restore from a known good backup. If errors are not corrected or expected, contact Technical Support.
Investigation DONE:
- DBcc checkdb shown CleanÂ
- database is online and able to access
-Detached database and attached with rebuild log, still could not bring database read_only
SQL version : SQL server 2008 SP4.Â
View 15 Replies
View Related
Aug 6, 2015
I want to make data changes in read_only database , that's why i must set database read_write. While database is at read_write mode, i want to be sure that no one makes change in database.
For this aim, i write the code below, but i suspect that after setting the database read_write, till the setting database
single_user ,is it possible get DML script from another user. Is the code below enough for this operation. Or is there another way?
Reminding: Read_only database can not be set single_user mode. That's why, first you must set database read_write.
The code;
use master
alter database xxx set read_write
with rollback immediate
alter database xxx set single_user
with rollback immediate
use xxx
update tablexxx set columnxxx=yyy
use master
alter database xxx set read_only
with rollback immediate
alter database xxx set multi_user
with rollback immediate
View 5 Replies
View Related
Jan 12, 2012
i attached adventure works in sql server 2008 and it showing as read only ,make it read write or remove read only tag from database.
View 11 Replies
View Related
Apr 14, 2007
Hello, I have a table of data with the following columns:ParticipantResult (win or lose)The table has other data in, but I want to make a league to sort by the amounts of wins. For example: Participant Won PlayedA 5 10B 4 7C 3 3 I want this to show up on web page. I was hoping to do this through the source code on the web page, but I am struggling to do it.Is there a better way to do this, or a place where I can see an example of the code. Many Thanks, Oliver
View 1 Replies
View Related
Dec 7, 2003
with SQL desktop engine installed where do I even begin working with it?
View 1 Replies
View Related
Feb 25, 2005
I hope I can explain this somewhat coherantly. Here goes..
I have a products database. I want to select product details for items having distinct style codes. IE if there are 20 products that different from one another in some way, and 3 different style numbers throughout them, I want to end up with 3 products selected. I don't care which ones, as long as i have a sample product for each style.
I've attemped to use GROUP BY to do this, but it's not giving me what I want. I managed to get right number of products, but the query seems to have mixed and matched the fields together in an undesireable way. I guess this kinda makes sense, since providing aggregate functions for each of the extra fields is necessary.
SO THE QUESTION IS: How do I select (number of distinct styles) products, and still keep the records in tact as they should be?
Here is a sample...
Code:
SELECT DISTINCT Min(team) as team, min(pict) as pict, min(colors) as colors, min(league) as league, min(product_description) as product_description, min(category) as category, min(subcategory) as subcategory, min(style) as style
FROM prods
WHERE (style='style1' or style='style2' or style='style3')
AND league='leaguex'
AND soldout=''
GROUP by style
ORDER by style
Thanks very much for any help!! I'm sure I'm going about this all wrong.
View 2 Replies
View Related
Jun 2, 2006
Hi,
What is the best method/model for having real time replication set up and also needing the ability to drop and recreate SP's/Tables/UDF's etc? I keep getting the error of the SP is being used in replication so it cannot be dropped...
Thanks in advance.
Adam
View 1 Replies
View Related
Oct 20, 2006
Hi alllI have these tables below with 3 fields each. I want to get the recordin table 1 whose field number value is same in table 2 but field number2 on both tables are different. I mean i want the record1500 800 2. Insight: Table 1 is modules ordered and table 2 is modulesdelivered. I want to get 1500 800 2.beacuse module 800 was ordered butin table 2 module 503 was delivered. can some one help me with a joinnice weekeendTable 110 5012 101600502100 502 31500800 2Table 21500503 114004000100502 10100600100502 3
View 3 Replies
View Related
Jun 18, 2007
Hello Everyone,
I have a dimension that has the following members:
Directors
Senior Managers
Managers
Senior Associates
Associates
But they way they need to be displayed includes subtotals. Senior Managers and Managers are placed into Management and Staff is a total of everyone except Directors. They should appear on the report in something like this:
Directors 10
Senior Managers 15
Managers 9
Management 24
Senior Associates 17
Associates 40
Staff 81
Total 91
What is the best way to do this? Right now I am using a matrix because I am also showing headcounts by Period. Is a table a better way to go? Is it something that should be done in my dimension?
I can do the Total part. I am just not sure how to make the subtotals inbetween the other lines.
Thank you for the help.
-Gumbatman
View 3 Replies
View Related
Feb 10, 2006
how can i create a report for my database? how can i create bar graphs, etc.? im using msde and sql express. pls help. thanks.
View 3 Replies
View Related
May 9, 2007
I have been reading up on how replicating schema changes work, but I must be missing something. When I configured a database for replication, it added a rowguid column to each table. This I understand.
I want to test making a schema change and replicating that change. For example, I tried to add a column to an existing table. When I tried to save the table i get the following error:
"Error validating the default for column rowguid".
"- Unable to modify table.
It is invalid to drop the default constraint on the rowguid column that is used by merge replication.
The DDL operation failed inside merge DDL replication manipulation.
The transaction ended in the trigger. The batch has been aborted."
So, what am I missing? Do i need to drop the rowguid column, add the new column, and then re-add the rowguid column?
Many thanks...
View 6 Replies
View Related
Oct 2, 2007
Hi,
I have the following flow in which i am looping through a folder containing textfiles
Foreach loop
[
ScriptTask -> DataFlowTask -> Execute SQL
]
In my ScriptTask, i am checking the file validity. Now if the file is found incorrect, I do not want the DataFlowTask and other to execute. Instead i want the file to be moved to Error and the loop to proceed with the next file. If the file validity is correct, DFT and ExecuteSQL execute. How do i do this?
Some explanation supported by examples would help.
Lalit
View 1 Replies
View Related
Jul 9, 2006
hi
I am not able to create connection string through vwd express for sql express database file n getting a error:
An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)
plz tell me where is the problem n how can i resolve it
Thanks n with regardsCN
View 1 Replies
View Related
Feb 21, 2008
Hi Guys, I came here again to ask something about my application, Is there a way to make 2 columns unique with each other even if they don't have a primary key? If there's a way how? I wanna make a rule so, my application wont replicate its record. Graciaz,Nhoyti
View 3 Replies
View Related
Aug 19, 2005
Hi
I have no idea but want to learn it how to make random names with sql server...
I have a table, called table1, for colums Firstname and Last name
I want it to make random names, so much it is possible it can get, in table2 where the colums is named Names
PLEASE HELP :)
View 2 Replies
View Related
Aug 22, 2005
I have a datagrid in my file along with an Update Query.
My Update Query basically adds the numerical values in two columns
together when the page is loaded. This means whenever the page is
Refreshed the Update query is fired.
This is my Update Query (which is in an Stored Procedure):
UPDATE Rental
SET TotalFee = ExtraFee + TotalFee
WHERE DaysOverdue >= 0
I have declared my query in the 'Page_Load' part of the coding, because
I want the query to run automatically. Not manually by a button.
My main question is that how can I get the query to run only once a day, no matter how many times the page is loaded.
View 7 Replies
View Related
Nov 13, 2001
Playing with DTS for converting text data to SQL Server table and sending email messages. Package is to be scheduled hourly.
1. Is there any easy way to force DTS to choose Success or Failure based on a SQL Task? Wish to check contents of a table for new values and branch accordingly in DTS.
2. When new records are brought in I wish to build a custom email message rather than attaching a text file. Any Idea how to build a custom message?
I am attempting to auto scan an error log on a Unix based system and email myself when errors occur. This is an exercise to test scheduling of jobs, bridging between technologies and sending out meaningful messages based on the process via email.
Thanks,
Mike Hoyt
View 1 Replies
View Related
Jul 26, 2002
Can anyone help me retrieving that result.
take an example
EXEC-ID JOB-CODE
0001 20
0001 63
0001 03
i want result in the following format:
EXEC-ID JOB-CODE1 JOB-CODE2 JOB-CODE3
0001 20 63 03
View 1 Replies
View Related