Monday, May 30, 2011

DETTACH / attach in SQL SERVER 2000

| Monday, May 30, 2011 | 0 comments

DETTACH / attach in SQL SERVER 2000
You probably have done a copy of the database to other location by using a database backup Either attach or detach the database operation. Do you know what precisely Happen behind detach the database under the hood?
Detach the database Could Be done only if the database is not being accessed by anyone. If you Would like to make sure none accesses the database, you cans set the database to sql SINGLE_USER in ALTER DATABASE command with one of the termination options: WITH ROLLBACK AFTER n SECONDS WITH ROLLBACK IMMEDIATE or (Where n is a any integer number), for example:
ALTER DATABASE AdventureWorks2008
After That you cans sp_detach_db <databasename> issue (for example: EXEC sp_detach_db AdventureWorks2008).
Interesting thing to note Is That Pls detach a database is Issued, SQL Server will of copy dirty pages (pages changes since last checkpoint) back to corresponding pages in database files. You just only need to copy / move files into other database location for attaching the SQL Server database and transaction log files Could rebuild for you. But there are two conditions database That you need to be aware about.
If the database is read only, you need to include not only data files but Also Pls attach the transaction log file database. If the database is read write, you need only to include data files.
Since SQL Server 2005, the syntax for attach database is CREATE DATABASE ON <filespec> <database name> [, .... N] FOR {attach | ATTACH_REBUILD_LOG}. The legacy command sp_attach_db Should not be Used Because it Becomes depreciated features and Could Be removed in future SQL Server releases. The difference Between the new syntax and legacy Is That the maximum number of files on legacy is up to 16 files on the new syntax whereas the maximum number of files That Could be attached is up to 32.767 32.767 files and file groups. Certainly you will from never reach the number of files That need to be attached.
To me, attach-detach is as good as a backup-restore the database. The only difference Between Them Is That database is still accessible During the backup-restore whereas attach-detach requires a database to be offline.
** If my friends do not know what it means can translate on google
Bottom line:
DETTACH / Attach
Function: copying files to a server database and SQL Server menginisilisasi
How to Attach:
From Interprise Manager
Right Click - All Task - Attach
Find the file *. MDF
How Dettach:
From Interprise Manager
Click on a database which is
Right click


learning Data Manipulation Language (DML)


Data Manipulation Language (DML)

INSERT INTO table_name
VALUES (value_1, value_2 ,..., nilai_n)


INSERT INTO table_name (kolom_1, kolom_2 ,..., Kolom_n)
VALUES (value_1, value_2 ,..., nilai_n);

Fields with are mandatory NOT NULL konstraint
Writing data to the type of numbers are not enclosed in quotation marks
Writing data to the type of string or a date enclosed in quotation marks
Data on the child table (foreign key) must exist in the parent
INSERT INTO STUDENTS (Thang, NIM, NAME) VALUES (2005, 9, 'David');


UPDATE table_name
kolom_1 = nilai_baru_1,
kolom_2 = nilai_baru_2,
kolom_3 = nilai_baru_n
[WHERE condition]
Change all the rows, one column
Change all thmasuk to 2003
UPDATE students
SET thmasuk = 2003;
Changing a particular column for a particular row
change the column name to Marani Anita in the table of his students who NIM = 200
UPDATE students
SET name = 'Anita Marani'
WHERE NIM = 200;
Change multiple columns at once
UPDATE Student
name = 'Anita Mariana',
thmasuk = 2000
WHERE NIM = 200;
Operator Condition
Relational Operators (=,>, <,> =, <=, <>)
Boolean Operators (And, Or, Not)
UPDATE class
Between and Not Between
UPDATE class
Operator Conditions (Cont ...)
In and Not In
UPDATE class
Idkelas WHERE IN (1,2,3)
Is Null and Is Not Null
UPDATE Student
SET DATE = '21-Aug-89 '
Like and Not Like
%  some arbitrary character
_  one arbitrary character
[]  any one character in the range
[^]  any single character outside the range

Sample Data: Erike, Mirna, Ani, Kaka, Ubaid
LIKE '% a': Mirna, Kaka
LIKE '% a%': Mirna, Kaka, Ubaid
LIKE '_a%': Kaka
LIKE '% [a-k] a%': Kaka
LIKE '% [^ a-k] a%': Mirna

Example Queries:

UPDATE Student
Address = Null
WHERE Name LIKE '% a%';


Thursday, May 26, 2011

Java scripts and Java differences

| Thursday, May 26, 2011 | 3 comments

Java scripts and Java differences
First in Class X EMP B (Programs and Classes), Most Hated Banget with that name there are 2 JAVA Karna he thought of Master Patterns Differ in Teaching Us, And We Also confused with Javascript on the Web!
So What is actually "Differences Between Java and Java Script ..?", if both are indeed derived from" Java "...!!. Ga At first I also know what is actually "Differences Between Java Script with Java", due to curious to know eventually I try to ask the same oom Google with the Keyword "The difference with Java Java Script" and after I had been looking for finally met as well. nah these results I found:
Javascript is usually in its use combined with HTML, the aim is to enrich the HTML to get more interactive, java script therefore depend strongly on the browser used. If your browser does not mengijikan (disable) to use a javascript feed applications that use javascript are not the maximum, even could have been an error. Java is a language pemogramam object-oriented programming (OOP) in which applications can be made directly in the execution, of course by doing the compiler first. Language similar to java. Net was Microsoft, but java is open, in contrast with. Net is its use requires a license.
JavaSript just a scripting language, whereas Java programming language that is multifunctional and platform independent. Java can be used to create desktop applications and also server (SDK and EE) is also for programming the mobile (ME), while JavaSript based on client-side can only dijalakan with the browser and executed on the client computer.
In addition, Java can also be used to create desktop applications that run in the browser by using the applet, while JavaScript can only work when combined with HTML.
JavaScript is a script (text) which is read by the browser, then translated into a set of commands. Then the order was executed in the browser. JavaScript (generally) Dlm pasted HTML. Java is a program which generated (compiled) on the server, then run in a browser (if she Java Applet) or run on the server (if he's Java Server Pages).New results are displayed in the browser. Java programs must be retrieved from the server.
So the main difference between Jaca Script with Java is the way a program is executed. With its own java can penggunakaannya broader, JME -> for application development on mobile phones, JDK -> application development on desktops and Jee -> for the development of large applications (enterprise)
How? Are Useful For pal? Easy - Helpful hope ya friend!


Popular Posts


Total Pageviews

There was an error in this gadget

Follow by Email


© Copyright 2010. . All rights reserved | is proudly powered by | Template by -