Data Types:
nvarchar = Variable-length, Storage is 2 times the # of characters entered
char = Fixed-length. Storage is n bytes
varchar = Variable-length, Storage is actual length in bytes of data entered
float = Is float Fixed-length?, my precisions are 15 digits so 8 bytes.
datetime = Is datetime Fixed-length?, Storage is 8 bytes
I need the following blanks filled in for me, please :-)
I would like to know how to estimate the size of a database before filling it with records. I need a sample calculation. I am new to this concept. Pls help.
I have created a table called EMP with three columns such as Empname varchar(50), Salary int, maritalstatus bit, bloodgroup char(10). Initially the table does not contain any rows. But i have been told that the table will contain 1 lac rows. So i have been asked to estimate the database size. I don't know how to estimate the database size without inserting the records. Pls help me how to do it? Thanx
Hello , I am using SQL 7.0 , My Question is, Before creating any Tables or Index, can We use any formula to calculate or EStimate the size of the Database for the planning purpose ?
In order word
Do yo know any formula to Estimate the size of the database ?
Can someone recommend an application that produces an estimate of the size of a database from column definitions and estimated number of rows in each table? -- Thanks
Is there a way to see how much memory your current SQL Server install is using? I recently had to do some reconfiguring, and although it went fine, I'd like to build a spreadsheet model so I could see what different parameter values do to memory usage. I'm kinda surprised there isn't one already.
And yes, I realize that 99% of the configuration options go away in 7.0. We're going to have 6.5 here for a while yet.
Hi, i use this script that show me the size of each table and do the sum of all the table size.
SELECT X.[name], REPLACE(CONVERT(varchar, CONVERT(money, X.[rows]), 1), '.00', '') AS [rows], REPLACE(CONVERT(varchar, CONVERT(money, X.[reserved]), 1), '.00', '') AS [reserved], REPLACE(CONVERT(varchar, CONVERT(money, X.[data]), 1), '.00', '') AS [data], REPLACE(CONVERT(varchar, CONVERT(money, X.[index_size]), 1), '.00', '') AS [index_size], REPLACE(CONVERT(varchar, CONVERT(money, X.[unused]), 1), '.00', '') AS [unused] FROM (SELECT CAST(object_name(id) AS varchar(50)) AS [name], SUM(CASE WHEN indid < 2 THEN CONVERT(bigint, [rows]) END) AS [rows], SUM(CONVERT(bigint, reserved)) * 8 AS reserved, SUM(CONVERT(bigint, dpages)) * 8 AS data, SUM(CONVERT(bigint, used) - CONVERT(bigint, dpages)) * 8 AS index_size, SUM(CONVERT(bigint, reserved) - CONVERT(bigint, used)) * 8 AS unused FROM sysindexes WITH (NOLOCK) WHERE sysindexes.indid IN (0, 1, 255) AND sysindexes.id > 100 AND object_name(sysindexes.id) <> 'dtproperties' GROUP BY sysindexes.id WITH ROLLUP) AS X ORDER BY X.[name]
the problem is that the sum of all tables is not the same size when i make a full database backup. example of this is when i run this query against my database i see a sum of 111,899 KB that they are 111MB,but when i do full backup to that database the size of this full backup is 1.5GB,why is that and where this size come from?
Is there any good online documentation describing rules of thumb for estimating and planning a SQL Server 2005 deployment in support of a Windows rich client/WCF services architecture?
I am trying to resize a database initial log file from 500M to 2M. I€™m using€?
ALTER DATABASE <DBNAME> MODIFY FILE ( NAME = <DBLOGFILENAME, SIZE = 2 ) "
And I'm getting "MODIFY FILE failed. Specified size is less than current size." I tried going into the database properties and setting the log file to 2M, but it doesn€™t keep the changes.
I have been trying to straighten out the select statement(underlined) in the procedure below but no luck. It is at the link below:(User-Specific Paging from ASP.NET)http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnpag/html/scalenethowto05.aspI think the "author" messed up during the copy and paste. Someone please help out. I really need its correct version. Thanks.blumonde // The BindData method constructs a SQL query that uses nested SELECT TOP // statements (as described earlier) to retrieve a specified page of data.//public void BindData(){ SqlConnection myConnection = new SqlConnection(_connStr); String strCmd = ""; StringBuilder sb = new StringBuilder(); sb.Append("select top {0} CustomerID,CompanyName,ContactName,ContactTitle from (select top {1} CustomerID,CompanyName,ContactName,ContactTitle from Customers "); sb.Append("as t1 order by contactname desc) "); sb.Append("as t2 order by contactname asc"); strCmd = sb.ToString(); sb = null; // Set pseudoparameters: TableName, KeyField and RowIndex strCmd = String.Format(strCmd, _pageSize, _currentPageNumber * _pageSize); // Prepare the command SqlCommand myCommand = new SqlCommand(strCmd,myConnection); SqlDataAdapter sa = new SqlDataAdapter(myCommand); DataSet searchData = new DataSet("SearchData"); try { myConnection.Open(); sa.Fill(searchData); MyDataGrid.DataSource = searchData; MyDataGrid.DataBind(); } finally { myConnection.Close(); } CurrentPage.Text = _currentPageNumber.ToString(); if ( !Page.IsPostBack ) { using (SqlConnection conn = new SqlConnection(_connStr)) { SqlCommand cmd = conn.CreateCommand(); cmd.CommandText = "SELECT Count(*) FROM Customers"; conn.Open(); _totalRecords = (int)cmd.ExecuteScalar(); _totalPages = _totalRecords / MyDataGrid.PageSize; TotalPages.Text = _totalPages.ToString(); } } else { _totalPages = int.Parse ( TotalPages.Text ); } if (_currentPageNumber == 1) { PreviousPage.Enabled = false; if (_totalPages > 1) NextPage.Enabled = true; else NextPage.Enabled = false; } else { PreviousPage.Enabled = true; if (_currentPageNumber == _totalPages) NextPage.Enabled = false; else NextPage.Enabled = true; }}
I have installed the MSDN SQL 7.0 final release on 2 Win NT (1 server and 1 Wkst)
When I launch DTS, I CAN export/import ACCESS <--> SQL and vice versa
I CANNOT export/import SQL7 <--> SQL7
I have this error messsage : "The licence for installation of Microsoft SQL Server on your source and destination connections does not permit the use of DTS to transform data. refer to your licence agreement for more information"
any ideas why ? Is there any limitation with MSDN CD ?
I recently got me a new laptop with Vista preinstalled. All good and well, but when I try to install a program vital for my profession, I get an error (OS not supported for this program). In the install I can configure what components to install, one of them is MSDN 2000. My question is, will SQL Server Express take over what MSDN can't on Vista (and thus running the program needing the MSDN 2000), or will windows XP be the new OS on my brand new laptop in the future. Love Vista, hate the compatibility.
Where is the list for forums, When i started to write for Sqlserver, i never searched or looked for forum. Same did when i was working with the c#. Now I have to find the correct forum. So where is the list of those forums, thanks.
the msdn article explains how to input new data to a databse and return the primary key of the inputted row. It works perfectly. However, it explains how to insert a value, but there is a problem. It seems to set the value to be submitted in the VB code, instead of having the value be the user's input in the textbox. Look for the following line in the code below: newRow("ClientFileNumber") = "ClientFileNumber" It inputs "clientfilenumber" instead of what is actually inputted in the texbox. Does anyone know how to bypass this, to not have the words "clientfilenumber" inputted?Dim sqlconn As SqlConnection = New SqlConnection("Data Source=.SQLEXPRESS;AttachDbFilename=|DataDirectory|Client.mdf;Integrated Security=True;User Instance=True") Dim catDA As SqlDataAdapter = New SqlDataAdapter("SELECT * FROM Orders", sqlconn) catDA.InsertCommand = New SqlCommand("JobInsert", sqlconn) catDA.InsertCommand.CommandType = CommandType.StoredProcedure catDA.InsertCommand.Parameters.Add("@ClientFileNumber", SqlDbType.VarChar, 50, "ClientFileNumber")Dim NewJobNumber As SqlParameter = catDA.InsertCommand.Parameters.Add("@Identity", SqlDbType.Int, 0, "OrdersID") NewJobNumber.Direction = ParameterDirection.Output
sqlconn.Open() Dim catDS As DataSet = New DataSetcatDA.Fill(catDS, "Orders")
Dim newRow As DataRow = catDS.Tables("Orders").NewRow() newRow("ClientFileNumber") = ""catDS.Tables("Orders").Rows.Add(newRow) catDA.Update(catDS, "Orders")
An internal licensing review is being carried out at my site for the first time since I joined. I have been asked to confirm that development SQL Server instances have been installed from MSDN installation disks and production instances from non-MSDN disks. I understand that serverproperty('licensetype') will show me this information in SQL Server 2000, and I am (perhaps incorrectly?) assuming that a result of "DISABLED" means MSDN was used for the installation.
In SQL Server 2005, i believe the installation does not record the necessary information in the registry, meaning serverproperty('licensetype') is of no use.
Is the question i've been asked impossible to answer? Is there any way I can find out if MSDN disks (or network copies of them) were used to install a SQL Server 2005 instance?
We use MSDN SQL 2000 , the enterprise edition for our development servers, which have always had 2GB RAM. Now they are bringing in a Win 2003 Enterprise with > 12GB RAM . They want SQL SERVER 2000 to use AWE memory up to 12GB . Is there any limitation on MSDN Ent. Edition using more memory.?
Hi, I have seen many examples at MSDN library related to SQL Querries in all queries one thing is same the way they use tables in there queries. BUT wht is this really i am not getting this, can anyone tell me.. the code and the problem is as follows:
Code Snippet FROM Purchasing.ProductVendor JOIN Purchasing.Vendor ON (ProductVendor.VendorID = Vendor.VendorID)In the above code u see "Purchasing.ProductVendor", I want to ask that wht is this Purchasing Stands for, If we suppose that purxchasing is the database name then also normally we use database name as Purchasing.dbo.ProductVendor BUT I am not getting that what is this, Please if someone knows then explain it to me, Thanks.
Getting the error message System.Data.SqlClient.SqlException: SELECT permission denied on object 'mytable', database 'master', owner 'dbo'. at System.Data.SqlClient.SqlCommand.ExecuteReader...
1. After a lot of googling I've done the following: EXEC sp_grantlogin 'MYMACHINEASPNET' to grant the ASPNET logon access to the DB
2. Changed the HKEY_LOCAL_MACHINESOFTWAREMicrosoftMSSQLServerMSSQLServerLoginMode to 2 to allow mixed mode.
3. using my connection string in web.config - have experimented with different strings with/without trusted_connection and the sa uname and pwd. (Current connection string is "server=localhost;Integrated Security=SSPI;Database=master;Data Source=MYCOMPUTERNAME;trusted_Connection=yes"
I'm NOT using SQL Server so what commands do i need to give my db/table SELECT permissions? (and who am I giving permission to - very confused)
I had no bother accessing the server and DB from a simple C# command line program.
Been pulling my hair out for many hours now... any help would be greatly appreciated!
(Not having a great day - didn't mean to lock that last post - apologies)
First off - complete newbie using MSDN.
Getting the error message System.Data.SqlClient.SqlException: SELECT permission denied on object 'mytable', database 'master', owner 'dbo'. at System.Data.SqlClient.SqlCommand.ExecuteReader...
1. After a lot of googling I've done the following: EXEC sp_grantlogin 'MYMACHINEASPNET' to grant the ASPNET logon access to the DB
2. Changed the HKEY_LOCAL_MACHINESOFTWAREMicrosoftMSSQLServerMSSQLServerLoginMode to 2 to allow mixed mode.
3. using my connection string in web.config - have experimented with different strings with/without trusted_connection and the sa uname and pwd. (Current connection string is "server=localhost;Integrated Security=SSPI;Database=master;Data Source=MYCOMPUTERNAME;trusted_Connection=yes"
I'm NOT using SQL Server so what commands do i need to give my db/table SELECT permissions? (and who am I giving permission to - very confused)
I had no bother accessing the server and DB from a simple C# command line program.
Been pulling my hair out for many hours now... any help would be greatly appreciated!
Check out the new Books Online search functionality online. The link below provides a scoped search of Books Online that returns a more precise and targeted result set. You can use it to search Books Online content quickly.
I don't know why I can not see 'sign in' button on msdn forums now at my company's computer. I can see that button several days ago, but now I can not see it. Why? I only can see post but can not create a new one or reply.
SSIS 2005 MSDN Tutorial - Lesson 1 - subsection namely 'Adding and Configuring the Lookup Transformations ' - in that STEP 7 not working. Not able to select the 'columns' tab.
Anybody worked-out this Lesson1 with the step provided by MSDN.