Store Db Objects In *.ndf Vs. *.mdf??

Sep 25, 2006

I am new to SS2005, and I've just started working on a small test/dev
database.

I recently read that one should store things like tables, views,
constraints, etc. in the *.ndf file rather than in the *.mdf file.

Does this make it any easier to transfer/copy files or databases or
other items from test/dev to production??

If I have a database already with items in the *.mdf file, how do I
transfer things like tables, constraints, views, etc. to an *.ndf file
in another database??

I also read that one can make it the default in SS2005 to store things
in the *.ndf file, how is this done??

Thank you,
Tom

View 5 Replies


ADVERTISEMENT

Need To Cache Or Store These SqlDataSource Objects

May 2, 2008

I have the following:omegalove.comIf you go to the search portion u will notice that there are three dropdownlist that are populate using sqldatasource object.I do not want these two post back. Is there a way we can cache this so it is faster.I would like to learn. I appreciate any help. Please don't give me links. I much rather learn from someone who has hands on.Thank you
I will have to separate the code from the ui?---------------------------------------------------------------------
Country:<asp:Image ID="FlagImg" runat="server" Height="12px" Width="20px" />

<asp:DropDownList ID="ddlCountry" runat="server" DataSourceID="SqlDSCountry" DataTextField="Country"

DataValueField="CountryID" AutoPostBack="True" OnDataBound="ddlCountry_DataBound" OnSelectedIndexChanged="ddlCountry_SelectedIndexChanged">

</asp:DropDownList>

<asp:SqlDataSource ID="SqlDSCountry" runat="server" ConnectionString="<%$ ConnectionStrings:omegaloveConnectionString %>"

SelectCommand="SELECT [CountryID], [Country] FROM [CountryCodes] ORDER BY [Country]">

</asp:SqlDataSource>


----------------------------------------------------------
State/Province:<br />

<asp:DropDownList ID="ddlRegion" runat="server" AutoPostBack="True"

DataSourceID="SqlDSRegion" DataTextField="Region" DataValueField="RegionID" OnDataBound="ddlRegion_OnDataBound" OnSelectedIndexChanged="ddlRegion_SelectedIndexChanged">

</asp:DropDownList><asp:SqlDataSource ID="SqlDSRegion" runat="server" ConnectionString="<%$ ConnectionStrings:omegaloveConnectionString %>"

SelectCommand="SELECT [RegionID], [Region] FROM [SubCountryCode] WHERE ([CountryID] = @CountryID)">

<SelectParameters>

<asp:ControlParameter ControlID="ddlCountry" Name="CountryID" PropertyName="SelectedValue"

Type="String" />

</SelectParameters>

</asp:SqlDataSource>
---------------------------------------------------------------
City :<br />

<asp:DropDownList ID="ddlCity" runat="server" AutoPostBack="True" OnSelectedIndexChanged="ddlCity_SelectedIndexChanged" DataSourceID="DSCity" DataTextField="City" DataValueField="City">

</asp:DropDownList>

<asp:SqlDataSource ID="DSCity" runat="server" ConnectionString="<%$ ConnectionStrings:omegaloveConnectionString %>"

SelectCommand="SELECT [City] FROM [WorldCities] WHERE (([CountryID] = @CountryID) AND ([RegionID] = @RegionID))">

<SelectParameters>

<asp:ControlParameter ControlID="ddlCountry" Name="CountryID" PropertyName="SelectedValue" Type="String" />

<asp:ControlParameter ControlID="ddlRegion" Name="RegionID" PropertyName="SelectedValue" Type="String" />

</SelectParameters>

</asp:SqlDataSource>

---------------------------------------------------------------------------------------------------------------------------------------------------------------
This is my behind code.
using System;using System.Data;using System.Configuration;using System.Collections;using System.Web;using System.Web.Security;using System.Web.UI;using System.Web.UI.WebControls;using System.Web.UI.WebControls.WebParts;using System.Web.UI.HtmlControls;using OmegaLove;using OmegaLove.UI;namespace OmegaLove.UI.Controls{    public partial class Search : BaseWebPart    {            protected void Page_Load(object sender, EventArgs e)        {        }                protected void ddlCountry_SelectedIndexChanged(object sender, EventArgs e)        {            FlagImg.ImageUrl = "../images/flags/" + ddlCountry.SelectedValue + ".gif";            ResetRegion();            ResetCity();        }        protected void ddlRegion_SelectedIndexChanged(object sender, EventArgs e)        {            ResetCity();        }        protected void ddlCountry_DataBound(object sender, EventArgs e)        {            ddlCountry.SelectedIndex = 39;            FlagImg.ImageUrl = "../images/flags/" + ddlCountry.SelectedValue + ".gif";        }               protected void ddlRegion_OnDataBound(object sender, EventArgs e)        {            ResetCity();        }        private void ResetRegion()        {            ddlRegion.Items.Clear();         //   ddlRegion.DataBind();            if (ddlRegion.Items.Count == 0)            {                ListItem item = new ListItem("Not Available");                ddlRegion.Items.Add(item);            }        }        private void ResetCity()        {            ddlCity.Items.Clear();        //    ddlCity.DataBind();            if (ddlCity.Items.Count == 0)            {                ListItem item = new ListItem("Not Available");                ddlCity.Items.Add(item);            }        }        protected void ddlCity_SelectedIndexChanged(object sender, EventArgs e)        {        }}}
 
 

View 6 Replies View Related

Store Objects In Sql Server 2000

Oct 25, 2004

How can we store native .NET objects like arraylists, hashtables in Sql Server? Is this possible? If so, can anybody provide some insight on how to do this?

Thanks

View 4 Replies View Related

Cross Referance DB Objects Accross Store Procs

Sep 25, 2006

We are in the midst of cleaning up database01. There are objects in database01 that are widely used in store procedures that reside in database02.

Problem is: I need to know which tables and view from database01 are in use by store procedures in database02. This is important because if I accidently decommission tables that are currently in use by production class s-procedures, it will not be pretty. A sample output could look like:

StoreProc UsingObject
sp001 ctblCodeName
sp002 tblUnitSales
so003 tblSalesTrans
.......... .................

I am not a programmer and none of our programmers here claim that there is any solution to this problem without spending thousands on s/w licenses. Any simple solution + code snippet that will help me resolve this problem by myself would be incredibly valuable.

In disstress and frustration . . . .

JJOSHI

View 4 Replies View Related

Good Practice When Working With Objects Using SQLServer As A Secure Store.

Oct 11, 2006



I'm sure this has been asked plenty of times before, so I'm after a link to a good answer.

I have tens of thousands of milk crates, holding dozens of different types of milk in hundreds of locations. I am used to working with objects but not databases. For this situation however I want the security of SQLServer transactions to track, for example, when a robot moves a crate from one location to another.

I am thinking of using SQLServer as a store. On startup I want to get my ecosystem of objects out of the store. While I am running, I'll just use objects. When I change an object property I want it to securely persist. I don't want to snapshot the whole menagerie of object states, just update the values that changed. Which will sometimes include the addition or deletion of objects. How do I do this? Is there an example somewhere that does this (or approximately this)?

I use VB and have Visual Studio 2005. (Which, by the way, is stunning. I thought all that "you will use less time and code more and better" talk was just hype. But its for real. Amazing product.)

tia

John









View 1 Replies View Related

Putting Names Of Objects To Control-flow Loop Creating Objects

Dec 27, 2006

please help newbieI need to create a lot of objects the same type (let's say: schemas)I wish to use paramerized block in loop to do so.- how to put names of my objects to such control-flow?belss you for help

View 5 Replies View Related

SQL Server 2012 :: Select Data From XML - Objects Within Objects?

Nov 20, 2013

passing serialised objects to a stored procedure for the purpose of data inserts. I see this as being a way to handle multiple row inserts efficiently.

However, in my limited use of XML data I am not so sure how to link the data when I have a dependency on another "object" within the serialised XML.

Below is a code snippet showing what I have so far.

The first insert statement works fine - but how to retrieve the identifier created by the DB - I want to use an SQL statement that finds the record in the table based on the XML representation (of the PluginInfo), allowing me to insert the ConfigurationInfo with the correct reference to the PluginInfo

DECLARE @Config NVARCHAR(MAX)
DECLARE @Handle AS INT
DECLARE @TransactionCount AS INT
SELECT @Config = '
<ConfigurationDirectory >
<ConfigurationInfo groupKey="Notifications" sectionKey="App.Customization.PluginInfo"

[code]....

View 1 Replies View Related

Store Procedure Not Store

Nov 20, 2013

My store Procedure is not save in Strore Procedure folder at the time of saving it give me option to save in Project folder and file name default is SQLQuery6.sql when i save it after saving when i run my store procedure

exec [dbo].[SP_GetOrdersForCustomer] 'ALFKI'

I am getting below error :

Msg 2812, Level 16, State 62, Line 1
Could not find stored procedure 'dbo.SP_GetOrdersForCustomer'.

View 13 Replies View Related

Call Store Procedure From Another Store Procedure

Nov 13, 2006

I know I can call store procedure from store procedure but i want to take the value that the store procedure returned and to use it:

I want to create a table and to insert the result of the store procedure to it.

This is the code: Pay attention to the underlined sentence!

ALTER PROCEDURE [dbo].[test]



AS

BEGIN

SET NOCOUNT ON;



DROP TABLE tbl1

CREATE TABLE tbl1 (first_name int ,last_name nvarchar(10) )

INSERT INTO tbl1 (first_name,last_name)

VALUES (exec total_cash '8/12/2006 12:00:00 AM' '8/12/2006 12:00:00 AM' 'gilad' ,'cohen')

END

PLEASE HELP!!!! and God will repay you in kind!

Thanks!

View 7 Replies View Related

OLE Objects

Aug 27, 2001

Hi, there,

I use VB to make an dll file and register on my local PC, then use sp_OACreate to create OLE object on local SQL server, it works fine. But when I register that dll on other SQL server, it dosen't work, anybody have idea about this? Thank you.

Tony

View 1 Replies View Related

How To Use Objects??

Jul 17, 2000

I see these type of objects in Books on Online. I was just wondering
if anyone knows how to use these objects, seems to have lot of good
information. Could these objects be called in VB?

--------------------------------
CreateDate Property (SQL-DMO)
The CreateDate property indicates the date and time the referenced SQLServer object was created.

Applies To
Database Object Table Object
DBObject Object TransactionLog Object
Default Object Trigger Object
Rule Object View Object
StoredProcedure Object


Syntax
object.CreateDate

Part Description
object Expression that evaluates to an object in the Applies To list


Remarks
The string returned is formatted by using the locale setting of the workstation.

Data Type
String

Modifiable
Read-only

Prototype (C/C++)
HRESULT GetCreateDate(SQLDMO_LPBSTR pRetVal);
--------------------------------------------------------

View 1 Replies View Related

Sys.objects

Sep 21, 2007



Anyone know how to grant a user to see all data in sys.objects view?

Thanks.

View 1 Replies View Related

Sys.objects

Sep 21, 2007



Anyone know how to grant a user (who is not a sa) to see all data in sys.objects view?

Thanks.

View 1 Replies View Related

COM Objects Under 64-bit?

Jan 25, 2007

Hi everyone,
 
Primary platform is Framework 2.0 under 32-bit
Production platform will be Framework 2.0 under 64-bit.
 
I'm concerned about what object should I use in order to launch DTS 2000/7.0 from our .Net service.
 
Currently it tested fine from a 32-bit environment (sql server 2005 as backend).
 
Reference: "Microsoft DTSPackage Object Library"
Physical file:  dtspkg.dll
 
My wonder,  is there any limitation when it's gonna to work on 64-bit?
 
Generally speaking, any limitation/issue/drawback for COM objects under 64 bit??
In my project properties appears Any CPU, x86, x64. I've got now Any CPU.
 
Thanks for your advices,
 
 

View 13 Replies View Related

Closing ADO Objects

Apr 4, 2007

I know it's "best practice" to dispose ado.net objects, but does it make a big difference if just the connection is closed? In other words, is the code below good enough or should the DataAdapter & Command be explicitly closed?using (SqlConneciton  cn = new SqlConnection(connstr)){ SqlDataAdapter da = new SqlDataAdapter(sql,cn);DataSet ds = new DataSet();da.Fill(ds); SqlCommand cmd = new SqlCommand(someOtherSql,cn);cmd.ExecuteNonQuery();  } 

View 2 Replies View Related

Objects In SQL Server

Jun 16, 2008

Hi,
I am a Database called "Cache"  user and in it and when creating a new table I can create a column of type Object.
So basically, I can create an object eg. Address that have the following items StreetNo, StreetName, PCode somewhere in my database; then create a table called eg. Employees that have a column called EmployeeAddress of type Address (as my Address Object). Can this be done in SQL Server!?
 
 
Thanks. 

View 4 Replies View Related

Managed Objects

Mar 21, 2006

Hello people :-)I'm doing some development work with Visual Studio 2005 and SQLServer 2000. My SQL DB is running on a Windows 2000 Server box in the office, and I'm doing the development on my XPPro workstation. Now I've been trying to connect to the Win2000 box though VS and although I can see the server and the DB when I hit ok I get this error"The SQL server specified by these connection propertise does not support managed objects"What the heck does that mean?any help would be great :-)

View 1 Replies View Related

Protecting Objects From Even The SA

Feb 22, 2001

I am currently writing a VB app based around a SQLserver2000 database. I have used stored procedures wherever possible to select/update/delete data. I am planning to distribute this app and wonder whether there are any tricks out there for encrypting/setting security so that even the SA account would be unable to read my stored procedures, but obviously be able to execute them?

There are two scenarios - one is where I want to let someone borrow a laptop just for a few days for a demo. Presumably I just give them an unprivileged user account without interactive logon possibilities, by which I mean Enterprise Manager and the other SQLserver Client tools [can I do this?] and control all access from the app.

The other scenario is when the app is purchased and I no longer have control of the SQL Server nor the SA account.

Any pointers would certainly be very useful indeed. Thanks.

View 1 Replies View Related

Export Objects

Jan 2, 2002

Hi all, I know we can use DTS package to export or import objects from one db to another. Now I need to write a procedure that will perform similar functionality. Any thoughts on this? Thank you!

View 2 Replies View Related

Transfer/Objects

Jul 26, 2000

Hi,
I am in the process of upgrading database in sql server 6.5 to 7.0.
For that i am following one computer upgrade.
For creating dev environment in my computer i am using Transfer/Objects in 6.5
for transferring database from remote(production) computer to my computer.

Do i need only to transfer Userdatabase alone or do i need to Transfer Master and other ?
Or Is it better to restore dump ?


Thanks

View 4 Replies View Related

Hiding Particular Objects

Aug 1, 2000

Hey guys,
Is there any way to hide a particular object(table,sp,tr etc) from
a particular user?

we are developing softwares for the clients..and Once we install our product we dont want the clients site guys to go and delibrately view the data from sql server but through the front end. Is there anyway that i can do that...?

For Eg..the front end codes are capsulated as DLLs so that no can view the code.. Like that for SQL Server..can we do that kinda stuffs to prevent them?

View 5 Replies View Related

Script Objects

Aug 14, 2000

Is there a way to schedule the creation of script to create database objects?
I am using DTS to transfer data between two 6.5 servers, but I need a way to
sync the stored procs. I thought I could schedule the creation of a script to create all the
procs and then run it every day.
Thanks

View 1 Replies View Related

Script Objects

Aug 14, 2000

Is there a way to schedule the creation of script to create database objects?
I am using DTS to transfer data between two 6.5 servers, but I need a way to
sync the stored procs. I thought I could schedule the creation of a script to create all the
procs and then run it every day before everyone needs the systems.
Thanks

View 1 Replies View Related

Open Objects Value

Jul 31, 2000

SQL server 6.5 stopped responding. The last error messages in the SQL Server Error Log / NT Event log suggested that I increase the Open Objects / Open Databases values. I rebooted the server, increase the configuration values, and rebooted the server again for the new configuration to take affect. I suspect that the front-end application does not release the objects properly when it should; therefore increasing Open Objects / Databases configuration values will only be a temporary fix until they reach the new maximum in some time. However to prove that I need to be able to determine how many open objects / databases are on the server at a point of time. Is there a procedure or a method to determine how many open objects / dtabases are on server?

Any comments or suggestions are greatly appreciated.

Thank you
Marina Somers

View 1 Replies View Related

CHanged Objects

Dec 7, 1999

Is there a way to produce a query to look at when and who changed database objects last?

View 1 Replies View Related

Copying Objects

Mar 5, 2003

Is it possible to copy tables/indexes/data from one db to another (on the same server) while specifying a new owner & w/o logging?

View 11 Replies View Related

Transfer Of Objects

Aug 3, 1998

This should be simple. I am transfering one database from box A to the same database structure on box B. Straight transfer with the transfer utility. All objects, all defaults. The problem is that now, not all the objects are transfering. There are about 20 tables that are not being populated. The table gets dropped and recreated, but not populated. There is plenty of disk space and the log is empty. (or so reported) Why are not all the tables going over. I can manually repopulate the tables and no problems. ANY hints are greatly appreciated.

Thanks,
Peter Cwik

View 3 Replies View Related

No SQL Objects In Perfmon

Mar 17, 1999

I am not showing any sql objects when trying to monitor my sql server through perfmon. This is the situation when running NT perfmon or SQL perfmon locally on the server or from a workstation through the network. I have found some tech net articles but they all say that the ojects should exist locally on the server. Any ideas?

Thanks David

View 1 Replies View Related

No SQL Objects In Perfom

Mar 12, 1999

I have a strange situation occuring. Our SQL server (BDC on resource domain) loses rpc connectivity after 90 minutes. After that time we cannot log on to the server. Get "System Cannot Log You on C0000017 error. Technet says this is due to a memory leak. THe only thing running on this server is SQL. Recently I changed security from mixed to standard and back to mixed as a test, bumped user connections from 500 to 1000 and moved two new databases to this server. THe strange thing is that after rebooting and ablitly to log on I see the sqlservr.exe process take up 64 mbs of data. But there does not seem to be any other memory indications.
Any ideas?

View 1 Replies View Related

Copy Db And All Its Objects

Sep 3, 2001

how can i copy a data base created in sql server2000 to another server (sqlserver2000)without replication because they're distant and not connected i have tried the DTS but it does'nt copy stored proc ,views,triggers,diagram,...
help please

View 1 Replies View Related

Sizing Db Objects

Dec 28, 2004

Hello, I'm looking for a sizing Excel (or any other format) file, that permits me evaluate the size of my sql server database, actually I have one excel file for Oracle, where I only put the expected # of rows, the average size of the columns, and other few data, and I can get the size (in Megabytes) of a table or an Index.

Could you provide me something similar??

Thanks !

View 1 Replies View Related

How To Transfer All Objects

Mar 30, 2015

I have an upgrade to do from Sql-Server 2005 to Sql Server 2014. how I would do the upgrade! Should I install 2014 on another box or the same box (or do I just upgrade over the 2005 version - which seems risky)? How do I transfer all of the objects from 2005 to 2014? I'm referring to the tables/ sprocs/ views/ etc already on 2005?

View 9 Replies View Related

Looping Through Sys Objects

May 12, 2008

I want to apply the same query for 250 tables (see below).
It would be very painful to code 250 individual queries.
Is there a way to loop through all 250 tables using "sysobjects WHERE type = 'U'", and applying the below code for each table (users table would remain constant)?


select co.*
from company table_type
where not exists(select * from users u
where (u.users_id = type.rn_create_user) or (u.users_id = type.rn_edit_user)
)

View 11 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved